Published March 20, 2025 | Version Published
Journal Article Open

Discovery of optimal quantum codes via reinforcement learning

  • 1. ROR icon University of California, Berkeley
  • 2. ROR icon Joint Center for Quantum Information and Computer Science
  • 3. ROR icon California Institute of Technology
  • 4. ROR icon Virginia Tech
  • 5. ROR icon University of California, San Diego
  • 6. ROR icon Harvard University
  • 7. ROR icon University of Maryland, College Park
  • 8. ROR icon Brandeis University

Abstract

The design and optimization of quantum codes is generally hard because of the prohibitive computational cost. The recently introduced quantum lego framework provides a powerful method for generating complex quantum error-correcting codes (QECCs) out of simple ones. We gamify this process and unlock a new avenue for code design and discovery using reinforcement learning (RL). Already for simple code measures and modest qubit numbers, we produce codes that are both optimal and novel. Moreover, we argue that this framework is both scalable, when combined with efficient tensor contraction methods, and flexible, since we can specify arbitrary properties of the code to be optimized. We train on two such properties, maximizing the code distance, and minimizing the probability of logical error under biased Pauli noise. For the first, we show that the trained agent identifies ways to increase code distance beyond naive concatenation, saturating the linear programming bound for CSS (Calderbank, Shor, Steane) codes on 13 qubits. With a learning objective to minimize the logical error probability under biased Pauli noise, we find the best-known CSS code at this task for ≲20 qubits. Compared to other (locally deformed) CSS codes, including Surface, XZZX, and two-dimensional Color codes, our [[17,1,3]] code construction actually has lower adversarial distance, yet better protects the logical information, highlighting the importance of QECC desiderata. Lastly, we comment on how this RL framework can be used in conjunction with physical quantum devices to tailor a code without explicit characterization of the noise model.

Copyright and License

 © 2025 American Physical Society.

Acknowledgement

We thank Haowei Deng for pointing out a typo, Markus Grassl for helpful comments on linear programming bounds for CSS codes, and Robert Huang for his helpful suggestions. C.C. acknowledges support from the U.S. Department of Defense and NIST through the Hartree Postdoctoral Fellowship at QuICS and the National Science Foundation (PHY-1733907). C.C. and B.G.S. acknowledge support from the Air Force Office of Scientific Research (FA9550-19-1-0360). The Institute for Quantum Information and Matter is an NSF Physics Frontiers Center. V.P.S. gratefully acknowledges support by the NSF Graduate Research Fellowship Program under Grant No. DGE 1752814, the DOE Office of Science under QuantISED Award DE-SC0019380. H.Y.H. is grateful for the support from the Harvard Quantum Initiative Fellowship.

Files

PhysRevApplied.23.034048.pdf

Files (2.1 MB)

Name Size Download all
md5:558736ef74dce0d3a418e672f548c6cd
2.1 MB Preview Download

Additional details

Related works

Is new version of
Discussion Paper: arXiv:2305.06378 (arXiv)

Funding

United States Department of Defense
National Institute of Standards and Technology
National Science Foundation
PHY-1733907
United States Air Force Office of Scientific Research
FA9550-19-1-0360
NSF Graduate Research Fellowship Program
DGE 1752814
United States Department of Energy
DE-SC0019380
Harvard University
Harvard Quantum Initiative Fellowship -

Dates

Accepted
2025-01-30

Caltech Custom Metadata

Caltech groups
Institute for Quantum Information and Matter, Division of Physics, Mathematics and Astronomy (PMA)
Publication Status
Published