Abstract
Generalization bounds are a critical tool to assess the training data requirements of Quantum Machine Learning (QML). Recent work has established guarantees for in-distribution generalization of quantum neural networks (QNNs), where training and testing data are drawn from the same data distribution. However, there are currently no results on out-of-distribution generalization in QML, where we require a trained model to perform well even on data drawn from a different distribution to the training distribution. Here, we prove out-of-distribution generalization for the task of learning an unknown unitary. In particular, we show that one can learn the action of a unitary on entangled states having trained only product states. Since product states can be prepared using only single-qubit gates, this advances the prospects of learning quantum dynamics on near term quantum hardware, and further opens up new methods for both the classical and quantum compilation of quantum circuits.
Introduction
In classical machine learning, a fundamental assumption is that training and testing data are drawn from the same distribution. In the quantum domain, this assumption poses a significant challenge. Learning a "unitary"—the mathematical description of a quantum system's evolution—ideally requires training on a diverse set of quantum states, including highly entangled ones.
However, preparing highly entangled states on current Noisy Intermediate-Scale Quantum (NISQ) hardware is notoriously difficult due to rapid noise accumulation. Conversely, "product states" (where qubits are independent) are easily prepared but represent only a small, simple subset of the possible quantum state space. This research addresses a pivotal question: Can a quantum neural network (QNN) trained on simple product states accurately predict the behavior of complex, entangled states it has never encountered?
Theoretical Framework: Locally Scrambled Ensembles
The researchers employ statistical learning theory to analyze Out-of-Distribution (OOD) generalization through the lens of "locally scrambled ensembles." These are distributions of quantum states invariant under local rotations (single-qubit operations). This class is remarkably broad, encompassing everything from simple product states to globally Haar-random entangled states.
The mathematical cornerstone of this work is the Risk Equivalence Theorem. It proves that the "expected risk" (prediction error) for any two locally scrambled ensembles is equivalent up to a small constant factor of 2. Specifically, if a QNN with $T$ trainable gates is trained on $N$ product states, the error on unseen entangled states scales as $O(\sqrt{T \log T / N})$. This suggests that OOD generalization is essentially guaranteed for unitary learning if both distributions are locally scrambled.
Experimental Validation and Key Results
The theory was validated using synthetic datasets and numerical simulations of physical systems, including Heisenberg spin chains and "fast scramblers" (complex unitaries that rapidly spread information).
Key findings include:
- Risk Tracking: In simulations of a 12-qubit Heisenberg spin chain, the model trained on just two product states exhibited an OOD error that almost perfectly tracked the in-distribution error, confirming the Risk Equivalence Theorem.
- Scaling Laws: For 8-qubit fast scramblers, the generalization error decreased as $N^{-1/2}$ (where $N$ is the number of training states), outperforming theoretical worst-case bounds.
- Noise Resilience: A "Goldilocks" effect was observed where training on deep, entangled circuits failed due to high noise levels, whereas training on product states succeeded because the data remained "clean" enough for the model to learn the underlying dynamics.
Implications and Future Work
This work demonstrates that while an exponential number of product states are needed to mathematically span the entire Hilbert space, only a polynomial number are required to learn "efficiently implementable" dynamics globally. This significantly lowers the barrier for training QML models on near-term hardware.
Future research will look to extend these proofs from unitary dynamics (closed systems) to quantum channels (open/noisy systems). Additionally, the results suggest potential for new "quantum-inspired" classical algorithms; if a unitary can be learned via product states, it may be possible to compile it classically using tensor networks, bypassing the need for quantum hardware entirely for certain classes of dynamics.
Summary updated