The [[4,2,2]] code encodes 2 logical qubits into 4 physical qubits and can detect (but not correct) any single-qubit error. The stabilizers are XXXX and ZZZZ. Syndrome measurement: s₁=X₁X₂X₃X₄, s₂=Z₁Z₂Z₃Z₄. A non-trivial syndrome (s≠+1) signals an error. Single-qubit errors give s₁=-1 or s₂=-1 (or both). Two-qubit errors can be undetected (logical errors).