quant-phOct 2, 2026

Generalization of Transformer-Based Neural Quantum States via In-Context Learning

Authors: Zhen Qin, Qing Qu, Alfred O. Hero

Organizations: Michigan Institute for Computational Discovery and Engineering, Department of Electrical Engineering and Computer Science and Department of Statistics, University of Michigan, Ann Arbor, MI 48109 USA · Department of Electrical Engineering and Computer Science, University of Michigan, Ann Arbor, MI 48109 USA

Abstract

Neural quantum states based on modern deep learning architectures have emerged as powerful representations for quantum many-body systems. In particular, Transformer-based neural quantum states provide expressive models capable of capturing long-range correlations, and their empirical generalization performance has recently been demonstrated. However, a theoretical understanding of their generalization behavior remains largely unexplored. In this paper, we develop a theoretical framework to analyze the generalization properties of Transformer-based neural quantum states under in-context learning. We establish a rigorous inference-time generalization error bound in terms of mean squared error (MSE), showing that the pointwise prediction error decreases inversely with both the number of in-context examples and the depth of the Transformer. We further show that the Transformer depth required to achieve this guarantee scales only linearly with the system size--namely, the number of particles in continuous systems or the number of qudits in discrete systems. Building on this result, we extend our analysis to full quantum states formulated as rank-one density operators, and derive MSE-based generalization bounds over both continuous and discrete domains under physical constraints. Finally, numerical simulations corroborate our theoretical analysis.

Figures & tables

Explore similar work

CardsList
  1. On Generalisation Error Bounds for Transformers

    Oct 15, 2024Lan V. TruongTransformerStatistical Learning Theory

  2. Neural Scaling Laws of Transformer Operator Network

    Sep 27, 2026Haoran Yan, Zhongjie Shi, Yuanzhe Xi +2Neural Network GeneralizationNeural Network Approximation Theory

  3. Noise-Robust Quantum State Characterization for Remote State Preparation with Deep Learning

    Sep 17, 2026Bo Tang, Zixuan Liao, Hao Li +9Quantum State TomographyQuantum State Preparation