Abstract
Most schemes for realistic quantum computing require access to so-called magic states to allow universal quantum computing. Because the preparation process may be noisy, magic state distillation methods are needed to improve their accuracy and suppress any potential errors. Unfortunately, magic state distillation is resource-intensive and often considered a bottleneck to scalable quantum computation. Here, the cost is defined by the overhead: the ratio of noisy input magic states to cleaner outputs. This is known to scale as \({\mathcal{O}}({\log }^{\gamma }(1/\epsilon ))\) as ϵ → 0, where ϵ is the output error rate and γ is some constant. Reducing this overhead, corresponding to smaller γ, is highly desirable to remove the bottleneck. However, identifying the smallest achievable exponent γ for distilling magic states of qubits has proved challenging. Here, we resolve this problem by demonstrating protocols with the optimal exponent γ = 0, thus corresponding to magic state distillation with a constant overhead, and we show that this is achievable for the most important magic states such as \(\left\vert {\mathsf{T}}\right\rangle\) and \(\left\vert {\mathsf{CCZ}}\right\rangle\). This is achieved by using algebraic geometry constructions to build the first asymptotically good quantum codes with transversal non-Clifford gates, for which we also construct an efficient decoder with linear decoding radius.
This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$32.99 / 30 days
cancel any time
Subscribe to this journal
Receive 12 print issues and online access
$259.00 per year
only $21.58 per issue
Buy this article
- Purchase on SpringerLink
- Instant access to full article PDF
Prices may be subject to local taxes which are calculated during checkout

Similar content being viewed by others
Data availability
No data were used in this study.
Code availability
No code was used in this study.
References
Gottesman, D. An introduction to quantum error correction. Proc. Symp. Appl. Math. 58, 221–236 (2002).
Aharonov, D. & Ben-Or, M. Fault-tolerant quantum computation with constant error. In Proc. Twenty-Ninth Annual ACM Symposium on Theory of Computing, STOC ’97 176–188 (Association for Computing Machinery, 1997).
Aharonov, D. & Ben-Or, M. Fault-tolerant quantum computation with constant error rate. SIAM J. Comput. 38, 1207 (2008).
Shor, P. Fault-tolerant quantum computation. In Proc. 37th Conference on Foundations of Computer Science 56–65 (IEEE, 1996).
Aliferis, P., Gottesman, D. & Preskill, J. Quantum accuracy threshold for concatenated distance-3 codes. Quantum Inf. Comput. 6, 97–165 (2006).
Reichardt, B. W. in Automata, Languages and Programming (eds Bugliesi, M. et al.) 60–61 (Springer, 2006).
Yamasaki, H. & Koashi, M. Time-efficient constant-space-overhead fault-tolerant quantum computation. Nat. Phys. 20, 247–253 (2024).
Bluvstein, D. et al. Logical quantum processor based on reconfigurable atom arrays. Nature 626, 58–65 (2024).
Gupta, R. S. et al. Encoding a magic state with beyond break-even fidelity. Nature 625, 259–263 (2024).
Acharya, R. et al. Quantum error correction below the surface code threshold. Nature 638, 920–926 (2024).
Gottesman, D. Stabilizer Codes and Quantum Error Correction, Ph.D. thesis, California Institute of Technology (1997).
Eastin, B. & Knill, E. Restrictions on transversal encoded quantum gate sets. Phys. Rev. Lett. 102, 110502 (2009).
Bravyi, S. & Kitaev, A. Universal quantum computation with ideal clifford gates and noisy ancillas. Phys. Rev. A 71, 022316 (2005).
Knill, E. Fault-tolerant postselected quantum computation: schemes. Preprint at https://doi.org/10.48550/arXiv.quant-ph/0402171 (2004).
Gottesman, D. & Chuang, I. L. Demonstrating the viability of universal quantum computation using teleportation and single-qubit operations. Nature 402, 390–393 (1999).
Bombin, H. & Martin-Delgado, M. A. Topological quantum distillation. Phys. Rev. Lett. 97, 180501 (2006).
Kubica, A. & Beverland, M. E. Universal transversal gates with color codes: a simplified approach. Phys. Rev. A 91, 032330 (2015).
Moussa, J. E. Transversal clifford gates on folded surface codes. Phys. Rev. A 94, 042316 (2016).
Łodyga, J., Mazurek, P., Grudka, A. & Horodecki, M. Simple scheme for encoding and decoding a qubit in unknown state for various topological codes. Sci. Rep. 5, 8975 (2015).
Li, Y. A magic state’s fidelity can be superior to the operations that created it. N. J. Phys. 17, 023037 (2015).
Litinski, D. Magic state distillation: not as costly as you think. Quantum 3, 205 (2019).
Fowler, A. G., Mariantoni, M., Martinis, J. M. & Cleland, A. N. Surface codes: towards practical large-scale quantum computation. Phys. Rev. A 86, 032324 (2012).
Gidney, C. & Ekerå, M. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum 5, 433 (2021).
Bravyi, S. & Haah, J. Magic-state distillation with low overhead. Phys. Rev. A 86, 052329 (2012).
Haah, J. & Hastings, M. B. Codes and protocols for distilling t, controlled-s, and Toffoli gates. Quantum 2, 71 (2018).
Meier, A. M., Eastin, B. & Knill, E. Magic-state distillation with the four-qubit code. Quantum Inf. Comput. 13, 195–209 (2013).
Campbell, E. T., Anwar, H. & Browne, D. E. Magic-state distillation in all prime dimensions using quantum reed-muller codes. Phys. Rev. X 2, 041021 (2012).
Jones, C. Multilevel distillation of magic states for quantum computing. Phys. Rev. A 87, 042305 (2013).
Hastings, M. B. & Haah, J. Distillation with sublogarithmic overhead. Phys. Rev. Lett. 120, 050504 (2018).
Krishna, A. & Tillich, J.-P. Towards low overhead magic state distillation. Phys. Rev. Lett. 123, 070507 (2019).
Beverland, M., Campbell, E., Howard, M. & Kliuchnikov, V. Lower bounds on the non-clifford resources for quantum computations. Quantum Sci. Technol. 5, 035009 (2020).
Jones, C. Low-overhead constructions for the fault-tolerant toffoli gate. Phys. Rev. A 87, 022328 (2013).
Selinger, P. Quantum circuits of t-depth one. Phys. Rev. A 87, 042302 (2013).
Gidney, C. & Fowler, A. G. Efficient magic state factories with a catalyzed \(\left\vert CCZ\right\rangle\) to \(\left\vert CCZ\right\rangle\) transformation. Quantum 3, 135 (2019).
Goppa, V. D. Algebraico-geometric codes. Izvestiya Rossiiskoi Akademii Nauk. Seriya Matematicheskaya 46, 762 (1982).
Gottesman, D. Surviving as a Quantum Computer in a Classical World (Self-Published, 2024).
Vasmer, M. & Kubica, A. Morphing quantum codes. PRX Quantum 3, 030319 (2022).
Golowich, L. & Guruswami, V. Asymptotically good quantum codes with transversal non-Clifford gates. Preprint at https://doi.org/10.48550/arXiv.2408.09254 (2024).
Nguyen, Q. T., Good binary quantum codes with transversal ccz gate. Preprint at https://doi.org/10.48550/arXiv.2408.10140 (2024).
Calderbank, A. R. & Shor, P. W. Good quantum error-correcting codes exist. Phys. Rev. A 54, 1098 (1996).
Steane, A. Multiple-particle interference and quantum error correction. Proc. R. Soc. London A 452, 2551 (1996).
MacWilliams, F. J. & Sloane, N. J. A. The Theory of Error-Correcting Codes vol. 16 (Elsevier, 1977).
Stichtenoth, H. Algebraic Function Fields and Codes vol. 254 (Springer, 2009).
Houshmand, M., Zamani, M. S., Sedighi, M. & Arabzadeh, M. Decomposition of diagonal hermitian quantum gates using multiple-controlled pauli z gates. ACM J. Emerg. Technolog. Comput. Syst 11, 1 (2014).
Tsfasman, M. A., Vlădut, S. G., & Nogin, D. Algebraic Geometric Codes: Basic Notions vol. 139 (American Mathematical Society, 2007).
Panteleev, P. & Kalachev, G. Asymptotically good quantum and locally testable classical LDPC codes. In Proc. 54th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2022 375–388 (Association for Computing Machinery, 2022).
Leverrier, A. and Zemor, G. Quantum tanner codes. In Proc. 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science 872–883 (IEEE Computer Society, 2022).
Dinur, I., Hsieh, M.-H., Lin, T.-C., and Vidick, T. Good quantum LDPC codes with linear time decoders. In Proc. 55th Annual ACM Symposium on Theory of Computing, STOC 2023 905–918 (Association for Computing Machinery, 2023).
Devetak, I. & Winter, A. Distillation of secret key and entanglement from quantum states. Proc. R. Soc. A 461, 207 (2005).
Bennett, C. H., Bernstein, H. J., Popescu, S. & Schumacher, B. Concentrating partial entanglement by local operations. Phys. Rev. A 53, 2046 (1996).
Veitch, V., Ferrie, C., Gross, D. & Emerson, J. Negative quasi-probability as a resource for quantum computation. N. J. Phys. 14, 113011 (2012).
Veitch, V., Mousavian, S. A. H., Gottesman, D. & Emerson, J. The resource theory of stabilizer quantum computation. N. J. Phys. 16, 013009 (2014).
Howard, M. & Campbell, E. Application of a resource theory for magic states to fault-tolerant quantum computing. Phys. Rev. Lett. 118, 090501 (2017).
Hayashi, M. & Yamasaki, H. Generalized quantum Stein’s lemma and second law of quantum resource theories. Preprint at https://doi.org/10.48550/arXiv.2408.02722 (2024).
Acknowledgements
We thank N. Rengaswamy for discussions on CSS-T codes. A. Wills thanks The University of Tokyo, in particular the whole group of H. Yamasaki, for their funding of and hospitality during his visit to the institution, which led to this work. H. Yamasaki was supported by JST PRESTO grant nos. JPMJPR201A and JPMJPR23FC, JSPS KAKENHI grant no. JP23K19970 and MEXT Quantum Leap Flagship Program (MEXT QLEAP) grant nos. JPMXS0118069605 and JPMXS0120351339.
Author information
Authors and Affiliations
Contributions
The project was conceived by H.Y. Theoretical results were proved by A.W. and H.Y. in discussion with M.-H.H. The paper was written by A.W. and H.Y. with input from M.-H.H.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Physics thanks Noah Shutty, Michael Vasmer and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Supplementary Information
Supplementary Sections I–V, Appendices and References.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Wills, A., Hsieh, MH. & Yamasaki, H. Constant-overhead magic state distillation. Nat. Phys. (2025). https://doi.org/10.1038/s41567-025-03026-0
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41567-025-03026-0