|q⟩ Bad Qubits

advanced · Physics · Measurement-Based Quantum Computation

Feed-Forward Corrections

Each single-qubit measurement in MBQC leaves a random Pauli byproduct on the qubits downstream. This lesson shows precisely how those byproducts are managed — by adapting later measurement angles (feed-forward) and by tracking the leftover Paulis classically (the Pauli frame) — so that the logical output is deterministic despite the randomness of every individual outcome.

Where byproducts come from

From the elementary gadget, an XX-basis measurement with outcome ss leaves the next wire in

XsHψ,X^{s}\,H\,|\psi\rangle ,

and a tilted measurement at angle ξ\xi leaves XsHRz(ξ)ψX^{s}\,H R_z(\xi)\,|\psi\rangle. The intended gate is always applied; the byproduct XsX^{s} is a known Pauli — known because we recorded the outcome ss. The problem is purely that these byproducts accumulate as we measure along the cluster, and they do not commute with subsequent operations.

The commutation rules that make corrections necessary

Two facts drive everything. First, the byproduct on the qubit about to be measured changes that measurement. Propagating a Pauli through the measurement command gives

MξXs=M(1)sξ,MξZt=Mξ+tπ.M^{\xi} X^{s} = M^{(-1)^{s}\,\xi}, \qquad M^{\xi} Z^{t} = M^{\xi + t\pi}.

So a pending XX byproduct (from outcomes in the set with total parity sXs^X) negates the angle, and a pending ZZ byproduct (parity sZs^Z) shifts it by π\pi. The qubit is therefore measured not at its nominal angle ξ\xi but at the adapted angle

ξ=(1)sXξ+sZπ.\xi' = (-1)^{s^X}\,\xi + s^Z\,\pi .

Choosing ξ\xi' on the fly, conditioned on earlier outcomes, is feed-forward. It is what forces a temporal order on the measurements.

Second, propagating Paulis past the entangling gate spreads them, because CZCZ conjugates XaXaZbX_a \mapsto X_a Z_b. This is bookkeeping, not extra quantum work: the running product of byproduct Paulis on every qubit is tracked in a classical register called the Pauli frame.

How a Hadamard chain stays deterministic

Consider the two-qubit Hadamard pattern X2s1M10E12N2X_2^{s_1} M_1^{0} E_{12} N_2. After measuring qubit 11 with outcome s1s_1, the output qubit 22 is in Xs1HψX^{s_1} H|\psi\rangle. The correction command X2s1X_2^{s_1} applies an XX exactly when s1=1s_1 = 1:

Xs1(Xs1Hψ)=X2s1Hψ=Hψ,X^{s_1}\big(X^{s_1} H|\psi\rangle\big) = X^{2 s_1} H|\psi\rangle = H|\psi\rangle,

since X2=IX^2 = I. The two possible outcomes are mapped to the same logical state. This is the general mechanism: a recorded outcome ss produces a byproduct PsP^{s}, and applying PsP^{s} again cancels it, because every Pauli is its own inverse.

Two roles, one principle

It is worth separating the two appearances of the same Pauli-tracking idea:

Both are instances of the single rule record the outcome, then apply the inverse Pauli (or absorb it into a later angle).

Try it

The exercise models the output-correction case on one qubit. An input ψ=Rx(1.1)0|\psi\rangle = R_x(1.1)|0\rangle has acquired a byproduct XX (the measurement that produced it returned s=1s = 1). Apply the feed-forward correction Xs=XX^{s} = X to cancel it. The grader checks the final Bloch vector equals that of the clean input, (x,y,z)=(0,sin1.1,cos1.1)(x, y, z) = (0,\, -\sin 1.1,\, \cos 1.1) — confirming the two XX operations have annihilated.

Run your code to see the quantum state.

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