Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Oct 10;11(41):eadu0059.
doi: 10.1126/sciadv.adu0059. Epub 2025 Oct 10.

Attention to quantum complexity

Affiliations

Attention to quantum complexity

Hyejin Kim et al. Sci Adv. .

Abstract

The imminent era of error-corrected quantum computing demands robust methods to characterize quantum state complexity from limited, noisy measurements. We introduce the Quantum Attention Network (QuAN), a classical artificial intelligence (AI) framework leveraging attention mechanisms tailored for learning quantum complexity. Inspired by large language models, QuAN treats measurement snapshots as tokens while respecting permutation invariance. Combined with our parameter-efficient miniset self-attention block, this enables QuAN to access high-order moments of bit-string distributions and preferentially attend to less noisy snapshots. We test QuAN across three quantum simulation settings: driven hard-core Bose-Hubbard model, random quantum circuits, and toric code under coherent and incoherent noise. QuAN directly learns entanglement and state complexity growth from experimental computational basis measurements, including complexity growth in random circuits from noisy data. In regimes inaccessible to existing theory, QuAN unveils the complete phase diagram for noisy toric code data as a function of both noise types, highlighting AI's transformative potential for assisting quantum hardware.

PubMed Disclaimer

Figures

Fig. 1.
Fig. 1.. Learning relative complexity between states ρα and ρβ from bit-string collections.
(A) Measurements of a quantum state ρ samples bit-strings {Bi} from bit-string probability distribution p({bi}ρ) over the 2Nq-dimensional Hilbert space. (B) Schematic architecture of the QuAN. The Z-basis snapshot collection of size M is partitioned into sets {Xi} of size N . In the encoder stage, after convolution registers positions of qubits, the set goes through L layers of the MSSAB. Inside the MSSAB, the input is further partitioned into Ns minisets to be parallel processed through SABs, recurrent attention block (RecAB), and reducing attention block (RedAB). The decoder stage compresses the output from the encoder, allowing for attending to different components in a permutation-invariant manner, using a PAB and single-layer perception (SLP). The output label is y=1 for the state ρα and y=0 for the state ρβ . See Supplementary Materials section A for more details. (C to E) Examples of ρα and ρβ for learning relative complexity using the binary classification output of the QuAN. (C) Volume-law entangled state versus area-law entangled state. The entanglement between two subsystems (white and gray) is indicated through blue links. (D) Random circuit state at depth d versus that at some deep reference depth. (E) Decodable versus undecodable states of an error-correcting code under noise. The incoherent noise depicted in gray suppresses large loops.
Fig. 2.
Fig. 2.. Relative complexity between volume-law and area-law scaling states.
(A) Intersnapshot correlation reveals X-X correlation of the quantum state. The purple box shows the schematic of the SAB capturing the intersnapshot correlation. (B) Schematic diagram of the 16-transmon-qubit chip used for quantum emulation of the driven hard-core Boson-Hubbard model. (C) Entanglement transition based on the scaling of bipartite entanglement entropy S=SAA+SVV , where A and V represent the area and volume of the subsystem, respectively. Adapted from Karamlou et al. (45) (https://creativecommons.org/licenses/by/4.0/). (D) Schematic of a contrast architecture: The SMLP respects the permutation symmetry. (E to G) Average confidence y¯ as a function of detuning strength δ for different architectures using different set sizes N . The star symbol marks the training points. The average and errors are obtained from 10 independent model training. For machine learning details, see Supplementary Materials section C2. (E) The SMLP fails to train. (F) QuAN2 ( Ns=1 , L=1 ). (G) QuAN4 with two layers of self-attention ( Ns=1 , L=2).
Fig. 3.
Fig. 3.. Relative complexity between the random circuit state at depth d and the reference state at depth d = 20.
(A) Schematic illustration of the 6-by-6 subarray of qubits from Google’s “Sycamore” quantum processor. A random circuit of depth d alternates entangling iSWAP-like gates (gray) and single-qubit (SQ) gates randomly chosen from the set X±1,Y±1,W±1,V±1 , with W=(X+Y)/2 and V=(XY)/2 . The two-qubit gates are applied in a repeating series of ABCDCDAB patterns. (B) Data structure. For each depth d , we sample Nc=50 circuits. For each circuit instance s , we sample Ms bit-strings and partition them into sets of size N , resulting in a total of Nc×Ms/N sets for each circuit depth d . (C) XEB (Eq. 5) for bit-strings from noiseless simulations as a function of circuit depth d with varying system sizes Nq . The markers show the averaged XEB over Nc=50 different circuit instances and the error bars for the standard errors. (D) Pure-state trained QuAN50’s classification accuracy for pure-state data. We train eight independent models at each circuit depth d and show the averaged accuracy (marker) and the standard error (error bar). QuAN50 successfully learns the relative complexity of d=8 . (E) Comparison of the performances of QuAN2, QuAN50, and other architectures in learning the relative complexity of depth d=8 on an Nq=25 qubit system. The models maintain approximately the same total number of trainable parameters to make a controlled comparison between different architectures. (F) Averaged XEB for experimentally collected bit-strings. The plot shows the averaged XEB over 50 circuit instances (markers) and the standard error (error bars). The XEB smoothly decays as a function of depth d . (G) Learning relative complexity from experimental data using QuAN50 trained on noiseless data.
Fig. 4.
Fig. 4.. Learning the relative complexity of decodable and undecodable states of the toric code.
(A) Transformation from the Z-basis measurements to the smallest-loop, plaquette variables. (B) The QuAN can build larger closed loops through multiplication. (C and D) Decodability phase diagram of the toric code state under coherent and incoherent noise for two different set sizes: N=1 in (C) and N=64 in (D). The regions in the phase space that support the training data are marked with hatch marks. The average confidence y¯ averages over 10 independent model training. The known thresholds are marked along the gX=0 axis at pc0.11 and along the pflip=0 at gc0.22 . (E) Average confidence y¯ by QuAN2 for different set sizes N and by the SMLP with N=64 along the axis gX=0 . The error bar shows the standard error for y¯ over 10 independent model training. (F) Average confidence y¯ by QuAN2 with varying set sizes N and by the SMLP with N=64 along the axis pflip=0 . (G) Average confidence y¯ by QuAN2 and the PAB with N=64 along the axis gX=0 , where the PAB is defined as the model without self-attention and has only pooling attention. (H) Average confidence y¯ by QuAN2 and the PAB with N=64 along the axis pflip=0 . (I) Pooling attention score histogram from the topological state with (gX,pflip)=(0,0.05) . (J) Loop expectation value Zclosed as a function of the loop perimeter for high- and low-attention-score snapshots in the topological state with (gX,pflip)=(0,0.05) . The error bars represent the standard error of Zclosed over different loop configurations in corresponding snapshots.

References

    1. Bluvstein D., Evered S. J., Geim A. A., Li S. H., Zhou H., Manovitz T., Ebadi S., Cain M., Kalinowski M., Hangleiter D., Bonilla Ataides J. P., Maskara N., Cong I., Gao X., Sales Rodriguez P., Karolyshyn T., Semeghini G., Gullans M. J., Greiner M., Vuletić V., Lukin M. D., Logical quantum processor based on reconfigurable atom arrays. Nature 626, 58–65 (2024). - PMC - PubMed
    1. Google Quantum AI , Suppressing quantum errors by scaling a surface code logical qubit. Nature 614, 676–681 (2023). - PMC - PubMed
    1. Ni Z., Li S., Deng X., Cai Y., Zhang L., Wang W., Yang Z.-B., Yu H., Yan F., Liu S., Zou C.-L., Sun L., Zheng S.-B., Xu Y., Yu D., Beating the break-even point with a discrete-variable-encoded logical qubit. Nature 616, 56–60 (2023). - PMC - PubMed
    1. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, I. Polosukhin, “Attention is all you need,” in Proceedings of the 31st International Conference on Neural Information Processing Systems (Curran Associates Inc., 2017), p. 6000–6010; https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547de....
    1. A. Parikh, O. Täckström, D. Das, J. Uszkoreit, A decomposable attention model for natural language inference. arXiv:1606.01933 (2016).

LinkOut - more resources