Learning goals. After this module you should be able to
Define the Clifford group and compute how , , and conjugate Pauli operators, including signs.
Explain why a Clifford unitary is pinned down (up to a global phase) by where it sends , and connect this to symplectic matrices.
Store a stabilizer state as a tableau and update it gate by gate with the bit rules for , and .
Multiply two tableau rows with the correct sign.
State the Gottesman-Knill theorem, explain why it holds, and say what it does not imply.
In Module 4 we turned a stabilizer group into a bit matrix. This module asks what happens to that matrix when we apply gates. For one important family of gates, the Clifford gates, the answer is beautifully simple: each gate shuffles a few columns of bits and maybe flips some signs. That is the whole reason stabilizer codes can be simulated on a laptop with thousands of qubits, and it is the engine inside simulators such as CHP and Stim.
1. Heisenberg picture: track operators, not amplitudes
Suppose a state is stabilized by , meaning . Apply a unitary . Then
so the new state is stabilized by . If has stabilizer group , then has stabilizer group . We never need to touch the amplitudes: we only need to know how transforms Pauli operators.
For this to stay inside the stabilizer world, must again be a Pauli operator. Gates with this property get a name.
2. The Clifford group
Definition 5.1 (Clifford group).
The -qubit Clifford group is the set of unitaries that map Pauli operators to Pauli operators under conjugation:
It is a group (the normalizer of in the unitary group). Global phases are trivially in it, so one usually works modulo global phase.
Three gates do all the work:
(The phase gate is called in some sources, including CHP; we use so that can mean “a Pauli”.) Computing the conjugations directly from the matrices gives the following tables.
and for (control 1, target 2):
input
output
The mnemonic for CNOT: spreads forward (from control to target) and spreads backward (from target to control). Everything else follows by multiplying: e.g. , and , which equals . Among all 16 two-qubit Paulis, and are the only ones whose sign flips.
The controlled- gate, , is symmetric in its two qubits: , , and , are unchanged. It equals .
Not every gate is Clifford. The gate, with , fixes but sends
which is not a Pauli operator. So . This single fact is the boundary between “classically easy” and “universal” at the end of this module.
Theorem 5.1 (Generators of the Clifford group).
Every element of is, up to a global phase, a product of , and gates acting on various qubits (Gottesman 1997). Moreover, such gates always suffice.
We will not prove this theorem; a constructive proof (sweep the tableau column by column with , , until it becomes the identity) is in Aaronson-Gottesman, section VI. For one qubit you can check it by hand: and generate a group of exactly 24 elements modulo global phase, the rotations of a cube that permute the axes of the Bloch sphere.
3. A Clifford is determined by Pauli images
Since conjugation by is multiplicative, , and every Pauli is a product of ‘s and ‘s, it is enough to know the images
Proposition 5.1 (Clifford tableau).
Two Cliffords with the same images (including signs) are equal up to a global phase.
The images must be Hermitian Paulis satisfying the same commutation relations as the inputs: the images of and anticommute iff , and all other pairs commute.
Conversely, every list of Hermitian Paulis satisfying the relations in (2) is the list of images of some Clifford.
The list of images, written as binary rows with sign bits, is called the Clifford tableau of .
Proof
(1) If and have the same images, commutes with every and , hence with every Pauli. The Pauli strings form a basis of all matrices, so commutes with every matrix and is a multiple of the identity (Schur’s lemma, or direct expansion of in the Pauli basis). (2) Conjugation preserves Hermiticity, products, and therefore commutation and anticommutation. (3) is a theorem of Gottesman; Faist’s notes (Thm 5.2.1) give a proof. A counterexample shows why the relations matter: no Clifford can send and , since and commute but and do not.
In binary language, a Clifford acts on Pauli vectors (mod phase) by an invertible linear map with . Preserving all commutation relations means , i.e.
Such form the symplectic group. For one qubit, with row vectors ,
Brute-force enumeration gives (the six permutations of ) and . The symplectic matrix forgets the signs; the signs are restored by multiplying with a Pauli, which is itself a Clifford that only flips signs. Putting the two pieces together, , which is for one qubit and for two.
4. The stabilizer tableau
For simulation we usually care about one state, not about the full unitary. A stabilizer state on qubits needs only generators.
Definition 5.2 (Stabilizer tableau).
The stabilizer tableau of generators ( a Hermitian Pauli string with sign) is the bit array
where row holds the binary vector of and the sign bit . Multiplying one row into another (with the correct sign, see below) or reordering rows changes the description but not the stabilizer group, hence not the state.
X blockZ blocksignx_ijn x n bitsz_ijn x n bitsr_ig_1...g_nrow i: g_i = (-1)^r_i times the Pauli with bits (x_i | z_i)
A column of the block (and the matching column of the block) describes what all generators do on qubit . A single-qubit gate on qubit therefore only touches column of each block plus the sign column; a two-qubit gate touches two columns. That is why gates are cheap: bit operations each.
The initial state has generators , so its tableau is .
5. Update rules
Combining the conjugation tables with the binary representation gives a rule for each gate. The rules are applied to every row of the tableau. Below, are the row’s bits on qubit and is its sign bit; is XOR.
gate
sign update
bit update
swap
,
/ /
/ /
none
The sign is computed from the old bits, before the bit update. These are exactly the rules in Aaronson and Gottesman’s CHP simulator.
Proposition 5.2 (Tableau update rules).
Applying a gate to a stabilizer state replaces each generator by , and in the tableau this is exactly the row update in the table above.
Proof
The bit update is the symplectic matrix of the gate, so it only remains to check signs, one qubit (or qubit pair) at a time, because the gate acts as the identity elsewhere.
: from the table , , . The sign flips exactly when the qubit carries , i.e. .
: , , . Again the sign flips exactly for . The bits: and , both captured by .
: on the pair (control, target), the only inputs whose sign flips are and . In bits, is and is . The expression is 1 iff and , which selects exactly these two inputs.
Paulis: anticommutes with and , i.e. whenever ; similarly for the others.
We also checked all (gate, Pauli, sign) combinations on two qubits against matrix conjugation, and 200 random 30-gate circuits against Stim.
6. Worked example: making a Bell pair, then a phase
Start with and apply , then , then . Rows are listed as .
Example 5.1 (Tableau evolution for a Bell circuit).
: generators , .
swaps column 1 of the and blocks. Row 1 had , no , so no sign change. Generators , : the state .
: and . Row 1 becomes , row 2 becomes . The sign rule needs , which never happens here. Generators , : the Bell state .
: , sign flips if beforehand. Row 1 had , so it becomes , i.e. with sign . Row 2 has and is untouched. Generators , .
The same calculation with one more qubit prepares a GHZ state: , , take to . This is also the encoding circuit of the three-qubit repetition code applied to .
The full Clifford tableau of the Bell circuit. For we can also track the images of and :
The -images are the stabilizers of . The -images and are partners: each anticommutes with exactly one stabilizer. They are called destabilizers, and in Module 6 they will make measurement fast. Stim prints this tableau directly: stim.Tableau.from_circuit(stim.Circuit("H 0\nCNOT 0 1")) has x_outputs +Z_, +_X and z_outputs +XX, +ZZ (Stim numbers qubits from 0 and writes _ for ).
Proving gate identities with tableaus. Because a Clifford is fixed by its images (Proposition 5.1), two Clifford circuits are equal up to phase iff their tableaus agree. For example, conjugate the four generators through (rightmost gate first):
input
after
after
after
The last column is the tableau of : spreads from qubit 2 to qubit 1 and from qubit 1 to qubit 2. Hadamards reverse the direction of a CNOT.
7. Multiplying rows with the right sign
Gaussian elimination on a tableau (needed for measurements in Module 6) multiplies one generator into another. The bits simply add, but the sign needs care because single-qubit products produce factors of : , , and so on.
Proposition 5.3 (Phase of a product of Pauli rows).
For single-qubit Paulis with bits and , define
Then , where is the Hermitian Pauli with bits . For two commuting -qubit rows and with signs , the product has sign bit
Proof
The single-qubit formula is a 16-entry table that one checks directly: for example gives , and gives . An -qubit product is the tensor product of single-qubit products, so its phase is , times the two signs . Because the two rows commute, the total phase is real, so the exponent is or .
This is the rowsum subroutine of Aaronson and Gottesman. It costs .
8. The Gottesman-Knill theorem
We now have everything to state why stabilizer circuits are classically easy.
Theorem 5.2 (Gottesman-Knill).
Consider a quantum circuit on qubits that
starts in ,
applies Clifford gates (, , , and anything built from them),
measures Pauli operators (for example single qubits in the basis), and
may choose later Clifford gates based on earlier measurement outcomes.
Then a classical computer can sample the measurement outcomes with exactly the right probabilities, using time polynomial in and the number of gates. With the Aaronson-Gottesman tableau, each gate costs , each measurement , and the memory is bits.
Proof
Keep a stabilizer tableau of the current state. Step 1 is the tableau . Each Clifford gate in step 2 is a product of , , (Theorem 5.1), and each of these updates the tableau in by Proposition 5.2. For step 3, Module 6 shows that a Pauli measurement on a stabilizer state either has a deterministic outcome, read off from the tableau, or a uniformly random one, after which the tableau is updated by row operations; both take polynomial time. Step 4 is ordinary classical control flow.
What the theorem does not say.
It does not make quantum computing easy. Clifford circuits are not universal. Adding a single non-Clifford gate such as (or, equivalently, a supply of “magic states”) gives a universal gate set, and the best known classical simulations then cost time exponential in the number of gates.
Entanglement is not enough for a quantum speedup. Clifford circuits create Bell pairs, GHZ states, and the highly entangled codewords of the toric code, and still run teleportation and superdense coding, yet are efficiently simulable.
It is not even fully classical-universal. Aaronson and Gottesman showed that simulating stabilizer circuits is complete for the complexity class (parity-L), believed to be weaker than general polynomial-time classical computation.
Why this matters for error correction. Encoders for stabilizer codes, syndrome-extraction circuits, and Pauli noise channels are all Clifford (or mixtures of Paulis). So we can simulate a full surface-code memory experiment with hundreds of qubits and millions of shots, which is exactly what Stim does for Module 9 and onwards. The non-Clifford part of a fault-tolerant computer, such as magic-state injection, is precisely the part that does not show up in these memory benchmarks.
Summary
The Clifford group (Definition 5.1) maps Paulis to Paulis; it is generated by , , (Theorem 5.1). is not Clifford.
A Clifford is determined up to phase by the images of and (Proposition 5.1). Mod signs these images form a symplectic matrix, .
A stabilizer state is stored as an tableau (Definition 5.2). Gates update one or two columns and the sign bit of every row (Proposition 5.2).
Row multiplication needs the phase function (Proposition 5.3).
Gottesman-Knill (Theorem 5.2): Clifford circuits with Pauli measurements are efficiently classically simulable, which is the reason QEC experiments can be simulated at scale.
Further reading
D. Gottesman, “The Heisenberg representation of quantum computers,” arXiv:quant-ph/9807006 (1998).
S. Aaronson and D. Gottesman, “Improved simulation of stabilizer circuits,” Phys. Rev. A 70, 052328 (2004), arXiv:quant-ph/0406196, sections II-III and VI.
J. Dehaene and B. De Moor, “Clifford group, stabilizer states, and linear and quadratic operations over GF(2),” Phys. Rev. A 68, 042318 (2003), arXiv:quant-ph/0304125.
C. Gidney, “Stim: a fast stabilizer circuit simulator,” Quantum 5, 497 (2021), arXiv:2103.02202.