The setting
In the stabilizer formalism of quantum error correction, an -qubit code is specified by a list of commuting Pauli operators whose joint eigenspace forms the codespace. Each independent generator halves the dimension of the state space, so pairwise commuting, independent generators on qubits define a codespace of complex dimension encoding logical qubits. Expressing the generators as -qubit Pauli strings modulo phase allows their independence to be stated directly in terms of binary symplectic vectors over .
Pauli strings
The three Pauli matrices are the complex matrices given in (1), where denotes the imaginary unit: (1)
A single-qubit Pauli operator modulo phase is an element of the four-element set .✦ Its single-qubit Pauli matrix is the complex matrix indexed by defined by (2), where is the identity matrix: (2)✦
For a natural number , an -qubit Pauli string modulo phase is a tuple assigning a single-qubit Pauli operator to each qubit site .✦ Its Pauli string matrix is the complex matrix on the -qubit state space , indexed by computational basis bitstrings , with entries given by (3): (3)✦
Binary symplectic vectors
Each single-qubit Pauli operator has a Pauli -bit and a Pauli -bit , given by (4): (4)
The space of binary symplectic vectors on qubits is the -vector space , whose elements are written with .✦ The symplectic representation of an -qubit Pauli string is the binary symplectic vector whose coordinates at each site are given by (5): (5)
For a sequence of -qubit Pauli strings indexed by and a natural number , the symplectic span of the first generators is the -linear subspace defined by (6): (6)
The stabilizer codespace
For a sequence of -qubit Pauli strings indexed by and a natural number , the stabilizer codespace is the complex linear subspace of consisting of all state vectors fixed by the first Pauli string matrices, as in (7): (7)✦
The claim
Theorem. Let and be natural numbers with , and let be a sequence of -qubit Pauli strings. Suppose that for every , the symplectic representation satisfies , and that for all , the Pauli string matrices and commute. Then the complex dimension of the stabilizer codespace is (8)✦
Because the condition for every expresses -linear independence of the first symplectic vectors, the theorem gives the codespace dimension for any pairwise commuting, linearly independent Pauli string generators.
What is checked
For a natural number , the Lean library defines the Pauli matrices , single-qubit Pauli operators and their single-qubit Pauli matrices, -qubit Pauli strings and their Pauli string matrices on , the Pauli -bit and -bit, binary symplectic vectors in , the symplectic representation, the symplectic span of generators, and the stabilizer codespace. The dimension formula (8) is stated for any natural numbers and any sequence of -qubit Pauli strings whose first Pauli string matrices pairwise commute and whose first symplectic representations satisfy for every .