At each qubit, two matrices from either commute or anticommute. Moving every past the corresponding therefore gives
where is the number of positions containing distinct nonidentity Pauli matrices. Thus two Pauli strings always commute or anticommute. If they anticommute and a vector were stabilized by both, then and , contradicting . Their common stabilizer subspace is consequently the zero subspace .
The group average
is Hermitian. In its square, every occurs exactly times among products , and therefore . Moreover for every , so its image lies in the stabilizer subspace , while for every . Thus is the orthogonal projector onto . If are independent generators, expanding the product chooses each element of exactly once and gives the stabilizer-projector formula
A computational-basis vector has eigenvalue under . Simultaneous eigenvalue for , , and therefore requires
The stabilizer subspace is
It is two-dimensional because the three displayed nonidentity stabilizers contain only two independent generators; indeed .
The commuting terms
are independent stabilizer generators. Since , every ground state has . The resulting two-dimensional stabilizer subspace is
the phase-flip repetition code. A convenient pair of logical Pauli operators is
Indeed, they commute with every stabilizer, anticommute with each other, and are not stabilizers.
For phase-flip errors and , the operator entering the Knill--Laflamme condition is and has weight at most . Every nonempty proper product of anticommutes with some unless it is the full logical operator . The Knill--Laflamme conditions therefore hold whenever , and fail once two allowed errors can differ by . Thus
Each physical commutes with all stabilizers, and is a product of stabilizers. Hence every acts on the code as the undetectable logical operator . The code cannot detect, and therefore cannot correct, even a single bit flip.
For a stabilizer group , the orthogonal projector onto its stabilizer subspace is