5 Logical operators, codes, and distance
The encoded information is acted on by the quotient \(\mathcal{C}(\mathcal{S})/\mathcal{S}\): operators that preserve the codespace, modulo those that act trivially on it.
A Pauli operator is *logical* when it lies in the centralizer definition 26, i.e. it commutes with every stabilizer and therefore maps the codespace to itself.
It suffices to test commutation against a generating set: \(g\) is logical iff it commutes with every generator of \(\mathcal{S}\).
Commuting with \(a\) and \(b\) implies commuting with \(ab\), so the set of elements commuting with \(g\) is a subgroup; if it contains the generators it contains their closure. This is what makes logicality a finite check for every concrete code in chapter 10.
A *nontrivial* logical operator is one that acts on the encoded information rather than fixing it. The predicate has two conditions: \(g\) is in the centralizer, and no element of \(\mathcal{S}\) has the same operator part as \(g\).
The second condition is stronger than the familiar \(g \notin \mathcal{S}\) (which it implies, at \(s = g\)) and is what makes the CSS bridge arguments work: with only the weaker condition, \(g\) could differ from a stabilizer by a phase, which is not a nontrivial action on the codespace.
The two conditions of definition 31 spelled out as a conjunction, which is the form the concrete distance proofs consume.
Definitional.
The second condition of definition 31 is deliberately stronger than the familiar \(g \notin \mathcal{S}\), which it implies by taking \(s = g\): no stabilizer may share the operator part of \(g\). With only the weaker condition a \(g\) differing from a stabilizer by a phase would count as acting nontrivially, and the CSS bridge argument of theorem 63 would fail.
Nontriviality only depends on the underlying subgroup, so it transfers between two stabilizer groups with the same carrier.
Both conditions of definition 31 are stated in terms of the subgroup alone. This lemma is the glue that lets a distance theorem proved against a hand-built stabilizer group be reused for the packaged definition 38, whose generator list is trimmed.
A bundled pair of logical \(\overline{X}\) and \(\overline{Z}\) operators for each of the \(k\) encoded qubits, packaged with the proofs that they are logical, are not stabilizers, and anticommute in the right pattern.
5.1 Packaging a code
A generator list is independent when no generator lies in the group generated by the others. The condition only sees the *set* of generators, so a repeated generator is invisible to it and it cannot tie the length of a list to \(n - k\); presentations (definition 40) use the stronger row independence of the check matrix instead.
If the rows of the check matrix are linearly independent over \(\mathbb {F}_2\) (definition 19) then the generators are independent in the sense of definition 35.
A relation among the generators pushes forward, under the homomorphism definition 14, to a linear relation among the rows of the check matrix. Linear independence of the rows therefore forces the relation to be trivial. This converts a group-theoretic side condition into a rank computation over \(\mathbb {F}_2\).
A stabilizer group \(\mathcal{S}\) has exactly \(2^r\) elements, where \(r\) is the \(\mathbb {F}_2\)-rank of its symplectic image \(\{ \mathrm{symp}(g) : g \in \mathcal{S}\} \) (definition 14).
The symplectic map turns products into sums, so the image of \(\mathcal{S}\) is an \(\mathbb {F}_2\)-subspace. It is injective on \(\mathcal{S}\): if \(g, h \in \mathcal{S}\) have the same symplectic vector then \(gh^{-1} \in \mathcal{S}\) is a scalar \(i^p I\), and \(-I \notin \mathcal{S}\) excludes \(p = 2\) directly and \(p = 1, 3\) because \((\pm iI)^2 = -I\). A subspace of rank \(r\) over \(\mathbb {F}_2\) has \(2^r\) elements.
An \([[n,k]]\) stabilizer code: a stabilizer group \(\mathcal{S}\) (definition 21) with \(k \le n\) and exactly \(|\mathcal{S}| = 2^{n-k}\) elements — and nothing else. The definition mentions no generators, so \(k\) is a property of the group (theorem 39); a choice of logical operators is derived data, bundled separately by definition 43. The type carries \(n\) and \(k\), so instantiating it *is* the theorem that the group encodes \(k\) qubits into \(n\).
Two stabilizer codes (definition 38) on \(n\) qubits with the same stabilizer group encode the same number of logical qubits.
Both groups have \(2^{n-k_1} = |\mathcal{S}| = 2^{n-k_2}\) elements, and \(k_1, k_2 \le n\).
A stabilizer code is a stabilizer group of the right size, and nothing else. Definition 38 mentions no generators, so the number \(k\) of encoded qubits is read off the group itself (theorem 39), and nothing about logical operators enters the definition either.
A presentation of an \([[n,k]]\) code: a list of \(n - k\) phase-zero, pairwise commuting generators whose closure avoids \(-I\) and whose check-matrix rows are linearly independent (definition 19). Row independence rules out a repeated generator, so the length of the list is an honest count.
The generators of a presentation (definition 40) of an \([[n,k]]\) code generate a group with exactly \(2^{n-k}\) elements.
The closure is a stabilizer group: it is abelian because the generators commute, and avoids \(-I\) by assumption. Its symplectic image is the row space of the check matrix, of rank \(n - k\) because the \(n - k\) rows are independent, so theorem 37 gives \(2^{n-k}\) elements.
The soundness map from presentations (definition 40) to stabilizer codes (definition 38): the code whose stabilizer group is the closure of the generators, of size \(2^{n-k}\) by theorem 41. Every concrete code in the library is built this way.
Concrete codes are written down by their generators. Instantiating definition 40 for a concrete family and applying definition 42 is the theorem that the family encodes \(k\) qubits into \(n\): the obligations — generator count, row independence, pairwise commutation, and exclusion of \(-I\) — must all be discharged, and theorem 41 turns them into the size of the group. The independence obligation is row independence of the check matrix rather than definition 35. The latter is a condition on the set of generators, so a list that repeats a generator satisfies it while overstating \(n - k\); independent rows are pairwise distinct, so the length of a presentation is an honest count.
A definition 38 together with \(k\) pairs of logical operators (definition 34), one per encoded qubit, such that the pairs of distinct qubits commute. This is what the constructions that genuinely need a basis consume — logical Clifford actions, the encoding step of code concatenation — while distance (definition 44) lives on the bare code.
A chosen logical basis is layered on top. Its extra obligations are the centralizer and anticommutation conditions on the logical operators, and only the constructions that act on encoded qubits need it; the distance theory of the next section never looks at it.
5.2 Distance
A code *has distance \(d\)* when every nontrivial logical operator (definition 31) has weight at least \(d\), and some nontrivial logical operator has weight exactly \(d\). Both halves matter: the lower bound is the error-correction guarantee, the witness makes the value exact rather than merely a bound.
If a code has distance \(d\) then every nontrivial logical operator has weight at least \(d\); equivalently, no undetectable error of weight below \(d\) exists.
The first projection of definition 44.
An \([[n,k,d]]\) code: a definition 38 bundled with a proof of definition 44. The headline results of this development are inhabitants of this type.
Both halves of definition 44 matter. The lower bound is the error-correction guarantee; the witness of exact weight is what makes the distance a value rather than a bound, and it is usually the easier half to forget.