Skip to main content

Magic state distillation

Algorithms and benchmarks / Error correction (enabling)

Surface codes make some gates cheap (Clifford gates) but not the T or Toffoli gates needed for universality; magic state factories prepare high-quality resource states that are consumed to perform them.

Era
Fault-tolerant
Problem class
Error correction (enabling)
Speedup
An enabling technique; its cost often dominates fault-tolerant estimates, which is why T or Toffoli counts are quoted.

How it works

Many noisy copies of a magic state are combined by a small error-detecting circuit into fewer, better copies; repeated rounds reach the needed quality.

Typical use cases

  • All fault-tolerant algorithms with non-Clifford gates (Shor, chemistry, simulation).

Resource estimates

No resource estimate with stated assumptions was verified for this family in this release.

Demonstrations

No demonstration was verified for this release.

Hardware platforms that fit

Platform-independent: needed by any platform using surface or similar codes; cat-qubit architectures prepare Toffoli resources differently (Guillaud and Mirrahimi 2019; Gouzien et al. 2023).

What you need to run it

Classical simulation
Distillation circuits are mostly Clifford and simulate efficiently with stabiliser simulators.
Noisy hardware (NISQ)
Not applicable for this family.
Fault-tolerant machine
Dedicated areas of the chip running factories in parallel with the computation.
Annealer or analogue simulator
Not applicable for this family.

Calculate the memory of a simulation

Software

Other open-source frameworks

  • Stim (Google Quantum AI (United States); non-European)

A listing is not an endorsement; check each tool for the features you need.

Limitations and open questions

  • Factories take a large share of a fault-tolerant machine; the RSA-2048 runtime of Gidney (2025) grows partly because fewer factories are used.
  • Litinski (2019) shows that most qubits in distillation can use a low code distance, so the cost is lower than often assumed, in extreme cases below that of a logical Clifford gate.

In the Quantum Algorithm Zoo

No matching Zoo entry was found on 23 October 2026; the Zoo lists algorithms with a proven or conjectured speedup, not this family.

Index: the Quantum Algorithm Zoo by Stephen P. Jordan, last updated 2026-09-10, checked 2026-10-23. The portal links to it and copies no description from it. Browse the full Quantum Algorithm Zoo (external site)

Named in European procurements

None of the procurement documents read for this release names it.

Sources

  1. D. Litinski (2019). Magic State Distillation: Not as Costly as You Think. Quantum 3, 205 (2019); arXiv:1905.06903. Read: abstract page, retrieved 2026-10-23.
  2. C. Gidney (2025). How to factor 2048 bit RSA integers with less than a million noisy qubits. arXiv:2505.15917 (preprint, May 2025). Read: abstract page, retrieved 2026-10-23.
  3. É. Gouzien, D. Ruiz, F.-M. Le Régent, J. Guillaud, N. Sangouard (2023). Performance Analysis of a Repetition Cat Code Architecture: Computing 256-bit Elliptic Curve Logarithm in 9 Hours with 126133 Cat Qubits. Phys. Rev. Lett. 131, 040602 (2023); arXiv:2302.06639. Read: abstract page, retrieved 2026-10-23.
  4. J. Guillaud, M. Mirrahimi (2019). Repetition Cat Qubits for Fault-Tolerant Quantum Computation. Phys. Rev. X 9, 041053 (2019); arXiv:1904.09474. Read: abstract page, retrieved 2026-10-23.