Every stabilizer code can be put into the standard form (4.3)
OpenQAlgorithms.GottesmanThesis.standardForm_existsConsider a stabilizer code on qubits encoding qubits, described in the binary language: its generators are the rows of the matrix over , where records the parts and the parts (a factor contributes ). Assume the generators commute, i.e. , and are independent, i.e. the rows of are linearly independent over . Let .
Then there exist an invertible matrix (a sequence of generator replacements ) and a permutation of the qubits (applied to the columns of both halves) such that is in the standard form
where the row blocks have heights and , and the column blocks in each half have widths , and ; the blocks are arbitrary.
The standard form is the starting point for the construction of the logical operators and of the encoding network in Gottesman's thesis.
Formalization Note Row operations are modelled by an arbitrary invertible (row additions generate ), and the qubit rearrangement by Matrix.submatrix id σ, so the reachable set is exactly the page's. The rank parameter is the rank of the original , which equals that of the transformed one.
import Definitions.Def_QAlgorithms_Defs_BinaryStabilizer set_option autoImplicit false
namespace QAlgorithms.GottesmanThesis
/-- Gottesman thesis p.39, §4.1 (unnumbered; equations (4.1)–(4.3)): every stabilizer code can
be put into the standard form (4.3). Let `(H_x | H_z)` be the binary generator matrix of `m`
independent commuting generators on `m + k` qubits (rows commute symplectically, eq. (3.23);
rows linearly independent over `F₂`). Then some sequence of generator replacements
`M_i ↦ M_i M_j` (row additions in both halves, i.e. left multiplication by an invertible
`G ∈ GL_m(F₂)`) and some rearrangement of the qubits (the same column permutation `σ` in both
halves) brings it to the standard form (4.3) with `r = rank H_x`: the first `r` rows read
`I A₁ A₂ | B C₁ C₂`, the last `m − r` rows read `0 0 0 | D I E`. -/
theorem standardForm_exists {m k : ℕ} (Hx Hz : Matrix (Fin m) (Fin (m + k)) (ZMod 2))
(hS : IsBinaryStabilizerMatrix Hx Hz) :
∃ G : Matrix.GeneralLinearGroup (Fin m) (ZMod 2), ∃ σ : Equiv.Perm (Fin (m + k)),
IsStandardForm Hx.rank ((G : Matrix (Fin m) (Fin m) (ZMod 2)) * Hx.submatrix id σ)
((G : Matrix (Fin m) (Fin m) (ZMod 2)) * Hz.submatrix id σ) := by
sorry
end QAlgorithms.GottesmanThesis
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix natural numbers and . Let and be matrices over the field . Rows are indexed by and columns by .
Hypothesis. is a binary stabilizer matrix. This means two things:
- Symplectic commutation: over ,
- Independence: the rows of the matrix (columns of followed by columns of ) are linearly independent over .
Conclusion. Let , the rank over of the original . There exist an invertible matrix over and a permutation of the column indices with the following property. Define
The same permutes the columns of both matrices. Then is in standard form with parameter , which means all of the following hold:
- ;
- for and : ;
- for every row and every column : ;
- for and : .
What standard form leaves free. No condition is placed on:
- the entries with and ;
- any row of ;
- the entries of rows of in columns or .
Degenerate case. When there are no rows, and the conditions reduce to .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.