Reuse & Permissions

It is not necessary to obtain permission to reuse this article or its components as it is available under the terms of the Creative Commons Attribution 4.0 International license. This license permits unrestricted use, distribution, and reproduction in any medium, provided attribution to the author(s) and the published article's title, journal citation, and DOI are maintained. Please note that some figures may have been included with permission from other third parties. It is your responsibility to obtain the proper permission from the rights holder directly for these figures.

Export citation

Export citation

Choose format for download:

Download Citation
  • Open Access

Neural Decoders for Universal Quantum Algorithms

J. Pablo Bonilla Ataides*,†, Andi Gu*,‡, Susanne F. Yelin§, and Mikhail D. Lukin

  • *These authors contributed equally to this work.
  • Contact author: jbonillaataides@g.harvard.edu
  • Contact author: andigu@g.harvard.edu
  • §Contact author: syelin@g.harvard.edu
  • Contact author: lukin@physics.harvard.edu

PRX Intelligence 1, 013008 – Published 4 August, 2026

DOI: https://doi.org/10.1103/vjn1-mbxl

Abstract

Fault-tolerant quantum computing demands decoders that are fast, accurate, and adaptable to circuit structure and realistic noise. While machine learning decoders have demonstrated impressive performance for quantum memory, their use in algorithmic decoding—where logical gates create complex error correlations—remains limited. We introduce a modular attention-based neural decoder that learns gate-induced correlations and generalizes from training on random circuits to unseen multiqubit algorithmic workloads. Our decoders achieve fast inference and logical error rates comparable to most-likely-error decoders across varied circuit depths and qubit counts. Addressing realistic noise, we incorporate loss-resolving readout, yielding substantial gains when qubit loss is present. We further show that by tailoring the decoder to the structure of the algorithm and decoding only the relevant observables, we can simplify the decoder design without sacrificing accuracy. We validate our framework on multiple error correction codes—including surface codes and two-dimensional color codes—and demonstrate state-of-the-art performance under circuit-level noise. Finally, we show that the attention mechanism learns to track physically meaningful error correlations, consistent with the expected propagation pathways through entangling gates. Enabling experimental validation of deep-circuit fault-tolerant algorithms and architectures [Bluvstein et al., Nature (London) 649, 39 (2026)], these results establish neural decoders as practical, versatile, and high-performance tools for quantum computing.

View figure in article

Physics Subject Headings (PhySH)

Article Text

References (75)

  1. D. Gottesman, Stabilizer codes and quantum error correction, Ph.D. thesis, California Institute of Technology, 1997.
  2. E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Topological quantum memory, J. Math. Phys. 43, 4452 (2002).
  3. A. Y. Kitaev, Fault-tolerant quantum computation by anyons, Ann. Phys. 303, 2 (2003).
  4. S. Krastanov and L. Jiang, Deep neural network probabilistic decoder for stabilizer codes, Sci. Rep. 7, 11003 (2017).
  5. S. Varsamopoulos, B. Criger, and K. Bertels, Decoding small surface codes with feedforward neural networks, Quantum Sci. Technol. 3, 015004 (2018).
  6. G. Torlai and R. G. Melko, Neural decoder for topological codes, Phys. Rev. Lett. 119, 030501 (2017).
  7. P. Baireuther, T. E. O’Brien, B. Tarasinski, and C. W. J. Beenakker, Machine-learning-assisted correction of correlated qubit errors in a topological code, Quantum 2, 48 (2018).
  8. C. Chamberland and P. Ronagh, Deep neural decoders for near term fault-tolerant experiments, Quantum Sci. Technol. 3, 044002 (2018).
  9. P. Baireuther, M. D. Caio, B. Criger, C. W. J. Beenakker, and T. E. O’Brien, Neural network decoder for topological color codes with circuit level noise, New J. Phys. 21, 013003 (2019).
  10. N. Maskara, A. Kubica, and T. Jochym-O’Connor, Advantages of versatile neural-network decoding for topological codes, Phys. Rev. A 99, 052351 (2019).
  11. P. Andreasson, J. Johansson, S. Liljestrand, and M. Granath, Quantum error correction for the toric code using deep reinforcement learning, Quantum 3, 183 (2019).
  12. R. Sweke, M. S. Kesselring, E. P. L. van Nieuwenburg, and J. Eisert, Reinforcement learning decoders for fault-tolerant quantum computation, Mach. Learn.: Sci. Technol. 2, 025005 (2021).
  13. S. Varsamopoulos, K. Bertels, and C. G. Almudever, Decoding surface code with a distributed neural network–based decoder, Quantum Mach. Intell. 2, 3 (2020).
  14. L. D. Colomer, M. Skotiniotis, and R. Muñoz-Tapia, Reinforcement learning for optimal error correction of toric codes, Phys. Lett. A 384, 126353 (2020).
  15. X. Ni, Neural network decoders for large-distance 2D toric codes, Quantum 4, 310 (2020).
  16. D. Fitzek, M. Eliasson, A. F. Kockum, and M. Granath, Deep Q-learning decoder for depolarizing noise on the toric code, Phys. Rev. Res. 2, 023230 (2020).
  17. T. Wagner, H. Kampermann, and D. Bruß, Symmetries for a high-level neural decoder on the toric code, Phys. Rev. A 102, 042411 (2020).
  18. K. Meinerz, C.-Y. Park, and S. Trebst, Scalable neural decoder for topological surface codes, Phys. Rev. Lett. 128, 080505 (2022).
  19. H. Wang, P. Liu, K. Shao, D. Li, J. Gu, D. Z. Pan, Y. Ding, and S. Han, Transformer-QEC: Quantum error correction code decoding with transferable transformers, arXiv:2311.16082.
  20. S. Gicev, L. C. L. Hollenberg, and M. Usman, A scalable and fast artificial neural network syndrome decoder for surface codes, Quantum 7, 1058 (2023).
  21. C. Chamberland, L. Goncalves, P. Sivarajah, E. Peterson, and S. Grimberg, Techniques for combining fast local decoders with global decoders under circuit-level noise, Quantum Sci. Technol. 8, 045011 (2023).
  22. J. Bausch, A. W. Senior, F. J. H. Heras, T. Edlich, A. Davies, M. Newman, C. Jones, K. Satzinger, M. Y. Niu, S. Blackwell, G. Holland, D. Kafri, J. Atalaya, C. Gidney, D. Hassabis, S. Boixo, H. Neven, and P. Kohli, Learning high-accuracy error decoding for quantum processors, Nature (London) 635, 834 (2024).
  23. M. Lange, P. Havström, B. Srivastava, I. Bengtsson, V. Bergentall, K. Hammar, O. Heuts, E. van Nieuwenburg, and M. Granath, Data-driven decoding of quantum error correcting codes using graph neural networks, Phys. Rev. Res. 7, 023181 (2025).
  24. B. M. Varbanov, M. Serra-Peralta, D. Byfield, and B. M. Terhal, Neural network decoder for near-term surface-code experiments, Phys. Rev. Res. 7, 013029 (2025).
  25. R. W. J. Overwater, M. Babaie, and F. Sebastiano, Neural-network decoders for quantum error correction using surface codes: A space exploration of the hardware cost-performance tradeoffs, IEEE Trans. Quantum Eng. 3, 3101719 (2022).
  26. A. Boutros, A. Arora, and V. Betz, Field-programmable gate array architecture for deep learning: Survey and future directions, Proc. IEEE 113, 613 (2025).
  27. C. N. Coelho, A. Kuusela, S. Li, H. Zhuang, J. Ngadiuba, T. K. Aarrestad, V. Loncar, M. Pierini, A. A. Pol, and S. Summers, Automatic heterogeneous quantization of deep neural networks for low-latency inference on the edge for particle detectors, Nat. Mach. Intell. 3, 675 (2021).
  28. Google Quantum AI, Quantum error correction below the surface code threshold, Nature (London) 638, 920 (2025).
  29. D. Bluvstein, A. A. Geim, S. H. Li, S. J. Evered, J. P. Bonilla Ataides, G. Baranes, A. Gu, T. Manovitz, M. Xu, M. Kalinowski, et al., A fault-tolerant neutral-atom architecture for universal quantum computation, Nature (London) 649, 39 (2026).
  30. Y. Zhou, C. Wan, Y. Xu, J. P. Zhou, K. Q. Weinberger, and E.-A. Kim, Learning to decode logical circuits, Nat. Comput. Sci. 5, 1158 (2025).
  31. L. Egan, D. M. Debroy, C. Noel, A. Risinger, D. Zhu, D. Biswas, M. Newman, M. Li, K. R. Brown, M. Cetina, et al., Fault-tolerant control of an error-corrected qubit, Nature (London) 598, 281 (2021).
  32. C. Ryan-Anderson, J. G. Bohnet, K. Lee, D. Gresh, A. Hankin, J. P. Gaebler, D. Francois, A. Chernoguzov, D. Lucchetti, N. C. Brown, T. M. Gatterman, S. K. Halit, K. Gilmore, J. Gerber, B. Neyenhuis, D. Hayes, and R. P. Stutz, Realization of real-time fault-tolerant quantum error correction, Phys. Rev. X 11, 041058 (2021).
  33. Y. Zhao, Y. Ye, H.-L. Huang, Y. Zhang, D. Wu, H. Guan, Q. Zhu, Z. Wei, T. He, S. Cao, et al., Realization of an error-correcting surface code with superconducting qubits, Phys. Rev. Lett. 129, 030501 (2022).
  34. S. Krinner, N. Lacroix, A. Remm, A. Di Paolo, E. Genois, C. Leroux, C. Hellings, S. Lazar, F. Swiadek, J. Herrmann, G. J. Norris, C. K. Andersen, M. Müller, A. Blais, C. Eichler, and A. Wallraff, Realizing repeated quantum error correction in a distance-three surface code, Nature (London) 605, 669 (2022).
  35. Google Quantum AI, Suppressing quantum errors by scaling a surface code logical qubit, Nature (London) 614, 676 (2023).
  36. D. Bluvstein, S. J. Evered, A. A. Geim, S. H. Li, H. Zhou, T. Manovitz, S. Ebadi, M. Cain, M. Kalinowski, D. Hangleiter, et al., Logical quantum processor based on reconfigurable atom arrays, Nature (London) 626, 58 (2024).
  37. V. V. Sivak, A. Eickbusch, B. Royer, S. Singh, I. Tsioutsios, S. Ganjam, A. Miano, B. L. Brock, A. Z. Ding, L. Frunzio, S. M. Girvin, R. J. Schoelkopf, and M. H. Devoret, Real-time quantum error correction beyond break-even, Nature (London) 616, 50 (2023).
  38. R. S. Gupta, N. Sundaresan, T. Alexander, C. J. Wood, S. T. Merkel, M. B. Healy, M. Hillenbrand, T. Jochym-O’Connor, J. R. Wootton, T. J. Yoder, A. W. Cross, M. Takita, and B. J. Brown, Encoding a magic state with beyond break-even fidelity, Nature (London) 625, 259 (2024).
  39. A. G. Fowler, Optimal complexity correction of correlated errors in the surface code, arXiv:1310.0863.
  40. S. Bravyi, M. Suchara, and A. Vargo, Efficient algorithms for maximum likelihood decoding in the surface code, Phys. Rev. A 90, 032326 (2014).
  41. S. Huang, M. Newman, and K. R. Brown, Fault-tolerant weighted union-find decoding on the toric code, Phys. Rev. A 102, 012419 (2020).
  42. N. Delfosse and N. H. Nickerson, Almost-linear time decoding algorithm for topological codes, Quantum 5, 595 (2021).
  43. O. Higgott, T. C. Bohdanowicz, A. Kubica, S. T. Flammia, and E. T. Campbell, Improved decoding of circuit noise and fragile boundaries of tailored surface codes, Phys. Rev. X 13, 031007 (2023).
  44. N. Sundaresan, T. J. Yoder, Y. Kim, M. Li, E. H. Chen, G. Harper, T. Thorbeck, A. W. Cross, A. D. Córcoles, and M. Takita, Demonstrating multi-round subsystem quantum error correction using matching and maximum likelihood decoders, Nat. Commun. 14, 2852 (2023).
  45. O. Higgott and C. Gidney, Sparse Blossom: Correcting a million errors per core second with minimum-weight matching, Quantum 9, 1600 (2025).
  46. B. Barber, K. M. Barnes, T. Bialas, O. Buğdaycı, E. T. Campbell, N. I. Gillespie, K. Johar, R. Rajan, A. W. Richardson, L. Skoric, C. Topal, M. L. Turner, and A. B. Ziad, A real-time, scalable, fast and resource-efficient decoder for a quantum computer, Nat. Electron. 8, 84 (2025).
  47. M. Cain, C. Zhao, H. Zhou, N. Meister, J. P. B. Ataides, A. Jaffe, D. Bluvstein, and M. D. Lukin, Correlated decoding of logical algorithms with transversal gates, Phys. Rev. Lett. 133, 240602 (2024).
  48. H. Zhou, C. Zhao, M. Cain, D. Bluvstein, N. Maskara, C. Duckering, H.-Y. Hu, S.-T. Wang, A. Kubica, and M. D. Lukin, Low-overhead transversal fault tolerance for universal quantum computation, Nature (London) 646, 303 (2025).
  49. M. Cain, D. Bluvstein, C. Zhao, S. Gu, N. Maskara, M. Kalinowski, A. A. Geim, A. Kubica, M. D. Lukin, and H. Zhou, Fast correlated decoding of transversal logical algorithms, arXiv:2505.13587.
  50. M. Serra-Peralta, M. H. Shaw, and B. M. Terhal, Decoding across transversal Clifford gates in the surface code, PRX Quantum 7, 010335 (2026).
  51. M. L. Turner, E. T. Campbell, O. Crawford, N. I. Gillespie, and J. Camps, Scalable decoding protocols for fast transversal logic in the surface code, PRX Quantum 7, 010320 (2026).
  52. M. Schlichtkrull, T. N. Kipf, P. Bloem, R. van den Berg, I. Titov, and M. Welling, Modeling relational data with graph convolutional networks, The Semantic Web (ESWC 2018), edited by A. Gangemi, et al., Lecture Notes in Computer Science, Vol. 10843 (Springer, Cham, 2018), pp. 593–607.
  53. G. Baranes, M. Cain, J. P. Bonilla Ataides, D. Bluvstein, J. Sinclair, V. Vuletic, H. Zhou, and M. D. Lukin, Leveraging qubit loss detection in fault-tolerant quantum algorithms, Phys. Rev. X 16, 011002 (2026).
  54. Y. Wu, S. Kolkowitz, S. Puri, and J. D. Thompson, Erasure conversion for fault-tolerant quantum computing in alkaline earth Rydberg atom arrays, Nat. Commun. 13, 4657 (2022).
  55. S. Ma, G. Liu, P. Peng, B. Zhang, S. Jandura, J. Claes, A. P. Burgers, G. Pupillo, S. Puri, and J. D. Thompson, High-fidelity gates and mid-circuit erasure conversion in an atomic qubit, Nature (London) 622, 279 (2023).
  56. P. Scholl, A. L. Shaw, R. B.-S. Tsai, R. Finkelstein, J. Choi, and M. Endres, Erasure conversion in a high-fidelity Rydberg quantum simulator, Nature (London) 622, 273 (2023).
  57. A. Kubica, A. Haim, Y. Vaknin, H. Levine, F. Brandão, and A. Retzker, Erasure qubits: Overcoming the T1 limit in superconducting circuits, Phys. Rev. X 13, 041022 (2023).
  58. A. Steane, Multiple-particle interference and quantum error correction, Proc. R. Soc. London, Ser. A 452, 2551 (1996).
  59. A. Gu, J. P. B. Ataides, M. D. Lukin, and S. F. Yelin, Scalable neural decoders for practical fault-tolerant quantum computation, arXiv:2604.08358.
  60. N. P. Breuckmann and J. N. Eberhardt, Quantum low-density parity-check codes, PRX Quantum 2, 040101 (2021).
  61. Q. Xu, J. P. B. Ataides, C. A. Pattison, N. Raveendran, D. Bluvstein, J. Wurtz, B. Vasić, M. D. Lukin, L. Jiang, and H. Zhou, Constant-overhead fault-tolerant quantum computation with reconfigurable atom arrays, Nat. Phys. 20, 1084 (2024).
  62. Q. Xu, H. Zhou, G. Zheng, D. Bluvstein, J. P. B. Ataides, M. D. Lukin, and L. Jiang, Fast and parallelizable logical computation with homological product codes, Phys. Rev. X 15, 021065 (2025).
  63. J. P. Bonilla Ataides, H. Zhou, Q. Xu, G. Baranes, B. Li, M. D. Lukin, and L. Jiang, Constant-overhead fault-tolerant Bell-pair distillation using high-rate codes, Phys. Rev. Lett. 135, 130804 (2025).
  64. Y.-H. Liu and D. Poulin, Neural belief-propagation decoders for quantum error-correcting codes, Phys. Rev. Lett. 122, 200501 (2019).
  65. A. S. Maan and A. Paler, Machine learning message-passing for the scalable decoding of QLDPC codes, npj Quantum Inf. 11, 78 (2025).
  66. V. Ninkovic, O. Kundacina, D. Vukobratovic, C. Häger, and A. Graell i Amat, Decoding quantum LDPC codes using graph neural networks, arXiv:2408.05170.
  67. A. Gong, S. Cammerer, and J. M. Renes, Graph neural networks for enhanced decoding of quantum LDPC codes, in 2024 IEEE International Symposium on Information Theory (ISIT) (IEEE, Piscataway, NJ, 2024), pp. 2700–2705.
  68. G. Hu, W. Ouyang, C.-Y. Lu, C. Lin, and H.-S. Zhong, Efficient and universal neural-network decoder for stabilizer-based quantum error correction, arXiv:2502.19971.
  69. J. Blue, H. Avlani, Z. He, L. Ziyin, and I. L. Chuang, Machine learning decoding of circuit-level noise for bivariate bicycle codes, arXiv:2504.13043.
  70. A. Defazio, X. A. Yang, H. Mehta, K. Mishchenko, A. Khaled, and A. Cutkosky, The road less scheduled, in Advances in Neural Information Processing Systems 37, Vancouver, Canada (Curran Associates, Inc., 2024), pp. 9974–10007.
  71. J. P. B. Ataides, A. Gu, S. Yelin, and M. Lukin, Neural decoders for universal quantum algorithms, Zenodo, 2026, https://doi.org/10.5281/zenodo.19625192.
  72. C. Chamberland, A. Kubica, T. J. Yoder, and G. Zhu, Triangular color codes on trivalent graphs with flag qubits, New J. Phys. 22, 023019 (2020).
  73. C. Gidney and C. Jones, New circuits and an open source decoder for the color code, arXiv:2312.08813.
  74. S. Koutsioumpas, T. Noszko, H. Sayginel, M. Webster, and J. Roffe, Colour codes reach surface code performance using vibe decoding, arXiv:2508.15743.
  75. S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall, and T. J. Yoder, High-threshold and low-overhead fault-tolerant quantum memory, Nature (London) 627, 778 (2024).

Outline

Information

Sign In to Your Journals Account

Filter

Filter

Article Lookup

Enter a citation