Bit-flip and Phase-flip Sensitivity

qc/noise

The same measurement can be “blind” to certain errors and highly sensitive to others — it all depends on which basis you measure in relative to what the error actually does.

The core intuition

  • A bit flip swaps the roles of and — this is exactly what does.
  • A phase flip flips the sign of the component without touching the / labels — this is exactly what does: , .

A Z-basis measurement only cares about vs — a sign flip on changes nothing observable there. That’s why a pure error is invisible to a computational-basis measurement.

But and differ only by that same sign:

So — the same sign flip that was invisible in the Z basis becomes a fully distinguishable outcome in the X basis. Measuring in a different basis turns invisible phase information into visible which-outcome information.

Two complementary experiments (built on the repeated-X circuit)

Experiment A — bit-flip test: start at , apply x gates, measure in Z-basis. Sensitive to / errors, blind to pure .

Experiment B — phase-flip test: prepare (via H), apply x gates, then apply another H before measuring (this rotates the X-basis question into a Z-basis measurement). Sensitive to / errors, blind to pure (since ).

def repeated_x_meas_x_circuit(n):
    qc = QuantumCircuit(1, 1)
    qc.h(0)
    for _ in range(2 * n):
        qc.x(0)
    qc.h(0)          # rotate back before measuring — the "Hadamard sandwich" trick
    qc.measure(0, 0)
    return qc

The “Hadamard sandwich” — one H to enter a different basis, one H at the end to rotate back before a standard measurement — is a general technique for measuring in any basis, not just this experiment.

Self-Check

  • Could you explain why a pure Z error is invisible to a Z-basis measurement?
  • What does the “Hadamard sandwich” trick actually accomplish, and why does it work?
  • Why does a phase flip become visible in the X basis when it was invisible in the Z basis?