Computing Library › Quantum Error Correction
Quantum Error Correction

The Seven-Qubit Steane Code

The Steane code encodes one logical qubit in seven physical qubits using the classical Hamming code twice, and supports transversal Clifford gates.

A CSS code from Hamming

Andrew Steane's code is the [[7,1,3]] CSS code built from the classical [7,4,3] Hamming code. It uses the same parity-check matrix for both X-type and Z-type stabilizers, which is allowed because the Hamming code contains its own dual. This double use of one classical code is what makes the Steane code compact and symmetric.

It has six stabilizer generators, three of X type and three of Z type, each supported on four of the seven qubits following the rows of the Hamming parity-check matrix:

Kronos motion — classical vs quantum

Correcting any single-qubit error

Because it has distance 3, the Steane code corrects any single-qubit error. The three X-checks produce a 3-bit syndrome that points directly at the location of a Z error, exactly like Hamming decoding, and the three Z-checks locate an X error the same way. A Y error trips both syndromes.

Transversal gates

The Steane code's great practical virtue is that the full Clifford group is transversal. Applying H to each of the seven qubits performs a logical Hadamard; applying S to each performs a logical phase gate (up to a correction); and a bitwise CNOT between two code blocks performs a logical CNOT. Transversal gates are naturally fault-tolerant because a single faulty gate can corrupt at most one qubit per block.

As the Eastin-Knill theorem requires, no code can have a transversal universal gate set, so the Steane code still needs magic state distillation for the non-Clifford T gate. Even so, its transversal Cliffords and clean structure make it a favorite for illustrating fault-tolerant protocols and small-scale experiments.