A musician distinguishes not only loudness but also pitch. Similarly, an electron in the quantum world is described not just by the magnitude of its wave but by both amplitude and phase. In moiré superlattices, where two slightly twisted layers create a periodic pattern, electrons interact in complex ways, and a magnetic field adds another layer of subtlety. Conventional neural networks trained to describe such systems often work only with amplitude, losing phase information. The authors of a new study set out to let the network hear both aspects at once.
Complex Psiformer is built like an orchestra, where each musician (orbital) plays its own part. One part of the score is fixed in advance and accounts for the magnetic boundary conditions, while the other is learned during training. Inside the network, hidden features are complex, and attention is arranged so that the weights are real but the messages are complex. This allows the network to tune the phase of the wave function more precisely without losing amplitude.
The comparison was performed at the same number of optimization steps and the same run budget. The complex network reached lower energy in both supercells, and for the two-electron system it came 16.891 meV per electron closer to the exact calculation than the real-valued one. This shows that a complex internal representation is not just a mathematical formality but a practical advantage.
As the magnetic flux increases, the modulation of the average density weakens, but coherent fluctuations persist. Gauge-invariant current maps revealed qualitative differences in local circulation. In the 18-cell system at flux n_phi=2, the complex state showed a sharper honeycomb charge pattern: 95.8% of the difference in the structure factor comes from the average-density contribution.
Previously it was unclear whether a complex internal representation helps a neural network describe electrons in a magnetic moiré field more accurately. Now it is clear that complex hidden features and attention with Hermitian magnitude systematically yield lower energy at the same optimization budget. The musician who hears both loudness and pitch plays more accurately.
In the 25-cell system, the average gain of Complex Psiformer over Real Psiformer is 1.458 meV per electron, roughly 14 times smaller than the room-temperature thermal energy of 25 meV. Such small energy differences are nevertheless reproducibly stable across five independent runs.
The idea of a neural network that learns to 'see' a quantum phase echoes the image of self-learning quantum computers in Greg Egan's novel Schild's Ladder, where states of matter are computed as variational approximations.