Stabilizer codes: an Abelian S of order 2^a without -1 gives an [[n, n-a, d]] code
OpenQAlgorithms.GottesmanIntro.stabilizerCode_paramsLet be the -qubit Pauli group: the operators with and . The weight of a Pauli operator is the number of its tensor factors different from .
Let be an Abelian subgroup of order with , and let
be its stabilized space. Let be the set of Pauli operators commuting with every element of (the normalizer of in , which equals its centralizer), and suppose
exists (the set is nonempty). Then is an quantum code:
- ;
- every operator acting on at most qubits is detectable, i.e. takes the same value for every normalized ;
- some operator acting on at most qubits is not detectable, so the distance is exactly .
This is the basic theorem of the stabilizer formalism: it reads the parameters of a quantum code off a group of commuting Pauli operators.
Formalization Note The source writes ; taken literally this set always contains (weight ), so, following the standard convention the source cites, Pauli operators equal to a phase times an element of are removed. The minimum is encoded with IsLeast, which also excludes the case where the set is empty and the source's is undefined.
import Definitions.Def_QAlgorithms_Defs_QECC set_option autoImplicit false
namespace QAlgorithms.GottesmanIntro
open Stabilizer
/-- Gottesman intro p.10, Theorem 5: let `S` be an Abelian subgroup of order `2^a` of the
`n`-qubit Pauli group with `−1 ∉ S`, and let `d` be the minimum weight of a Pauli operator in
the normalizer `N(S)` (= the centralizer of `S` in `P_n`, p.10) that is not a phase times an
element of `S`. Then the stabilized space `T(S)` is an `[[n, n − a, d]]` code: it has dimension
`2^(n−a)`, every operator acting on at most `d − 1` qubits satisfies (34) on it, and some
operator acting on `d` qubits does not. The weight of a Pauli operator is the number of
non-identity tensor factors (p.4). The phases `±1, ±i` are removed from `N(S) \ S` since
otherwise `−I` (weight 0) would always lie in it. -/
theorem stabilizerCode_params (n a d : ℕ) (S : Subgroup (Matrix.unitaryGroup (Qubits n) ℂ))
(hS : IsStabilizerGroup S) (hcard : Nat.card S = 2 ^ a)
(hd : IsLeast {w : ℕ | ∃ Q ∈ pauliCentralizer S, Q ∉ phaseMultiples S ∧
∃ P : PauliString n, (Q : Matrix (Qubits n) (Qubits n) ℂ) = P.toMatrix ∧ P.weight = w} d) :
IsQCode n (n - a) d (stabilizedSpace S) ∧ HasDistance (stabilizedSpace S) d := by
sorry
end QAlgorithms.GottesmanIntro
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix natural numbers . Let be the group of unitary complex matrices, with rows and columns indexed by bit strings . Let be a subgroup.
Pauli strings, weight, Pauli group. A Pauli string consists of:
- a phase ;
- factors , where
Its matrix is , with factor acting on qubit . Its weight is the number of positions with ; the phase is ignored.
The Pauli group is the subgroup generated by all unitaries that equal the matrix of some Pauli string.
Hypotheses.
-
is a stabilizer group.
- .
- is abelian.
- No element of equals the matrix .
-
Size of . The cardinality of is . Here the cardinality is a natural number, which would be for an infinite set; this hypothesis forces to be finite.
-
Definition of . is the least element of the set of all for which there is some with:
- and commutes with every element of , i.e. lies in the Pauli group intersected with the centralizer of in ;
- is not of the form with and ;
- equals the matrix of some Pauli string of weight exactly .
"Least element" means and for all . In particular, if is empty this hypothesis cannot be satisfied, and the theorem is vacuous.
The code space. Let
the common eigenspace of .
Supporting notions.
- Acts on at most qubits. A matrix on qubits does this if there is a set of at most wires, and an injective listing of wires all lying in , together with an arbitrary complex matrix , such that
In other words, is on those wires tensored with the identity elsewhere. need not be unitary.
- Detectable. is detectable on if there is one constant with for every unit vector .
Conclusion. Both of the following hold.
- is an code in the following sense:
- , where is truncated subtraction, so it is if ;
- every matrix acting on at most qubits is detectable on , again with truncated subtraction, so when .
- has distance :
- every matrix acting on at most qubits is detectable on ;
- there exists a matrix acting on at most qubits that is not detectable on .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.