|q⟩ Bad Qubits

intermediate · Programming · Quantum Error Detection (Intro)

Why Quantum Errors Are Different

Classical computers crash far less often than you might expect, because the engineers who design them solved the error problem long ago. Flip a bit by accident? A small majority-vote circuit corrects it. Copy a message repeatedly? Bit-for-bit duplication works perfectly. Quantum computers face a fundamentally different situation, and understanding why is the first step toward fixing it.

Classical errors are simple

On a classical bit a single type of error exists: a bit flip (010 \to 1 or 101 \to 0). Errors are discrete — a bit is either wrong or it is not. The standard remedy is redundancy: encode every logical bit as three physical bits (00000 \mapsto 000, 11111 \mapsto 111), then correct by majority vote. If one bit flips you get 010010 and the majority is still 00.

This relies on two quiet assumptions:

  1. You can copy a bit freely.
  2. There are only finitely many distinct errors.

Both assumptions break down for qubits.

The no-cloning theorem

The first roadblock is the no-cloning theorem: it is impossible to build a unitary operation that copies an unknown quantum state.

The argument is short. Suppose a "cloning" unitary UU existed such that Uψ0=ψψU|\psi\rangle|0\rangle = |\psi\rangle|\psi\rangle for every state ψ|\psi\rangle. Apply it to two states ψ|\psi\rangle and ϕ|\phi\rangle:

Uψ0=ψψ,Uϕ0=ϕϕ.U|\psi\rangle|0\rangle = |\psi\rangle|\psi\rangle, \qquad U|\phi\rangle|0\rangle = |\phi\rangle|\phi\rangle.

Take the inner product of both sides. The left side gives ψϕ\langle\psi|\phi\rangle (using 00=1\langle 0|0\rangle = 1). The right side gives (ψϕ)2(\langle\psi|\phi\rangle)^2. So we need

ψϕ=ψϕ2.\langle\psi|\phi\rangle = \langle\psi|\phi\rangle^2.

This equation has only two solutions: ψϕ=0\langle\psi|\phi\rangle = 0 (orthogonal states) or ψϕ=1\langle\psi|\phi\rangle = 1 (identical states). A general pair of states satisfies neither, so no such UU can exist for arbitrary ψ|\psi\rangle.

Errors are continuous

The second difficulty is that quantum errors form a continuous family. A qubit's state lives on the Bloch sphere: any point

ψ=cosθ20+eiϕsinθ21|\psi\rangle = \cos\frac{\theta}{2}|0\rangle + e^{i\phi}\sin\frac{\theta}{2}|1\rangle

is a valid state. A tiny interaction with the environment can rotate the Bloch vector by an infinitesimal angle — error magnitude is not quantized. Naively this seems catastrophic: there are infinitely many distinct errors, and you cannot check which one occurred without disturbing the state.

However, the theory of quantum error correction rescues us through the digitization of errors. Any single-qubit error operator can be written as a linear combination of the four Pauli matrices:

E=α0I+α1X+α2Y+α3Z.E = \alpha_0 I + \alpha_1 X + \alpha_2 Y + \alpha_3 Z.

If a quantum code can detect and correct all three Pauli errors (XX, YY, ZZ) on any one qubit, it automatically handles every error on that qubit — including continuous rotations. The act of measuring the error syndrome (without measuring the logical data) collapses the continuous error into one of the discrete Pauli cases, which the code already knows how to fix.

Two physical mechanisms

In practice, two physical processes corrupt qubits:

The YY error is a combination of both: Y=iXZY = iXZ.

Decoherence

Both mechanisms are aspects of decoherence — the loss of quantum coherence as a qubit becomes entangled with its environment. Two timescales characterize decoherence in a physical device:

State-of-the-art superconducting qubits achieve T1,T2T_1, T_2 on the order of hundreds of microseconds, while a two-qubit gate takes tens of nanoseconds. The ratio tells you roughly how many gates are possible before the qubit has a significant chance of an error — typically a few thousand without error correction, which is why fault-tolerant techniques are necessary for any deep computation.

What makes it solvable

Despite these obstacles, quantum error correction is possible because:

  1. Errors are rare. Physical error rates per gate are small (roughly 10310^{-3} on current hardware). Codes work in regimes where physical errors are below a threshold.
  2. Digitization. Syndrome measurements project continuous errors onto a finite set of Pauli errors, so the correction problem is discrete.
  3. No cloning is not needed. Redundancy is encoded into entangled multi-qubit states, not into copies of single-qubit states. The logical qubit is spread across many physical qubits in a way that lets you detect which one was disturbed without learning the logical information.

The next lesson introduces the first concrete example: the three-qubit bit-flip code.

Sign in on the full site to ask questions and join the discussion.