Cosmic rays flip bits in my RAM, and the only reason I sleep at night is a few extra check bits. A short comparison with the quantum version, because the ideas rhyme and the difference is instructive.
Classical ECC (Hamming-style). You store data bits plus a few parity bits, each covering an overlapping subset of the data. When one bit flips, some parities no longer match. The pattern of mismatches, the syndrome, points at the position of the flipped bit. Flip it back, done. Single-error correction, double-error detection is the usual memory setup.
The quantum problem. Three obstacles that look fatal at first:
- You cannot copy an unknown quantum state (no-cloning), so "store three copies and vote" is out.
- Measuring the qubit destroys the very superposition you want to protect.
- Errors are not just bit flips. They include phase flips and everything in between, continuously.
The way out. Spread the information of one qubit over several entangled ones, and measure only the syndrome (parity relations between qubits), never the data itself. The syndrome says "something flipped, here", without saying anything about the encoded state.
The toy example is the three-qubit repetition code: encode a|0> + b|1> as a|000> + b|111>. Compare qubits 1-2 and 2-3 by parity (without reading the values) to locate a single bit flip and fix it. This corrects bit flips only. Phase flips need a second layer of the same idea, and real codes combine both.
The consequence: many physical qubits per protected logical qubit, and the overhead is where the engineering fight is. Classical memory gets by with a handful of extra bits for a whole word. Hardware for the quantum case pays much more.
The common thread: do not look at the data, look at the pattern of inconsistencies.