Yes, lucky and some hard work.
I wonder how "quantum" data will be checked and corrected, since you won't know what it is supposed to be since you haven't looked at it yet...
You smart guys always put me to shame:
https://en.wikipedia.org/wiki/Quantum_error_correction
"Classical error correcting codes use a
syndrome measurement to diagnose which error corrupts an encoded state. We then reverse an error by applying a corrective operation based on the syndrome. Quantum error correction also employs syndrome measurements.
We perform a multi-qubit measurement that does not disturb the quantum information in the encoded state but retrieves information about the error. A syndrome measurement can determine whether a qubit has been corrupted, and if so, which one.
What is more, the outcome of this operation (the
syndrome) tells us not only which physical qubit was affected, but also, in which of several possible ways it was affected.
The latter is counter-intuitive at first sight: Since noise is arbitrary, how can the effect of noise be one of only few distinct possibilities?
In most codes, the effect is either a bit flip, or a sign (of the
phase) flip, or both (corresponding to the
Pauli matrices X,
Z, and
Y). The reason is that the measurement of the syndrome has the
projective effect of a
quantum measurement.
So even if the error due to the noise was arbitrary, it can be expressed as a
superposition of
basis operations—the
error basis (which is here given by the Pauli matrices and the
identity).
The syndrome measurement "forces" the qubit to "decide" for a certain specific "Pauli error" to "have happened", and the syndrome tells us which, so that we can let the same Pauli operator act again on the corrupted qubit to revert the effect of the error.
The syndrome measurement tells us as much as possible about the error that has happened, but
nothing at all about the
value that is stored in the logical qubit—as otherwise the measurement would destroy any
quantum superposition of this logical qubit with other qubits in the
quantum computer."
Huh?
You can tell if a "bit" is wrong even if you aren't allowed to know what it is (yet).
Nice trick!
I
want one!