Skip to content

Errors and Noise

Real quantum systems are never perfectly isolated. They interact — however weakly — with their environment, and hardware itself is imperfect. Those interactions are noise, and when noise actually changes the quantum information stored in a qubit, that change is an error.

Ideal Qubit
↓ noise
?
  • Noise — an unwanted physical process (stray fields, thermal fluctuations, imperfect control pulses, coupling to the environment).
  • Error — the resulting unwanted change to the quantum information itself.

Not every instance of noise produces a detectable error, and no one has to "apply" anything on purpose — a physical qubit can pick up an error simply by sitting there, or partway through an otherwise-correct operation. This page stays conceptual: we're not modeling any particular hardware's noise yet, just the language for talking about what can go wrong.

Bit-Flip Error (X)

The easiest error to picture is a bit flip, written \(X\): it swaps \(|0\rangle\) and \(|1\rangle\).

\[ X|0\rangle = |1\rangle \qquad X|1\rangle = |0\rangle \]
|0⟩

Flip the qubit and watch its value swap.

A bit flip changes what you'd measure — the value itself swaps.

Phase-Flip Error (Z)

The less intuitive error is a phase flip, written \(Z\):

\[ Z|0\rangle = |0\rangle \qquad Z|1\rangle = -|1\rangle \]

A phase flip does not necessarily change what you'd measure in the computational basis — it changes the relative phase between \(|0\rangle\) and \(|1\rangle\) in a superposition. That's invisible if you're only looking at "is it 0 or 1?", so it's easiest to see on the Bloch sphere, where phase shows up as a rotation around the pole axis rather than a jump between poles.

|ψ⟩ = |+⟩

Same point on the equator — same measurement odds — different side.

Why is this an error if the measurement still gives 0 or 1?

Phase doesn't show up in a single computational-basis measurement — but it controls how quantum states interfere in later steps of a computation. An algorithm that relies on interference to amplify the right answer can be silently thrown off by a phase flip, even though no individual measurement would look wrong at the time it happened.

Y Error — Combining the Two

The third Pauli error, \(Y\), combines both behaviors:

\[ Y = iXZ \]

You don't need to work through that algebra to get the idea:

Error Effect
\(X\) bit flip
\(Z\) phase flip
\(Y\) bit flip and phase flip

Which Operation Was Applied?

Given a starting state, one of \(X\), \(Z\), or \(Y\) is simulated at random. This lets you practice recognizing each error's signature in a controlled setting where the outcome is shown to you for learning purposes.

Important

This visualization lets you see the simulated effect of an error. In a real quantum system, you cannot simply measure an unknown qubit to reveal which error occurred without potentially disturbing the quantum information.

  • Measuring a qubit in the computational basis can reveal information about its state.
  • It does not directly reveal an arbitrary \(X\), \(Z\), or \(Y\) error.
  • Directly measuring the encoded quantum information can destroy the information we are trying to protect.
  • Quantum error correction instead uses carefully chosen syndrome measurements to obtain information about errors without directly measuring the logical state.

Below, "value" and "phase" are simulated readouts for the purpose of this exercise — a bit flip changes the value, a phase flip changes the phase, and \(Y\) changes both.

Initial state:

Value 0 Phase +

Simulated result:

Value ? Phase ?

Connecting Back to the 3-Qubit Example

Remember the repetition-code example from Physical vs Logical Qubits?

\[ |0\rangle_L \rightarrow |000\rangle \qquad |1\rangle_L \rightarrow |111\rangle \]

What happens if one physical qubit experiences an \(X\) error? Something like:

\[ |000\rangle \rightarrow |010\rangle \]

The middle qubit disagrees with the other two — a pattern we could, in principle, use to catch and undo the error. But what about a \(Z\) error?

A phase flip on one of the three physical qubits doesn't change any of their measured values — |000⟩ still measures as 000. The mismatch the repetition code relies on for bit flips simply isn't there for phase flips.

Warning

The simple 3-qubit repetition code you saw earlier protects against bit flips, but not phase flips. Handling both is exactly what Repetition Codes picks up next.

Going Deeper

Beyond X, Y, and Z

Real physical noise is rarely a neat, discrete \(X\), \(Y\), or \(Z\) operation — that's a simplification that happens to be extremely useful. Any single-qubit error can be written as a combination of the four Pauli operators \(I\), \(X\), \(Y\), and \(Z\) (where \(I\) means "no error"), which is what makes X/Y/Z-based error correction so broadly effective even though real noise is messier.

Some of the physical processes that produce these errors have names you may come across later: decoherence, relaxation, and dephasing. We won't build a detailed hardware-noise taxonomy here — that's revisited in Hardware-Aware QEC.

Takeaway

Quantum errors can affect both the value and the phase of quantum information — not just the simple "flip a bit" errors classical error correction deals with. A useful QEC scheme has to protect against more than ordinary bit flips.

We know what can go wrong. Now let's see how encoding can help us detect and correct some of these errors.

Next: Repetition Codes →