Measuring a data qubit to see whether it flipped would destroy the superposition the code protects. Error correction instead measures *parities*: whether two qubits agree, which is the same for |000⟩ and |111⟩ and so says nothing about the encoded value. A parity check is computed into an *ancilla*, a fresh qubit in |0⟩: a controlled-NOT from each qubit the check compares adds its value to the ancilla, mod 2, and the ancilla is measured. The pair of results, the *syndrome*, names the flipped qubit: for the bit-flip code, 00 is no error, and each single flip gives its own nonzero pattern. This is how larger codes work too. The surface code places data qubits on a grid and measures parity checks between neighbours, over and over, and a *decoder* reads the history of syndromes to find the most likely errors. The engine's research tools hold such decoders: `wai-quantum lab help` lists the error-correction tools.