Notes on quantum error correction
A companion to Joschka Roffe's Quantum error correction: an introductory guide, one part per section, in which every state is small enough to draw and every picture responds when you apply an error.
The paper is the best short route from "a qubit cannot be cloned" to the surface code, and it is written so that its examples can be checked by hand. These notes follow its numbering and its examples closely, so that the two can be read side by side, and add the thing a printed page cannot: the amplitudes themselves, drawn as bars and grouped by subspace, together with the circuits that measure them, stepped one gate at a time. The explanations here are my own; equation numbers in the margins refer to the paper.
Parts
- Part 1. Quantum redundancy and stabilizer measurement Roffe §3. The two- and three-qubit codes, codespace and error spaces, the syndrome-extraction circuit, error suppression by detection, and why the code distance of the three-qubit code is 1.
- Part 2. The stabilizer formalism Roffe §4. Stabilizer measurement, the stabilizer group, logical operators, how \(n\), \(k\) and \(d\) are read off the generators, and encoding by projection, with two examples: the \([[4,2,2]]\) detection code, and recovery, degeneracy and concatenation in the Shor \([[9,1,3]]\) code.
- Part 2.5. Tanner graphs Beyond the guide. Checks and qubits as a graph: syndromes light the checks, decoding as a puzzle on the graph, a CSS code as two graphs on one set of qubits, and the grid, face and lattice pictures behind the Shor, Steane and surface codes.
- Part 3. CSS codes Beyond the guide. Codes from two classical codes, separate decoding of \(X\) and \(Z\) errors, and the Steane \([[7,1,3]]\) code, with references.
- Part 4. Quantum LDPC codes Beyond the guide. Sparse checks, the hypergraph product, and belief-propagation decoding with its failure modes, with references.
How the figures work
Circles are qubits and squares are checks. Clicking a qubit applies a Pauli error to it and cycles through the errors that figure allows, typically no error, then \(X\), then \(Z\). Bars are amplitudes: the state is written in the computational basis and each basis state gets a column, drawn upward for a positive amplitude and downward for a negative one, with the columns grouped into the codespace \(\C\) and the error spaces \(\F_i\). Each stabilizer reports its eigenvalue on the current state, \(+1\) or \(-1\), and the syndrome collects those readings as bits. Circuit figures are stepped gate by gate, showing the register after each stage, split by the value of the ancilla.
Nothing is approximated. For the small codes of part 1 the figures keep a real state vector of \(2^N\) amplitudes with \(N \le 5\); syndromes, logical actions and distances are computed in the binary symplectic representation of Pauli operators, which is the calculation the stabilizer formalism asks you to do by hand and which continues to work for the large codes of later parts.
Notation
Single-qubit states are kets, \(\ket\psi = \alpha\ket0 + \beta\ket1\) with \(|\alpha|^2 + |\beta|^2 = 1\). The Pauli matrices are
\[ X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix},\qquad Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix},\qquad\goodbreak Y = iXZ = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}. \]A subscript names the qubit an operator acts on, so \(X_1Z_3\) applies \(X\) to qubit 1 and \(Z\) to qubit 3. Qubits are numbered from 1, as in the paper, and a multi-qubit ket \(\ket{q_1 q_2 \ldots}\) lists them left to right. Encoded, or logical, states and operators carry a subscript or a bar: \(\ket\psi_\L\), \(\bar X\), \(\bar Z\). A code is summarised as \([[n, k, d]]\): \(n\) physical qubits carrying \(k\) logical qubits with distance \(d\).
Colophon
Plain HTML, one stylesheet and four small JavaScript modules; no framework and no build step, so the pages work from a file system, from GitHub Pages, or as a git submodule of another site. MathJax is loaded from a CDN and renders to SVG. Source and issues: github.com/zazabap/qec-note.