The Cost of Magic and Magic Resource Theory
Universal quantum computation splits cleanly into two layers, and only one of them is expensive. The Clifford layer — generated by the Hadamard , the phase gate , and CNOT, together with Pauli measurements and stabilizer-state preparation — is, by the Gottesman–Knill theorem, classically simulable in polynomial time. On its own it computes nothing a laptop cannot. Universality demands one ingredient from outside: a single non-Clifford gate, canonically or the Toffoli. The resource theory of magic is the systematic accounting of that missing ingredient. It fixes the Clifford operations and stabilizer states as free — costless, unlimited — and asks how to quantify the magic (non-stabilizerness) that only a non-Clifford resource can supply. The construction runs exactly parallel to entanglement theory. Fix a convex set of free states (the stabilizer polytope, whose vertices are the pure stabilizer states) and a set of free operations (Clifford unitaries, Pauli measurements, partial trace, adjoining stabilizer ancillas). A magic monotone is then any function that is zero on free states and cannot increase under any free operation. Several inequivalent but operationally meaningful monotones coexist — the robustness of magic , the stabilizer extent , the stabilizer fidelity , the stabilizer rank , and, in the phase-space picture, the mana built on discrete-Wigner negativity and the stabilizer Rényi entropies . What makes magic the central quantity of fault tolerance is that the same number reads from both ends. Upward, magic is the fuel of computation: every gate is enacted by injecting and consuming a distilled magic state, so the total magic a circuit needs — measured by its -count — sets the dominant cost of running it. Downward, that identical magic content lower-bounds the classical simulation cost: stabilizer-rank and quasiprobability simulators run in time controlled by or , so a circuit with little magic is classically easy and a magic-rich one is the regime of genuine quantum advantage. Magic resource theory draws the precise, quantitative line between the classically tractable and the truly quantum.
- Clifford gates, stabilizer inputs, and Pauli measurements are classically simulable (Gottesman–Knill), so the power of quantum computation must come from a non-Clifford resource — magic, or non-stabilizerness.
- Magic resource theory designates stabilizer states and Clifford operations as free and measures non-stabilizerness by monotones that cannot increase under any free operation.
- Standard monotones include the robustness of magic , the stabilizer extent and fidelity , the stabilizer rank , the mana (Wigner negativity), and the stabilizer Rényi entropies .
- The single-qubit unit of magic is : , extent , fidelity , and .
- The identical magic content bounds two costs at once: it upper-bounds the fault-tolerant cost to prepare a state (distillation yield) and lower-bounds the classical cost to simulate computing with it (, ).
- Because , stabilizer-rank simulators run in sub- time (), pushing the classical-simulability frontier out to roughly 50 -gates.
- Key idea: Designate stabilizer states and Clifford operations as free; then any function monotone non-increasing under free operations quantifies an irreproducible resource — magic — whose total amount in a state both upper-bounds the fault-tolerant cost to prepare it and lower-bounds the classical cost to simulate computing with it.
Designate stabilizer states and Clifford operations as free; then any function that is monotone non-increasing under free operations quantifies an irreproducible resource — magic — whose total amount in a state both upper-bounds the fault-tolerant resource cost to prepare it and lower-bounds the classical cost to simulate computing with it.
Where this lives today
Magic resource theory stopped being abstract the moment people used it to draw the line quantum advantage must cross. Stabilizer-rank simulators (Bravyi–Gosset) and quasiprobability Monte-Carlo simulators (Pashayan and collaborators) run in time set by or , and they now simulate near-Clifford circuits with roughly 50 non-Clifford gates — precisely locating where classical methods must give out, and providing the honest baseline that any claim of quantum advantage has to beat. On the compilation side, because each consumes a distilled magic state, and magic-state factories dominate the space-time volume of surface-code algorithms, quantifying a target unitary's intrinsic magic yields lower bounds on achievable -count that certify a compilation is optimal. In topological hardware the theory makes a sharp physical prediction: Ising-anyon and Majorana platforms braid to the full Clifford group but produce zero magic, so they need injected magic to become universal, while Fibonacci anyons braid to dense, magical gates and are natively universal — the cost of universality is exactly the cost of supplying the magic braiding cannot make. Most recently, the stabilizer Rényi entropy has crossed into many-body physics and experiment: randomized-measurement protocols on trapped-ion and Rydberg arrays now estimate the magic of prepared states directly, turning non-stabilizerness into a measurable probe of quantum complexity that distinguishes classically spoofable outputs from authentically quantum ones.
The physical picture
Picture the set of all -qubit density matrices as a convex body. Inside it sits the stabilizer polytope , the convex hull of the finitely many pure stabilizer states. Free operations — Cliffords, Pauli measurements, stabilizer ancillas — map this polytope into itself and can never carry a point out of it. Magic is simply how far outside the polytope a state lies, or, for a mixed state, how deep it must be buried before the polytope can contain it. A state grazing a facet is barely magical; a state that forces you to inflate the polytope by a large factor before it fits (large robustness) is highly magical. Every magic monotone is one honest way of turning "distance from the free set" into a number, and different monotones answer different operational questions about that distance.
There is a second picture that makes magic literally a negativity. In odd prime dimension, the discrete Wigner function assigns a quasiprobability to each phase-space point, and the discrete Hudson theorem says a pure state has an everywhere-nonnegative Wigner function if and only if it is a stabilizer state. Magic then is the negativity: a state can fuel non-classical computation only if its Wigner function dips below zero somewhere, and the total negativity (the mana) measures the failure of a positive-quasiprobability classical simulation. The two pictures — geometric distance from the polytope, and negativity of a quasiprobability — are two faces of the one resource. The reason all of this is not bookkeeping for its own sake is that the same magic gauge reads the cost of computation from both directions at once. The second figure is the picture a fault-tolerance architect actually reasons about: a magic-poor circuit is one a classical computer can fake quickly, while a magic-rich circuit is where classical simulation blows up — and the crossover is set by a magic monotone, the stabilizer rank.
The core equations
The whole framework rests on one convex set: the free states. These are the mixed stabilizer states, the convex hull of the pure ones, and everything about magic is measured relative to this polytope.
where: — the set of -qubit (mixed) stabilizer states; — a pure stabilizer state, the simultaneous eigenstate of commuting independent Paulis; — convex hull. Reading: there are pure stabilizer states, a finite set whose hull is a polytope; a state is free precisely when it lies inside it. The first and most operational monotone is the robustness of magic: the minimum total weight of any signed mixture of stabilizer states that reproduces . Negative coefficients are what let the mixture reach outside the polytope, and the price is paid in weight above one.
where: — robustness of magic, with equality iff ; — real, possibly negative, coefficients of a pseudo-mixture; — pure stabilizer states. Reading: is a norm-like distance, it is multiplicative-submultiplicative under tensor products, and controls the sample cost of quasiprobability Monte-Carlo simulation. For pure states a second monotone, the stabilizer extent, is sharper for the fastest simulators. It relaxes the "must be a probability" constraint to a complex-amplitude decomposition and minimizes the squared weight; its reciprocal is the stabilizer fidelity, the largest overlap with any stabilizer state.
where: — stabilizer extent, , multiplicative for states of at most three qubits; — complex amplitudes over (non-orthogonal) stabilizer states; — stabilizer fidelity. Reading: extent equals on the free set and grows with magic; for a single qubit , tying the two together. The most direct simulation-cost monotone is the stabilizer rank: the fewest stabilizer states needed to write exactly. It is exactly for stabilizer states and counts the "quantum branches" a classical simulator must track.
where: — stabilizer rank, iff stabilizer; — number of terms. Reading: a circuit with injected magic states simulates in time , and because one has with . The phase-space route defines magic through a quasiprobability. In odd prime dimension the discrete Wigner function is the finite-field analogue of the continuous one, real and normalized but not always positive.
where: — Wigner quasiprobability at phase-space point ; — phase-space point operator (Hermitian, ); — qudit dimension, odd prime for the cleanest theory. Reading: is a genuine probability distribution exactly when is a stabilizer state; any negative cell is a fingerprint of magic. The mana packages that negativity into an additive monotone — the logarithm of the total mass of the Wigner function.
where: — mana, additive, , iff ; — the sum-negativity. Reading: since , the total mass is , so mana grows monotonically with the negative quasiprobability that any classical Monte-Carlo simulation must fight. For qubits, where the clean Wigner picture fails, a measurable substitute is the stabilizer Rényi entropy, defined from the fourth moments of the Pauli spectrum.
where: — the second stabilizer Rényi entropy, iff stabilizer; — the Pauli strings (phase-free); — Pauli expectation, the Pauli spectrum. Reading: the numbers form a probability distribution ( for pure states), and is its collision (2-Rényi) entropy shifted so that stabilizer states — whose spectrum is flat on a subgroup — read zero; it is estimable from randomized measurements. Finally, the operational meaning of one unit of magic: gate teleportation consumes a single magic state to enact a using only Clifford operations, converting circuit nonlinearity into resource consumption.
where: — the magic state consumed per ; — a computational-basis measurement with outcome ; — a Clifford fix-up conditioned on . Reading: whichever outcome occurs, the net action is the non-Clifford up to a deterministically corrected Clifford, so the only non-Clifford ingredient in the entire machine is the offline magic state itself.
The goal is to show that the robustness of equation (2) satisfies the three defining requirements of a resource measure — it equals one exactly on the free set, it never increases under any free (stabilizer) operation, and it is submultiplicative under tensor products — and then to convert that last property into the concrete statement that a quasiprobability Monte-Carlo simulation of a circuit costs a number of samples scaling as . Everything follows from the convex geometry of the stabilizer polytope, with no appeal to the particular structure of qubits.
Step 1. If it is a genuine convex combination of stabilizer states, all with , so and ; conversely any decomposition forced to carry a negative coefficient has . Why: this is faithfulness — marks the free set exactly, and the excess over one is a pure measure of non-stabilizerness.
Step 2. Let be any stabilizer operation. Because maps each to another element of , applying to an optimal decomposition yields a valid decomposition with the same coefficients. Why: the free operations preserve the frame, so a decomposition of the input is automatically a decomposition of the output.
Step 3. Since this inherited decomposition has the same and the minimization over all decompositions of can only do better, — the monotone axiom. Why: a resource that can be freely created would be worthless; monotonicity is precisely the guarantee that Cliffords cannot manufacture magic.
Step 4. Tensoring optimal decompositions of and gives ; iterating, . A quasiprobability simulator samples stabilizer states with probabilities , and its estimator variance scales with the square of the weight, so the sample count to fixed accuracy grows as . Why: this is the cost of magic seen from the classical side — each magic state multiplies the simulation cost by .
Go deeper · Derivation B · 1 minThe single-qubit magic of the T state
The goal is to compute, exactly and from first principles, the robustness, stabilizer extent, and stabilizer fidelity of the canonical unit of magic , establishing the anchor numbers , , and , and to see why every single-qubit monotone reduces to plain geometry on the Bloch ball, where the six pure stabilizer states sit at the octahedron vertices .
Step 1. The state rotates by about , giving the equatorial Bloch vector , directly above the midpoint of the octahedron edge joining and . Its Bloch norm is , so it lies outside the free polytope. Why: the norm exceeding one is the geometric certificate that carries magic at all.
Step 2. For robustness, use the symmetric signed mixture of the two nearest stabilizer states (Bloch ) with weight each and their opposites with weight each. Matching needs , and trace needs , so and . Why: a negative coefficient is unavoidable, and it is exactly the "pushing past the facet" that robustness charges for.
Step 3. The total weight is , and this symmetric decomposition is optimal, so . More generally, for any single-qubit pure state equals the Bloch norm whenever that exceeds one. Why: this pins the robustness of one to , hence the per-gate Monte-Carlo factor .
Step 4. For the extent, decompose ; matching amplitudes gives , so . The nearest stabilizer state has , and indeed . Why: the extent, not the robustness, sets the sharper stabilizer-rank simulation bound, and its value corrects a common slip — the extent is at least one, never the that a robustness-style number would give.
Go deeper · Derivation C · 1 minNegativity is magic — the discrete Hudson theorem and mana
The goal is to establish, for a single qudit of odd prime dimension , that non-stabilizerness and discrete-Wigner negativity are literally the same thing: a pure state has a nonnegative Wigner function if and only if it is a stabilizer state (the discrete Hudson theorem), and consequently the mana of equation (6) is a bona fide additive magic monotone that lower-bounds the cost of any positive-quasiprobability classical simulation. This is the phase-space counterpart of the polytope picture, and it is what makes "magic equals negativity" a theorem rather than a slogan.
Step 1. By the discrete Hudson theorem (Gross), for odd prime a pure state has for all if and only if is a stabilizer state; the stabilizer states are exactly the nonnegative "delta-like" distributions on phase space. Why: this identifies the free set with the positive-Wigner states, so holds exactly on and nowhere else among pure states.
Step 2. Clifford unitaries act on phase space as affine symplectic maps that merely permute the points ; they therefore permute the values and leave the sum invariant. Why: mana cannot change under Cliffords, the first half of monotonicity — free unitaries move negativity around but never destroy or create it.
Step 3. Pauli measurements and the addition or partial trace of stabilizer ancillas act by nonnegative (stochastic) kernels on the Wigner distribution, which cannot increase total mass; hence is non-increasing under every free operation. Because factorizes over tensor products, . Why: monotonicity plus additivity is what qualifies mana as a resource measure and lets it add up over many copies.
Step 4. A quasiprobability simulator that samples phase-space points pays a cost scaling with the total negativity, i.e. exponentially in ; since , positive-Wigner (zero-mana) inputs are exactly the ones with an efficient positive simulation. Why: this closes the loop — mana simultaneously measures how non-stabilizer a state is and how hard it is to simulate classically by the phase-space method.
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| Stabilizer state | Every monotone takes its free-state value; no magic, classically simulable — even if highly entangled. | |
| Magic state | The canonical single-qubit unit; the -count of a circuit counts how many such units it burns. | |
| Most magical single qubit | The body-diagonal -type state maximizes single-qubit robustness; single-qubit magic is bounded, so magic must be amassed across many gates. | |
| Tensor copies | Stabilizer rank is submultiplicative; gives the sub-exponential exponent . | |
| Odd prime dimension | Discrete Hudson theorem: magic is exactly Wigner negativity, and positivity certifies an efficient classical simulation. | |
| Asymptotic distillation | Any additive monotone caps the clean-per-noisy yield, a fundamental limit on distillation rate. |
Worked examples
1 · A full magic audit of the T state (fully worked)
Compute the four standard magic numbers of : its robustness, extent, stabilizer fidelity, and second stabilizer Rényi entropy, and say what each one buys operationally.
Step 1. Bloch vector. has , , , so with norm . Robustness for a single qubit equals the Bloch norm above one, so , and the Monte-Carlo cost per is .
Step 2. Stabilizer fidelity. The nearest stabilizer state is : . The magic state overlaps the free set by — close, yet provably outside it.
Step 3. Extent. Decomposing gives , so , and consistently (since ). The extent, not the robustness, sets the sharper stabilizer-rank simulation bound.
Step 4. Stabilizer Rényi entropy. The Pauli spectrum is , so and bits. All four agree that is genuinely, and modestly, magical: , , , .
2 · Where the classical-simulability frontier falls
A near-Clifford circuit contains -gates. Estimate the classical simulation cost by the robustness (Monte-Carlo) route and by the stabilizer-rank route, and locate the frontier beyond which each becomes infeasible at a -operation budget.
Step 1. Robustness route. The sample count scales as . Setting gives a frontier at -gates for the Monte-Carlo method — and with a realistic accuracy prefactor, closer to .
Step 2. Stabilizer-rank route. The cost scales as with from . Setting gives in principle; memory for the stabilizer terms is the true limiter, which in practice caps demonstrations near –.
Step 3. Compare at . Robustness needs samples — borderline infeasible; stabilizer rank needs terms — easily feasible. The exponent versus is the whole difference. The magic-controlled exponent, not the raw -count, sets the frontier: sharper monotones (extent, low-rank decompositions) push classical simulation of near-Clifford circuits out to roughly 50 -gates.
Physics of the portrait
Magic resource theory is not one theorem but a convergence: a discrete phase space from quantum foundations, a no-go theorem about classical simulation, and a decade of monotones that turned "non-Cliffordness" into hard numbers.
Origins · 1 minresource theory of magic and how this was discovered
The pieces arrived out of order. In 1987 William Wootters built a discrete Wigner function on a finite phase space, giving quantum states over qudits a quasiprobability picture with a distinctly quantum feature — the distribution could go negative. A decade later Daniel Gottesman, sharpening an observation of Emanuel Knill, proved that Clifford circuits on stabilizer states are classically simulable, quietly establishing that the cheap half of a quantum computer is powerless by itself. The two threads met in 2006 when David Gross proved the discrete Hudson theorem: for odd prime dimension, a pure state has a nonnegative Wigner function exactly when it is a stabilizer state — so negativity and non-stabilizerness are the same property. Victor Veitch, Christopher Ferrie, David Gross and Joseph Emerson made this a resource theory (2012), and with Nima Mousavian and Gottesman (2014) named its central additive monotone, the mana. The operational monotones followed fast: Mark Howard and Earl Campbell's robustness of magic (2017) tied non-stabilizerness directly to a simulation-sample count; Sergey Bravyi, Graeme Smith and John Smolin, then Bravyi, David Gosset and collaborators, turned stabilizer rank and extent into practical simulators reaching tens of -gates; and Lorenzo Leone, Salvatore Oliviero and Alioscia Hamma introduced the stabilizer Rényi entropy (2022), a magic measure you can actually estimate in the lab. What began as a curiosity about which circuits a laptop can fake became the ruler that measures the cost of every quantum computation.
Going further
Texts and papers. Nielsen & Chuang, Quantum Computation and Quantum Information, §10.5–10.6 (stabilizer formalism, Gottesman–Knill) · Preskill, Lecture Notes on Quantum Computation, ch. 7 · Watrous, The Theory of Quantum Information (channels and convex structure) · Gottesman & Chuang, Nature 402, 390 (1999) — gate teleportation · Bravyi & Kitaev, Phys. Rev. A 71, 022316 (2005) — magic states and distillation · Gross, J. Math. Phys. 47, 122107 (2006) — discrete Hudson theorem · Veitch, Mousavian, Gottesman & Emerson, New J. Phys. 16, 013009 (2014) — resource theory of stabilizer computation · Howard & Campbell, Phys. Rev. Lett. 118, 090501 (2017) — robustness of magic · Bravyi, Smith & Smolin, Phys. Rev. X 6, 021043 (2016); Bravyi, Browne, Calpin, Campbell, Gosset & Howard, Quantum 3, 181 (2019) — stabilizer rank and extent · Leone, Oliviero & Hamma, Phys. Rev. Lett. 128, 050402 (2022) — stabilizer Rényi entropy. The anchor numbers for can be recovered directly: follows from the symmetric pseudo-mixture together with the single-qubit identity ; the extent and fidelity satisfy (note that the occasionally cited value cannot be the extent, since always); comes from the Pauli spectrum ; the mana identity and the discrete Hudson theorem underpin the phase-space picture; gives the exponent ; and the Monte-Carlo scaling follows from the robustness monotone. The body-diagonal with has , the single-qubit maximum.
Prerequisites. Stabilizer Formalism and Gottesman–Knill · Clifford Group · Magic State Distillation · Measurement-Based Quantum Computation. Leads to. Magic State Distillation · Topological Quantum Computation · Fibonacci and Ising Anyons · Classical Simulation of Quantum Circuits.
Ask the tutor: Ask me to re-derive and from the Bloch geometry, or to estimate the classical-simulation frontier for a circuit with a -count of your choosing.
What exactly is "magic," and why call it that?
Magic is non-stabilizerness — the property of a quantum state that cannot be created by Clifford gates, Pauli measurements, and stabilizer inputs alone. Geometrically it is the state's distance from the stabilizer polytope; in phase space it is the negativity of the discrete Wigner function. The name comes from Bravyi and Kitaev's "magic states," the resource that has to be injected because the free operations cannot produce it. It is called a resource in the technical sense of resource theory: fix what is free, and whatever is left over that cannot be freely made is the resource, quantified by monotones that free operations cannot increase.
Why are there so many different magic monotones instead of one?
Because different operational questions have different answers. The robustness controls the sample cost of quasiprobability Monte-Carlo simulation (as ); the stabilizer rank and extent control exact low-rank simulation; the mana controls the phase-space method in odd dimension; the stabilizer Rényi entropy is the one you can actually measure in an experiment. They all vanish on the free set and all respect monotonicity, but they are genuinely inequivalent — two states can be ranked oppositely by two of them — so "how much magic" only has a definite answer once you say for what purpose.
Is magic the same as entanglement?
No, and the cleanest proof is a counterexample in each direction. A large GHZ or cluster state is maximally entangled but is a stabilizer state, so it has exactly zero magic and is simulated efficiently by Gottesman–Knill. A single has no entanglement at all — it is one qubit — yet it is a full unit of magic and is the resource that makes universal computation possible. Entanglement can be created freely by Cliffords (CNOTs make Bell and GHZ states), so it is not the thing that costs; non-stabilizerness is. The two are independent axes of "quantumness."
How does magic bound classical simulation cost from below?
The free operations — Cliffords, Pauli measurements, stabilizer inputs — are efficiently classically simulable by construction (that is the Gottesman–Knill theorem). So the only thing that can make a circuit classically hard is the non-Clifford resource injected into it, and a magic monotone measures exactly that resource. Concretely, a circuit with magic states simulates in time controlled by the magic of those states: for the Monte-Carlo method, for the stabilizer-rank method. Zero magic means polynomial time; more magic means a provably larger simulation cost.
Why does the discrete Hudson theorem need odd dimension?
The clean statement "nonnegative Wigner function iff stabilizer state" holds for odd prime because the phase-space construction there is well behaved: the point operators form a nice frame and the Cliffords act as honest phase-space symplectic maps. For qubits () the discrete Wigner function has known pathologies — contextuality obstructs a fully faithful nonnegative representation, and some stabilizer states can show negativity in naive constructions. That is exactly why the qubit theory leans on the polytope-based monotones (robustness, extent, stabilizer rank) and on the stabilizer Rényi entropy rather than on mana, which is at its cleanest for qudits of odd dimension.
Is the extent of the T state really about 1.17 and not 0.83?
Yes — the extent is , and any value below one would be impossible. The extent over stabilizer decompositions equals exactly one on stabilizer states (write ) and can only grow with magic, so always. The number that sometimes appears is a robustness-flavoured quantity (an excess-over-one), not the extent itself. The direct two-term decomposition gives , and it equals , both comfortably above one.