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

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.