Thursday, January 12, 2023

AI and physics education

New technologies bring new opportunities for physics education. ANU Physics has for several years been looking at incorporating virtual reality (VR) into their courses, particularly for first year physics. Two examples:

"Dissonance-VR targets misconceptions around forces, by quizing students about forces acting on a basketball, and then presenting them with the physical world that manifests their answer. Any misconception they have results in an unphysical world that feels wrong. A narrator guides them to correct their choice and their misconception."

"Field-VR is an electric and magnetic field sandbox that allows students to visualise electric and magnetic fields and be immersed in them. They can build complex fields using standard electric and magnetic sources, as well as test charged particle trajectories. The hope is that this visual tool will aid students in learning EM, particularly those who find spatial problems challenging. This software has recently been upgraded to allow for multiple users - i.e. collaborative VR tutorials."

How can emerging AI tools such for text generation (e.g. ChatGPT) and image analysis/generation (e.g. StableDiffusion) be useful for education? 

From what I've seen in the news and social media, the academic perspective on these tools has so far been largely negative, focusing on how they may be used for cheating, making take-home assignments obsolete. Even if methods for detecting AI-generated text are improved and made widely available, the student who modifies an AI-generated first draft will probably have an advantage. 

Rather than making futile attempts to stamp out these new tools, we should be thinking about how they will change our workflows in physics (and other fields) and how courses should be updated to incorporate them.

Already there are businesses springing up selling AI content generators for blogs, marketing materials, coursework, etc. It won't be long before text-to-text models will be used by working scientists for tedious tasks such as drafting article introductions, literature reviews, and maybe even PhD theses, most likely using a general purpose model augmented with text harvested from the articles your work cites. This will give us more time to do actual science, provided we remain mindful of the biases and limitations of AI models. We will need to train students on how to prompt these models to obtain a useful first draft and to identify and correct physics errors in the generated text. This is not unlike the role of professors today, who will assign a research topic and get the student started by providing a list of references to read and eventually (nominally) make improvements to the first draft written by the student.

Lab courses will also be transformed by the availability of fast AI computer vision tools for object detection, image segmentation, and so on. I remember my first year physics labs frequently involved mucking around with stopwatches to make (inaccurate) measurements of stuff such as the local gravitational acceleration. These kinds of experiments can be made enormously easier and more precise by recording a video using a smartphone camera and post-processing to extract the needed observables. This will change the required skills and dominant sources of error.

Apart from changes to the techniques, we will also be able to conduct experiments at a much larger scale, e.g. involving hundreds or thousands of objects that can be individually tracked using computer vision libraries. An infamous thermodynamics lab experiment at ANU involved testing the ergodic hypothesis by observing the motion of several battery-powered cat balls on a partitioned table (explained here) and periodically counting the number of "atoms" (balls) in each partition. This was not only tedious, but randomly-failing batteries often led to experimental results apparently violating the laws of statistical mechanics. With computer vision you can get the full time series of the position data and not only compute the required observables for much larger system sizes, but also identify and exclude balls as soon as their batteries fail.

What do you think? Is this the future? Or have these techniques already been implemented by lab demonstrators and I'm just showing my age?

Monday, January 9, 2023

Workshop on Topological Data Analysis: Mathematics, Physics and beyond

Next month I'll be speaking at a workshop on topological data analysis (TDA) organized by the Korean Institute for Advanced Study, to be held on February 8-10 in Seoul. I'm quite excited because this will be my first chance to attend an in-person meeting dedicated to this topic! From the workshop website

"This workshop aims to share our knowledge about topological data analysis from the viewpoint of mathematics and physics. We are trying to make this event in-person with a relaxed schedule, so that we can discuss each other more freely. We hope this event help us widen our perspectives on mathematical and physical backgrounds about data analysis."

In other TDA news, there is an article on TDA published in the January issue of Physics Today which gives an overview of applications to condensed matter and soft matter physics using the "shape" of Jigglypuff as a pedagogical example!

Friday, December 30, 2022

2022 in review

Quite a lot happened this year:

1. Travel has returned to pre-covid normalcy, and I even had the chance to attend an in-person conference in Korea. Online is no substitute for the discussions that take place in the breaks between talks. I am glad that our students have also had the chance to travel abroad for inspiring conferences (ICOAM and QTML).

2. In academia it is hard to say no - we are always enticed by opportunities to get another paper, get more citations, increase our h-index. In the first half of the year I was incredibly overworked, supervising several PhD students while trying to find time to finish my own projects. After finishing my two overdue review articles in July I decided to cut back on commitments so I would have time to properly supervise students. This was a great success, and it's quite liberating not having to care about getting just one more paper in PRL/Nature/whatever.

3. I have now worked a full year as a remote editor for Physical Review A, handling over 300 submissions. This has been a great learning experience and has given me a better appreciation for how peer review can improve the quality and rigor of research articles. Sadly it is a minority of researchers who are willing to offer their time to provide well-crafted, thoughtful reports. It is promising to see that publishers including APS and Optica are providing more resources for referees, particularly early career researchers. It would be good to see referee training integrated directly into graduate research programs.

4. Machine learning models for image generation (such as Stable Diffusion) and text generation (ChatGPT) are going to change the world. There's no putting the genie back into the bottle now that anyone can download the trained model weights in a few minutes and run them on their own personal computer (InvokeAI doesn't even require a high end GPU!). Some professions such as graphic artists will be irrevocably changed. Still, the models are not perfect and they often fail in subtle and unpredictable ways, requiring human vetting. Thus, at least in the near term they will be primarily used to enhance productivity, not destroy entire professions.

5. In quantum computing, the most exciting developments for me were several groups proposing efficient classical algorithms for spoofing the results of random quantum circuit sampling experiments and debates over quantum supremacy using quantum topological data analysis.

Stay tuned next year for more on flat bands, Weyl semimetals, (quantum) machine learning, quantum scars, and more blogging. Happy 2023!

Monday, December 26, 2022

Quantum circuit simulation using Julia

For better or worse, most researchers working in quantum computing write and simulate quantum circuits using python libraries such as Qiskit, Amazon Braket, QuTip, and Qibo

Python is great for prototyping, particularly when one can cobble together existing libraries that call low level C or Fortran code to perform the most time-consuming parts of the computation. However the performance of Python code will inevitably be worse than optimised code written for compiled languages. 

This is usually an acceptable tradeoff for physicists - we prefer to do physics over low level code optimization and debugging. Unfortunately state-of-the-art quantum processors have reached a scale where numerically simulating them is extremely slow and (arguably) intractable for classical computers. Cue waiting for hours or even days for code to run.

That's why many researchers are starting to use Julia for simulating quantum circuits. Julia uses just-in-time compilation to achieve speeds comparable to C without sacrificing being easy to write and debug. As an example, the figure below (taken from arXiv:221209537) demonstrates computation of matrix permanents (crucial for simulation of BosonSampling experiments) two orders of magnitude faster than Matlab and Python implementations!

Benchmarking Julia against python and matlab code for computation of matrix permanents using Ryser's algorithm

 Other Julia libraries for quantum being developed include Yao.jl (differentiable quantum circuit simulation), QuantumCumulants.jl (simulation of open quantum systems), QXTools (distributed tensor network simulations of quantum circuits), and Quiqbox.jl (computational quantum chemistry subroutines). For more, see this list of open source quantum software projects.

I have tested Julia on a few photonics-specific problems, including the numerical solutions of the nonlinear Schrodinger equation and photonic band structure calculations. I particularly liked the ease of translating mathematical expressions to working code (for example, Julia supports unicode variables), ability to easily parallelize code, and (optional) type declarations for improving performance and debugging. 

Why not give Julia a try for your next project?

Wednesday, December 21, 2022

arXiv backlog

I've been too busy finishing papers to carefully read the arXiv postings that looked interesting enough to download. Here is what's caught my attention:

Tuesday, December 6, 2022

Students on strike

Graduate students in California have been on strike for three weeks, pushing for a livable wage.

The cost of living in California is amongst the highest in the USA, partially due to expenses for essentials including housing being pushed up by tech workers on much higher salaries. It's hard to carry out deep research if you are distracted by worrying about whether you will have enough food to last the week, or whether the next rent increase will leave you homeless.

Unfortunately universities have little incentive to increase the pay of junior researchers. The majority of graduate students are foreigners on temporary visas with little bargaining power; a few years in poverty can be a pathway to permanent residency, which opens up many more opportunities compared to their home countries. 

Moreover, salaries funded by research grants are often fixed by the funding agencies, with top-ups explicitly forbidden in some cases. Even when professors may be strongly in favour of paying their team members a livable wage, they have little power to effect change with salaries controlled by upper university management.

Despite these hurdles, the University of California system has now agreed to pay rises of up to 29% for postdocs and researchers. 

Will this lead to broader change within the broken academic system?

Meanwhile, in the headlines a few days ago Singapore and New York were tied as the world's most expensive cities. This comes amidst an absolutely insane rental market here, with monthly rents up by more than 70% in some cases.


Friday, December 2, 2022

Two preprints

I haven't had much time for posting recently, since I've been rushing to finish several projects before the end of the year. We have two papers out on arXiv this week, with a few more hopefully ready soon!


Unravelling quantum chaos using persistent homology

We considered the application of (quantum) chaos detection techniques to a simple system, a driven-damped Kerr nonlinear oscillator. Tuning the driving frequency in this system can induce transitions between chaotic and regular dynamics, with classical chaos emerging in the limit of large amplitude coherent states. This provides a nice setting for looking at how persistent homology-based methods for detecting classical chaos can be translated to quantum dynamics. For this purpose, we treat the quantum oscillator as an open quantum system subject to random quantum jumps (photons leaking from the cavity), described by a stochastic Schrodinger equation. Despite the higher complexity of the quantum system (in terms of a larger phase space), we can still distinguish regimes of regular and chaotic dynamics by considering the topology of a time-delay embedding of the detected photon counts!

Pseudospin-2 in photonic chiral borophene

One chapter of my PhD thesis covered wave propagation at conical interactions. At the time, we were most interested in intersections with pseudospin 1/2 (corresponding to Dirac cones in systems such as graphene), and pseudospin 1 (occurring in the Lieb lattice, a topic which I spent some time studying). While I was writing up the thesis, I found the analysis of both kinds of systems could be connected nicely by generalizing the description to arbitrary pseudospin s. We included this in a review article, but didn't give much thought as to how one might go about realizing intersections with higher values of s, assuming they would be unstable and hard to make in practice.

It turns out, higher pseudospin conical intersections can be symmetry-protected (similar to the case of the Lieb lattice), and can they emerge in lattices that don't look too crazy, can be realized using optical waveguide arrays, and may even exist as stable two-dimensional electronic materials!