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
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.
- 1Cheap gates alone are classically simulable
- 2T gate needs a magic state
- 3Distil many noisy copies into one
- 4Cultivation grows one cheaply
- 5Universal fault-tolerant computing
Why they are needed. Clifford gates (Hadamard, phase , 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 . 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 . 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 . So a supply of good magic states gives a supply of gates.
Distillation. Bravyi and Kitaev's 15-to-1 protocol takes 15 magic states with error and, using only Clifford operations and a check that detects most failures, outputs one with error about . With that is about ; a second round goes far lower. The number of input states per output grows like for target error ; better codes have pushed down, and in 2024 two groups reached constant overhead () in theory, using very large codes.
Cultivation. In 2024 Gidney, Shutty and Jones showed how to grow a single high-quality state inside a surface-code patch at roughly the cost of one logical CNOT, reaching simulated error rates around with physical noise. This removed much of the space once reserved for factories in resource estimates.
Counting cost. Resource estimates count gates (or Toffoli gates, which take several gates each) because Clifford gates are comparatively cheap. Reducing the 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 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 , consume it with Clifford operations and a measurement, and the 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 into one with error about . Repeating it reaches any target error with overhead input states per output state. Better codes lowered the exponent: triorthogonal codes (Bravyi and Haah, 2012) gave , Hastings and Haah (2018) reached , Krishna and Tillich (2019) made arbitrarily small for qudits, and in 2024 Wills, Hsieh and Yamasaki, and independently Nguyen, constructed qubit protocols with constant overhead () 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 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 at circuit noise and at , 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 and 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)
- 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)
- Magic state distillation (Wikipedia)The idea and the 15-to-1 protocol.
- Gottesman–Knill theorem (Wikipedia)Why the easy gates are not enough.
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.
- Start with
- Quantum algorithmsAlgorithm
- Step 2
- Then
- Magic states: distillation and cultivationYou are here
Open problems & questions
No open problems or questions on this entry.
Progress timeline
- Dec 19, 2024Logical distillation in hardwaresource
Rodriguez et al. distilled magic states encoded in colour codes on neutral atoms.
- Sep 26, 2024Magic state cultivationsource
Gidney, Shutty and Jones grew T states at roughly the cost of a CNOT.
- Aug 14, 2024Constant overhead for qubitssource
Wills, Hsieh and Yamasaki gave constant-overhead distillation for qubits; Nguyen independently gave good binary codes with transversal CCZ.
- Sep 11, 2017Sublogarithmic overheadsource
Hastings and Haah reached , below the conjectured bound of 1.
- Mar 3, 2004Magic state distillationsource
Bravyi and Kitaev posted the 15-to-1 distillation protocol (PRA 2005).