Use binary linear codes , with dimensions . For each coset in , define
Representatives of one coset give the same vector, and distinct cosets have disjoint computational supports, so these vectors are orthonormal. Their span is the CSS code , encoding .
For , write and . The code is stabilized by for , because it permutes the sum, and by for , because . These Pauli operators commute: . There are independent stabilizer generators, so their common positive eigenspace has dimension ; it is exactly the span above.
The commuting check measurements separate the two types of error. A bit error changes the signs of the checks by , giving the ordinary syndrome of for . A phase error changes the checks by , giving the syndrome of for the dual code . If corrects bit errors and corrects bit errors, these checks identify the respective patterns, and inverse Pauli operations recover the state without revealing the logical coset. This is the nested-code CSS syndrome recovery procedure.
The sharper distances account for harmless stabilizer errors. A Pauli commutes with every check precisely when and . Among these, it acts as a stabilizer, up to a phase, precisely when and . To justify the latter assertion, with permutes distinct logical cosets, while with has unequal signs on two such cosets. Neither can act as a scalar, and a combined operator has the same nontrivial permutation or phase distinction. For positive logical dimension set
The quantum code distance is : a nontrivial logical Pauli has at least one nonstabilizer component of weight at least the corresponding distance, while a pure or pure logical operator attains the minimum. The weight of counts the union of its supports, so this argument also includes errors.
Here is the correction proof for coherent errors, not only a classical decoding argument. Let be the code projector and let have bit-component weights at most and phase-component weights at most . If and , the corresponding components of have weights below . If this product anticommutes with a stabilizer , then , using . If it commutes with all stabilizers, the weight bounds force its two components into and , so its code compression is a scalar multiple of . Thus the Knill--Laflamme condition holds for the entire error family.
To see directly why this gives a common recovery, diagonalize its positive Gram matrix and form the corresponding error combinations . Their restrictions obey . For , is an isometry onto a syndrome subspace, and the different images are orthogonal. Measure these subspaces and apply the inverse isometry; zero- combinations annihilate the code. This recovers every quantum channel whose Kraus operators lie in the error span. Arbitrary operators supported on at most qubits expand in Pauli operators with the same support. Consequently the CSS code corrects all errors on up to qubits, and more generally the asymmetric family just described. The sufficient classical bound is obtained by replacing by the minimum distances of and , respectively; degeneracy can improve it.