Skip to main content
KetQat

Appearance

Theorem · intermediate

Gottesman–Knill theorem

A quantum circuit that starts in a computational basis state and uses only Clifford gates, Pauli measurements and classical control on measurement outcomes can be simulated by a classical computer in time polynomial in the number of qubits and gates.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Let a circuit on nn qubits begin in ∣0⟩⊗n\ket{0}^{\otimes n} and consist of mm operations, each a Clifford gate on at most two qubits, a measurement of ZZ on one qubit, or a Clifford gate applied conditionally on earlier outcomes. Then a classical algorithm samples the outcomes of all measurements with exactly the probabilities given by quantum mechanics, using O(n)O(n) elementary operations per gate and O(n3)O(n^3) per measurement, so O(mn3)O(m n^3) in total.

At every stage the state is a stabilizer state: the unique state fixed by an abelian group S≤PnS \le \mathcal{P}_n with nn independent generators and −I∉S-I \notin S (a stabilizer code with k=0k = 0). The algorithm stores the nn generators as a binary n×2nn \times 2n matrix with nn sign bits, the stabilizer tableau, and every measurement outcome is either deterministic or uniformly random.

The theorem is due to Gottesman, who credits Knill (Gottesman); it is section 10.5.4 of Nielsen and Chuang. Aaronson and Gottesman add the nn destabilizer generators to the tableau, which removes the Gaussian elimination and brings the cost of a measurement down to O(n2)O(n^2) at the price of doubling the storage. They also show that simulating stabilizer circuits is complete for the classical complexity class ⊕L\oplus\mathrm{L}, so it is believed to be strictly weaker than general polynomial-time classical computation.

Holds when

  • The circuit acts on nn qubits initialised in ∣0⟩⊗n\ket{0}^{\otimes n}.
  • Its operations are Clifford gates (HH, SS, CNOT, or any gate given by its action on Pauli operators), measurements of single-qubit ZZ (equivalently, of any Pauli operator), and gates chosen as functions of earlier outcomes.
  • Simulation means sampling the joint distribution of measurement outcomes exactly, given access to unbiased random bits.

Proof

Proof of the Gottesman–Knill theoremMachine-checked

Stabilizer states are determined by their generators. If SS is abelian, −I∉S-I \notin S and SS has nn independent generators, the dimension theorem with k=0k = 0 says that SS fixes a one-dimensional subspace, so it determines a unique state ∣ψS⟩\ket{\psi_S} up to phase. Moreover the normalizer equals ⟨iI⟩S\langle iI \rangle S: in the binary representation, the span S\mathcal{S} of the generators is isotropic of dimension nn, and S⊥s\mathcal{S}^{\perp_s} has dimension 2n−n=n2n - n = n and contains S\mathcal{S}, so S⊥s=S\mathcal{S}^{\perp_s} = \mathcal{S}. Hence a Pauli operator that commutes with all of SS is λs\lambda s for some s∈Ss \in S, and since −I∉S-I \notin S only one of ±s\pm s lies in SS.

Initial state. ∣0⟩⊗n\ket{0}^{\otimes n} is stabilized by Z1,…,ZnZ_1, \dots, Z_n.

Gates. If g∣ψ⟩=∣ψ⟩g \ket{\psi} = \ket{\psi} then (UgU†) U∣ψ⟩=U∣ψ⟩(U g U\dagg)\, U\ket{\psi} = U \ket{\psi}, so U∣ψ⟩U\ket{\psi} is the stabilizer state with generators UgjU†U g_j U\dagg. These are again Pauli operators, independent and commuting because conjugation is an automorphism. For a gate on at most two qubits, each UgjU†U g_j U\dagg differs from gjg_j only on those qubits and in its sign, and the new entries and sign follow from a fixed table (for HH, SS, CNOT, the table in the Clifford group record). Updating all nn generators costs O(n)O(n).

Measurement of ZaZ_a, random case. Suppose some generator, say g1g_1, anticommutes with ZaZ_a. Multiplying every other generator that anticommutes with ZaZ_a by g1g_1 gives a generating set g1,g2′,…,gn′g_1, g_2', \dots, g_n' of the same group in which only g1g_1 anticommutes with ZaZ_a; this costs O(n)O(n) per generator, O(n2)O(n^2) in all. Then

⟨ψ∣Za∣ψ⟩=⟨ψ∣Zag1∣ψ⟩=−⟨ψ∣g1Za∣ψ⟩=−⟨ψ∣Za∣ψ⟩,\bra{\psi} Z_a \ket{\psi} = \bra{\psi} Z_a g_1 \ket{\psi} = - \bra{\psi} g_1 Z_a \ket{\psi} = - \bra{\psi} Z_a \ket{\psi} ,

so ⟨ψ∣Za∣ψ⟩=0\bra{\psi} Z_a \ket{\psi} = 0 and each outcome (−1)μ(-1)^{\mu}, μ∈{0,1}\mu \in \{0,1\}, has probability 12\tfrac12. The post-measurement state is proportional to 12(I+(−1)μZa)∣ψ⟩\tfrac12 (I + (-1)^{\mu} Z_a) \ket{\psi}. It is fixed by (−1)μZa(-1)^{\mu} Z_a and, because gj′g_j' commutes with ZaZ_a, by every gj′g_j'. These nn operators commute, are independent (the gj′g_j' are independent, and the vector of ZaZ_a is not in their span because ZaZ_a anticommutes with g1g_1 whereas every element of ⟨g2′,…,gn′⟩⊆S\langle g_2', \dots, g_n' \rangle \subseteq S commutes with g1g_1), and their group does not contain −I-I because they fix a nonzero vector. So the simulator draws a fair random bit μ\mu and replaces g1g_1 by (−1)μZa(-1)^{\mu} Z_a.

Measurement of ZaZ_a, deterministic case. Suppose ZaZ_a commutes with every generator. By the first paragraph ϵZa∈S\epsilon Z_a \in S for exactly one ϵ∈{+1,−1}\epsilon \in \{+1, -1\}, so Za∣ψ⟩=ϵ∣ψ⟩Z_a \ket{\psi} = \epsilon \ket{\psi} and the outcome is ϵ\epsilon with certainty; the state does not change. To find ϵ\epsilon, solve ∑jxjvj=ea\sum_j x_j v_j = e_a over F2\F_2 for the binary vector eae_a of ZaZ_a by Gaussian elimination, O(n3)O(n^3) operations, then multiply the generators gjg_j with xj=1x_j = 1 in order, tracking the overall phase; each product of two Pauli operators and its phase costs O(n)O(n), so this step costs O(n2)O(n^2). The resulting product is ϵZa\epsilon Z_a.

Classical control and sampling. A conditional gate is simulated by evaluating the condition on the outcomes already sampled and applying the gate update if required. Processing the operations in order, each measurement outcome is drawn from its exact conditional distribution given all previous outcomes, so the joint distribution of the sampled outcomes is the quantum one. The total cost is O(n)O(n) per gate and O(n3)O(n^3) per measurement.

Measuring a general Pauli operator QQ reduces to the same two cases with QQ in place of ZaZ_a: it is random exactly when QQ anticommutes with a generator. The argument is that of Gottesman, presented as in section 10.5 of Nielsen and Chuang; Aaronson and Gottesman replace the Gaussian elimination by maintaining destabilizer generators, which gives O(n2)O(n^2) per measurement.

Builds on
Part of
Mentioned in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Daniel Gottesman (1998). The Heisenberg Representation of Quantum Computers. arXiv:quant-ph/9807006
  2. Scott Aaronson, Daniel Gottesman (2004). Improved simulation of stabilizer circuits. Physical Review A 70, 052328. doi:10.1103/PhysRevA.70.052328arXiv:quant-ph/0406196
  3. Michael A. Nielsen, Isaac L. Chuang (2010). Quantum Computation and Quantum Information (10th Anniversary Edition). Cambridge University Press. doi:10.1017/CBO9780511976667

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Statement and attribution compared with Gottesman, arXiv quant-ph/9807006, Theorem 1 ('Knill's theorem': Clifford gates, Pauli measurements, classical control, polynomial-time simulation); complexity counts O(n) per gate and O(n^3) per measurement re-derived from the proof record; Aaronson-Gottesman claims (no Gaussian elimination at twice the storage, ParityL-completeness) compared with arXiv quant-ph/0406196 abstract; aaronson-gottesman-2004 metadata compared with Crossref. Nielsen-Chuang is not openly readable, so its section/theorem numbers were not checked.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision cee69b48bb22286b. Source file knowledge/records/theorem/gottesman-knill.md in the content repository (readable there once it is public).