Stabiliser codes meet Knill–Laflamme: the recovery of a distance-detected error family #
Category: 1-Mathlib (CSD-free; staged for upstream). BACKLOG #14(b), the general half.
QuantumInfo/Stabilizer.lean builds the stabiliser group average P on the register and
QuantumInfo/KnillLaflamme.lean constructs a recovery channel from the condition
P Eᵢᴴ Eⱼ P = cᵢⱼ P. This file connects them for Pauli error families on a stabiliser code:
pauliMat a b— the PauliX^a Z^bas a matrix on the register's coordinates, withpauliMat_mulVecidentifying it withpauliOp; the Pauli group lawpauliMat_mul, the commutation rulepauliMat_comm, and the adjointpauliMat_conjTranspose((X^a Z^b)ᴴ = (−1)^{a·b} X^a Z^b) all transported throughMatrix.ext_of_mulVec;stabMat A B σ— the group average as a matrix; ★isCodeProjector_stabMat(Hermitian: every signed group element is self-adjoint because coherence forcesbdot (B x) (A x) = 0; idempotent bystabProjector_idem),stabMat_ne_zero, and the two-sided absorptiongenMat_mul_stabMat,stabMat_mul_genMat;- ★
stabMat_mul_pauliMat_mul_stabMat_eq_zero— a Pauli anticommuting with a generator is killed by the code:P M P = P (G M) P = −P (M G) P = −P M P; - ★★
stabMat_knillLaflamme— a Pauli error family whose pairwise products are detected (fori ≠ jsome generator anticommutes withEᵢᴴ Eⱼ, i.e. the syndromes differ) satisfies Knill–Laflamme withc = 1: the code is non-degenerate for the family; - ★★
exists_recovery_stabMat— the recovery channel:R (Eᵢ ρ Eᵢᴴ) = ρon every code state, for every error of the family. The Steane instance isEmpirical/QM/QEC/SteaneRecovery.lean.
Honest scope #
⚠️ The detection hypothesis is stated as a syndrome condition on labels, not derived from a
distance: a code of distance d detects every Pauli of weight < d, but "weight" and
"distance" are not defined here. Degenerate families (products in the stabiliser) are covered by
KnillLaflamme.lean but not by this file's c = 1 statement.
References: D. Gottesman, Stabilizer codes and quantum error correction (1997), §3;
Nielsen–Chuang Thm 10.8; QuantumInfo/KnillLaflamme.lean; QuantumInfo/Stabilizer.lean;
specs/BACKLOG.md #14; specs/steane-plan.md.
Matrices from their action #
Pauli matrices #
The Pauli X^a Z^b as a matrix on the register's coordinates:
(X^a Z^b) z w = [w = z + a] · (−1)^{b·w}.
Equations
- QuantumInfo.pauliMat a b z w = if w = z + a then QuantumInfo.pauliSign b w else 0
Instances For
A Pauli is unitary: Eᴴ E = 1.
The stabiliser projector as a matrix #
The signed group element χ(σx) X^{Ax} Z^{Bx} as a matrix.
Equations
- QuantumInfo.genMat A B σ x = QuantumInfo.signChar (σ x) • QuantumInfo.pauliMat (A x) (B x)
Instances For
Coherence at (x, x) forces bdot (B x) (A x) = 0: every group element is Hermitian.
Left absorption: G P = P.
Right absorption: P G = P.
★ The group average is a code projector.
The code is nonzero (independent labels).
Detected Paulis are killed by the code #
★ A Pauli anticommuting with some generator is killed by the code: P M P = 0.
★★ A detected Pauli error family satisfies Knill–Laflamme with c = 1: for i ≠ j some
generator anticommutes with Eᵢᴴ Eⱼ (the labels (aᵢ + aⱼ, bᵢ + bⱼ) pair to 1 with some
generator), so the code is non-degenerate for the family.
★★ The recovery channel of a stabiliser code for a detected Pauli error family: every
error of the family is undone on every code state, R (Eᵢ ρ Eᵢᴴ) = ρ for ρ = P ρ P.