Magic-state distillation
Magic-state distillation consumes multiple imperfect non-stabilizer ancillas to produce fewer, higher-quality ancillas using an allowed protected operation set.
On this page
Explanation and significance
Clifford operations are powerful for encoding and error correction but do not supply universal quantum computation by themselves with stabilizer inputs and Pauli measurements. A suitable non-stabilizer state can enable a non-Clifford gate through injection. Distillation concentrates this resource while rejecting or detecting selected faults. The cost includes raw-state production, logical Clifford operations, measurements, space-time scheduling and failed batches.
Mechanism and mathematical structure
A common target is |T>=(|0>+exp(i pi/4)|1>)/sqrt(2). An idealized distillation protocol can map an input error epsilon to an output error of higher order, such as C epsilon³ at leading order, under a specified independent-input error model and ideal supporting operations. The coefficient and acceptance probability are protocol-specific. Logical faults in the distillation circuit add an error floor; distillation is not a black box that removes arbitrary correlated noise.
Fully worked reference example
For an explicitly illustrative cubic map epsilon_out=35 epsilon_in³, input epsilon_in=0.01 gives epsilon_out≈3.5×10^-5. Applying the same leading-order map again gives 35(3.5×10^-5)³≈1.50×10^-12. These are algebraic leading-order numbers, not an implementation forecast: acceptance, correlations and logical gate errors were excluded. If the supporting circuit contributes 10^-8 output error, the second-stage result is dominated by that contribution rather than 10^-12. If fifteen raw inputs are used per accepted first-level attempt, a two-level construction starts from at least 225 raw states before accounting for rejection and buffering.
Limits and misconceptions
A distillation threshold is not the same as a hardware error-correction threshold. Raw magic-state infidelity may not capture all relevant coherent or correlated errors. Factory throughput can dominate application runtime even when data-qubit storage is reliable. Claims about lower factory overhead must match target error, output rate, logical code, physical noise and accounting boundaries.
Scientific relationships
Uses non-stabilizer resources and fault-tolerant Clifford operations. Is used in universal logical computation and resource estimates. Is distinct from entanglement purification, though both consume imperfect resources to improve selected output quality.
Historical context
Bravyi and Kitaev’s cited magic-state work was submitted on March 3, 2004, with a subsequent 2005 journal version. These are proposal and publication dates, not a hardware-factory demonstration.
Injection converts a resource state into a gate
Take an ideal data state |psi>=a|0>+b|1> and an ancilla |T>=(|0>+omega|1>)/sqrt(2), with omega=exp(i pi/4). Apply CNOT with data as control and ancilla as target, then measure the ancilla in Z. Outcome zero leaves the unnormalized data state (a|0>+b omega|1>)/sqrt(2), which is T|psi>/sqrt(2). Outcome one leaves (a omega|0>+b|1>)/sqrt(2)=omega T†|psi>/sqrt(2).
Both outcomes occur with probability one-half for every normalized input. In the second branch, applying S=diag(1,i) gives S T†=T, apart from the already irrelevant global factor omega. Thus the resource state, a Clifford entangling operation, a measurement, and a conditional Clifford correction implement the non-Clifford T gate. The calculation identifies precisely where feedforward enters and why the ancilla's non-stabilizer character matters.
A noisy ancilla changes the resulting gate channel, and faults in the CNOT, measurement, or conditional correction add their own errors. Distillation improves the input resource under its specified assumptions; it does not certify the rest of the injection circuit. The final gate should be evaluated with the injection operation and its classical branch handling included. A delayed S correction may be tracked in a broader frame for some protocols, but subsequent non-Clifford operations can impose a decision deadline.
Acceptance probabilities compound resource consumption
Suppose a synthetic distillation stage consumes fifteen input states per attempt, returns one state on acceptance, and accepts independently with probability a=0.90. Repeating attempts until acceptance consumes an average of 15/a=16.6667 input states per output. Two such levels consume an average of 225/(a1 a2)=277.7778 raw states per final output when both acceptance probabilities equal 0.90 and all intermediate outputs can be buffered without additional loss.
The denominator is not a1 raised to fifteen. Fifteen accepted first-level outputs are collected, each requiring its own expected number of attempts, and then the second stage may need repetition. Requiring all fifteen first-level attempts to succeed simultaneously without buffering would be a different scheduling policy with a different success probability and wastage. Storage lifetime and factory synchronization determine whether the simple buffered expectation is realistic.
If one factory attempt takes ten microseconds, its average accepted-output rate is 0.90 divided by ten microseconds, or ninety thousand per second. An average demand of one million states per second therefore needs at least twelve such factories by the mean-rate calculation. Twelve provide 1.08 million per second on average. A finite buffer and bursty consumption can still produce stalls, so a mean-rate margin is not a guarantee of deadline satisfaction.
Distillation floors and application-level allocation
Under the illustrative leading cubic map epsilon_out=35 epsilon_in³, epsilon_in=0.01 gives 0.000035. A second ideal stage gives 35 times (0.000035) cubed, or about 1.500625 times 10^-12. If the second stage's protected circuit contributes an additional 10^-8 error, the total is dominated by that circuit term. More raw-state distillation at the same supporting quality does little to remove the dominant contribution.
For an application using one billion injected states, a union-bound allocation of 0.001 total failure to this resource requires each injection to contribute at most 10^-12 on average under that conservative accounting. A resource state at 1.5 times 10^-12 already exceeds that particular allocation before injection faults are added. The target must be divided among raw-state residual error, distillation circuits, transport, storage, and injection itself. These numbers are synthetic application assumptions, not a forecast for any algorithm or hardware platform.
Correlations further change the interpretation. A rare correlated input pattern that passes a protocol's checks can contribute at its own event probability, rather than at the product of independent single-input probabilities. For instance, if a particular undetected multi-input fault occurs with probability c because of a common preparation error, its contribution cannot be estimated by epsilon cubed unless the model actually makes that joint event third order. Distillation protocols must be matched to the input error structure and validated for relevant common causes.
Enough resources across the day may still be too late
A quantum computation may need a special resource in bursts while its production machinery works at a steadier pace. Total production can exceed total demand and still fail to serve the schedule, because the resource arrives after the moment it was needed. A supply-rate number by itself cannot settle that timing question. The constructed schedule treats production and demand as tokens at discrete boundaries. Three slots have no production, and repeated demand bursts create deficits. The smallest initial reserve is determined by the deepest cumulative deficit. After adding that reserve, the highest resulting inventory gives a boundary-capacity requirement. This makes two design questions visible: how much stock must exist before the computation starts, and how much can accumulate later. If the tokens represent quantum states, the classical balance is only a first layer. States may age, occupy protected qubits, fail a quality test or be consumed by failed operations. The example therefore belongs beside a resource factory explanation with its scope stated clearly. It offers an exact demand-planning calculation without implying that quantum states are interchangeable durable objects in a warehouse.
Model: Cumulative net supply at slot t = sum_{i<=t}(supply_i-demand_i); Minimum initial reserve = max(0, -minimum cumulative net supply); Boundary capacity = maximum(initial reserve + cumulative net supply), including time zero Assumptions: Supply and demand are netted simultaneously at each boundary. Stored tokens neither expire nor lose quality in this calculation. All requested tokens have the same resource meaning.
The stated burst demand is added to base demand every fourth slot, giving demand 20 in those slots. Supply and demand are netted simultaneously at each slot boundary.
The toy schedule needs 5 stored tokens before it begins, even though net production across the campaign is 15. A reserve addresses timing, not state quality. If tokens represent prepared quantum resources, finite storage lifetime and extra storage qubits require a separate physical model.
Limitations: Continuous-time ordering within a slot can require a different capacity. A reserve does not solve finite coherence or storage error.
| Quantity | Value |
|---|---|
| Supply per slot | 10 |
| Base demand per slot | 5 |
| Burst demand | 15 |
| Burst period | 4 |
| Schedule slots | 30 |
| Zero-supply slots, one-based | 10,11,20 |
| Calculated quantity | Synthetic result |
|---|---|
| Total produced tokens | 270 |
| Total requested tokens | 255 |
| Minimum initial reserve | 5 |
| Required capacity at slot boundaries | 25 |
| Final inventory with that reserve | 20 |
| Supply-minus-demand over campaign | 15 |
| Slot | Supply | Demand | Inventory with reserve |
|---|---|---|---|
| 1 | 10 | 5 | 10 |
| 2 | 10 | 5 | 15 |
| 3 | 10 | 5 | 20 |
| 4 | 10 | 20 | 10 |
| 5 | 10 | 5 | 15 |
| 6 | 10 | 5 | 20 |
| 7 | 10 | 5 | 25 |
| 8 | 10 | 20 | 15 |
| 9 | 10 | 5 | 20 |
| 10 | 0 | 5 | 15 |
| 11 | 0 | 5 | 10 |
| 12 | 10 | 20 | 0 |
| 13 | 10 | 5 | 5 |
| 14 | 10 | 5 | 10 |
| 15 | 10 | 5 | 15 |
| 16 | 10 | 20 | 5 |
| 17 | 10 | 5 | 10 |
| 18 | 10 | 5 | 15 |
| 19 | 10 | 5 | 20 |
| 20 | 0 | 20 | 0 |
| 21 | 10 | 5 | 5 |
| 22 | 10 | 5 | 10 |
| 23 | 10 | 5 | 15 |
| 24 | 10 | 20 | 5 |
| 25 | 10 | 5 | 10 |
| 26 | 10 | 5 | 15 |
| 27 | 10 | 5 | 20 |
| 28 | 10 | 20 | 10 |
| 29 | 10 | 5 | 15 |
| 30 | 10 | 5 | 20 |
Media reference: Accepted-state production in a hypothetical batch
Consider independent preparations accepted with probability 0.2, with identical quality conditions for every accepted state. One hundred attempts produce 20 accepted states on average, but the binomial standard deviation is sqrt(100×0.2×0.8)=4. Reaching 100 accepted states one attempt at a time has mean attempt count 100/0.2=500 and variance 100(1-0.2)/0.2^2=2000. Five batches of 100 therefore provide the required number only on average; they do not guarantee a supply of 100. A factory comparison also needs accepted-state error, attempt duration and physical resources. These are invented reference parameters, not a claim about a named processor.
Sources
Verification scope
Citation identity checked ·
Ideal Clifford-operation assumptions; hardware cost needs a separate noise model.
Verification scope
Stabilizer Codes and Quantum Error Correction
Daniel Gottesman · · Thesis · Preprint recorded · arXivCitation identity checked ·
Stabilizer algebra and fault-tolerance foundations; no current experimental ranking.
Verification scope
Citation identity checked ·
Architecture and surface-code tutorial; numerical thresholds remain model-specific.