Skip to content
DAH

Magic states: distillation and cultivation

Error-correcting codes give cheap Clifford gates but not a universal gate set; magic states supply the missing T or CCZ gates and are made reliable by distillation or, more recently, cultivation.

On this page14 sections
Why other work relies on it

Non-Clifford gates dominate the cost of fault-tolerant algorithms (T and Toffoli counts are the standard cost measure), so the price of a good magic state largely sets the runtime and size of machines for Shor's algorithm and chemistry.

Making special 'magic' resource states clean enough to give error-corrected quantum computers their missing gate.

  1. 1Cheap gates alone are classically simulable
  2. 2T gate needs a magic state
  3. 3Distil many noisy copies into one
  4. 4Cultivation grows one cheaply
  5. 5Universal fault-tolerant computing

Why they are needed. Clifford gates (Hadamard, phase SS, CNOT) are easy to do fault-tolerantly, but the Gottesman–Knill theorem shows that circuits of Clifford gates and Pauli measurements can be simulated efficiently on a classical computer. A universal set needs one more gate, usually T=diag(1,eiπ/4)T=\mathrm{diag}(1,e^{i\pi/4}). The Eastin–Knill theorem rules out codes in which every gate is applied qubit-by-qubit ("transversally"), so some gate always needs a workaround.

Gate teleportation. Prepare the magic state ∣T⟩=T∣+⟩|T\rangle=T|+\rangle. Interacting it with the data qubit using a CNOT, measuring, and applying a Clifford correction depending on the result has the same effect as applying TT. So a supply of good magic states gives a supply of TT gates.

Distillation. Bravyi and Kitaev's 15-to-1 protocol takes 15 magic states with error pp and, using only Clifford operations and a check that detects most failures, outputs one with error about 35p335p^3. With p=10−3p=10^{-3} that is about 3.5×10−83.5\times10^{-8}; a second round goes far lower. The number of input states per output grows like log⁡γ(1/ε)\log^{\gamma}(1/\varepsilon) for target error ε\varepsilon; better codes have pushed γ\gamma down, and in 2024 two groups reached constant overhead (γ=0\gamma=0) in theory, using very large codes.

Cultivation. In 2024 Gidney, Shutty and Jones showed how to grow a single high-quality ∣T⟩|T\rangle state inside a surface-code patch at roughly the cost of one logical CNOT, reaching simulated error rates around 10−910^{-9} with 10−310^{-3} physical noise. This removed much of the space once reserved for factories in resource estimates.

Counting cost. Resource estimates count TT gates (or Toffoli gates, which take several TT gates each) because Clifford gates are comparatively cheap. Reducing the TT count of an algorithm is therefore a major part of compiling it for a fault-tolerant machine.

Go deeper

The full technical text.

Why magic states are needed

Circuits made only of Clifford gates (Hadamard, phase, CNOT) with Pauli measurements can be simulated efficiently on a classical computer (the Gottesman–Knill theorem), so a universal quantum computer needs at least one non-Clifford gate, usually T=diag(1,eiπ/4)T=\mathrm{diag}(1,e^{i\pi/4}) or the three-qubit CCZ. Eastin and Knill (2009) proved that no quantum code can implement a universal gate set transversally, so some gate always needs extra machinery. The standard fix is gate teleportation: prepare the magic state ∣T⟩=T∣+⟩|T\rangle=T|+\rangle, consume it with Clifford operations and a measurement, and the TT gate is applied.

Distillation

Bravyi and Kitaev (2005) showed that many noisy magic states can be distilled into fewer, better ones using only Clifford operations. Their 15-to-1 protocol, based on the punctured Reed–Muller code, turns 15 states with error pp into one with error about 35p335p^3. Repeating it reaches any target error ε\varepsilon with overhead O(log⁡γ(1/ε))O(\log^{\gamma}(1/\varepsilon)) input states per output state. Better codes lowered the exponent: triorthogonal codes (Bravyi and Haah, 2012) gave γ≈log⁡23≈1.6\gamma\approx\log_2 3\approx1.6, Hastings and Haah (2018) reached γ≈0.678\gamma\approx0.678, Krishna and Tillich (2019) made γ\gamma arbitrarily small for qudits, and in 2024 Wills, Hsieh and Yamasaki, and independently Nguyen, constructed qubit protocols with constant overhead (γ=0\gamma=0) from asymptotically good codes with transversal CCZ. These asymptotic results use very large codes; practical factories use small protocols.

Practical cost

Early estimates made magic-state factories the bulk of a fault-tolerant computer. Litinski (2019) showed with careful surface-code layouts that distillation is "not as costly as you think". Gidney, Shutty and Jones (2024) introduced magic state cultivation, which grows one ∣T⟩|T\rangle state inside a surface-code patch using about as many physical gates as a lattice-surgery CNOT of the same reliability; their simulations reach logical error rates of 2×10−92\times10^{-9} at 10−310^{-3} circuit noise and 4×10−114\times10^{-11} at 5×10−45\times10^{-4}, and they suggest further distillation may not be needed in practice. Gidney's 2025 RSA-2048 estimate relied on cultivation to cut the space for factories.

Experiments

Logical-level magic states have now been made on hardware: distillation with d=3d=3 and d=5d=5 colour-code logical qubits on a neutral-atom processor (Rodriguez et al., Nature 2025), and high-fidelity logical magic states by code switching on trapped ions (Daguerre et al., PRX 2025). Both are small-scale demonstrations of a building block, not factories.

Words on this page (7)
Words on this page
Clifford gates
A set of quantum gates that are cheap to protect but can be simulated classically on their own.
T gate
A quarter-phase gate that, added to Clifford gates, makes a universal gate set.
Gottesman–Knill theorem
Circuits of Clifford gates and Pauli measurements can be simulated efficiently classically.
gate teleportation
Applying a gate by consuming a prepared resource state plus measurements.
magic state distillation
Turning many noisy magic states into fewer, cleaner ones.
transversal gate
A logical gate applied by acting on each physical qubit separately, which keeps errors from spreading.
surface code
The leading error-correcting code for 2D chips.
New to this? Read first (2)
New to this? Read first
AI-reviewedAn AI drafted this explanation. Check it against the technical text.

Understanding map

map of the whole wiki →

What to read before Magic states: distillation and cultivation (left), and what builds on it: entries that depend on it and its open problems (right). Every box links to its page.

  1. Start with
  2. Step 2
  3. Then

Open problems & questions

No open problems or questions on this entry.

Progress timeline

  1. Dec 19, 2024
    Logical distillation in hardware

    Rodriguez et al. distilled magic states encoded in colour codes on neutral atoms.

    source
  2. Sep 26, 2024
    Magic state cultivation

    Gidney, Shutty and Jones grew T states at roughly the cost of a CNOT.

    source
  3. Aug 14, 2024
    Constant overhead for qubits

    Wills, Hsieh and Yamasaki gave constant-overhead distillation for qubits; Nguyen independently gave good binary codes with transversal CCZ.

    source
  4. Sep 11, 2017
    Sublogarithmic overhead

    Hastings and Haah reached γ≈0.678\gamma\approx0.678, below the conjectured bound of 1.

    source
  5. Mar 3, 2004
    Magic state distillation

    Bravyi and Kitaev posted the 15-to-1 distillation protocol (PRA 2005).

    source