Let , and write for any odd-weight word . The parity functional on the four-dimensional binary linear code is nonzero, so its kernel has dimension three and its other fibre is the coset . For example belongs to the standard length-seven Hamming code and has odd Hamming weight. Denote the two logical basis states by and , corresponding to these two cosets. The eight computational orthonormal basis vectors in each sum are distinct, so both logical states have norm one; their disjoint supports make them orthogonal.
For a binary vector , define the product of Pauli Z gates
where the dot product is computed modulo two. The key diagonal overlap, with and , is
If , every summand is one. If , choose with . Translation permutes and negates every summand. The sum must then be zero. Thus
Off-diagonal logical overlaps vanish for every :
because a diagonal Pauli operator cannot move a computational basis word from one coset to the disjoint other coset.
The possible errors are and for . Set . Each phase flip is its own adjoint and inverse, so
If , the vector is nonzero and has Hamming weight one or two. By the given dual code identity and the minimum Hamming distance three of the Hamming code, it cannot belong to . Hence all its diagonal logical overlaps vanish. If , the product is the identity and its logical overlaps are . Combining both cases gives
This proves the Knill--Laflamme condition with an identity error-overlap matrix, not merely a possibly degenerate scalar matrix. In particular the eight two-dimensional error subspaces are mutually orthogonal. This is precisely nondegenerate phase-flip correction in the Steane code.
To exhibit recovery rather than only the criterion, let be the orthogonal projector onto the code and . The projective measurement consisting of these eight mutually orthogonal projectors, completed by , determines which error occurred. For an arbitrary encoded pure state affected by , outcome occurs with certainty and leaves unchanged. Applying again recovers . The outcome gives the error syndrome and does not reveal or , so recovery preserves logical quantum superpositions.
An equivalent explicit error syndrome uses three commuting X-type stabilizer generators. Choose a parity-check matrix for with the seven different nonzero binary columns:
Its rows span . For a row , the operator permutes each of and , and therefore has eigenvalue on both logical states. A phase flip at position changes its eigenvalue to , since . Measuring the three commuting stabilizer generators gives the th column of as a binary syndrome; no error gives the zero column. All eight outcomes are different, and applying the identified restores the code state. Measuring these stabilizer generators never distinguishes the two logical states.
Finally, if a noise Kraus operator is a coherent linear combination , the same syndrome measurement separates its mutually orthogonal components . Conditional recovery returns in every nonzero branch. Linearity then also corrects any quantum channel whose Kraus operators lie in this span. The argument therefore corrects arbitrary unknown single-site phase flips nondegenerately, including coherent phase-error amplitudes, rather than only a known error on a basis codeword.