The setting
In stabilizer quantum error correction, a codespace on qubits is specified as the joint eigenspace of a list of pairwise commuting Pauli strings. Multiplying the single-generator projections associated with each Pauli string produces a single linear operator on the -qubit state space. When the generators commute pairwise, the range of this product operator coincides with the stabilizer codespace.✦
Pauli strings
The Pauli matrices , , and are the complex matrices indexed by given by (1), where is the imaginary unit: (1)
A single-qubit Pauli operator modulo phase is one of the four symbols , , , or .✦ The single-qubit Pauli matrix assigns a complex matrix to each , sending to the identity matrix , to , to , and to .✦
For a natural number , an -qubit Pauli string is a function assigning a single-qubit Pauli operator to each qubit site .✦ Let denote the -qubit state space of complex-valued functions on computational basis bitstrings . The Pauli string matrix of an -qubit Pauli string is the complex matrix on , indexed by bitstrings , with entries given by (2), where the empty product equals when : (2)✦
Stabilizer codes
Fix a natural number , a sequence of -qubit Pauli strings, and a natural number , and let denote the identity matrix on . The stabilizer codespace is the complex linear subspace of consisting of all state vectors fixed by the first generator matrices, defined by (3): (3)✦
The stabilizer projector is the complex matrix on defined recursively on by (4): (4)✦
The claim
Theorem. Let and be natural numbers, and let be a sequence of -qubit Pauli strings. If the Pauli string matrices and commute for all and , then the range of the linear operator on given by the stabilizer projector equals the stabilizer codespace : (5)✦
What is checked
In the Lean library, the range identity (5) is stated for arbitrary natural numbers and and any sequence of -qubit Pauli strings whose Pauli string matrices commute pairwise on the first indices. The statement is formulated over the stabilizer codespace and the recursively defined stabilizer projector , built from the single-qubit Pauli operators and their matrices , , , and .