|q⟩ Bad Qubits

advanced · Physics · Measurement-Based Quantum Computation

Measurement Patterns

An MBQC algorithm is fully specified by a measurement pattern: a finite recipe of which qubits to prepare, how to entangle them, which single-qubit measurements to perform (and in what order), and how later choices depend on earlier outcomes. The measurement calculus of Danos, Kashefi and Panangaden gives this an exact algebra. This lesson introduces its four kinds of command and the bookkeeping that ties them together.

The four commands

A pattern is a sequence built from exactly four primitive commands, each labelled by the qubit(s) it acts on:

A full pattern looks like a product read right to left (commands on the right happen first), for example

P=(iXi?Zi?)(jMjξj)((k,l)EEkl)(mNm).\mathcal{P} = \Big(\prod_i X_i^{\,?}Z_i^{\,?}\Big)\,\Big(\prod_j M_j^{\xi_j}\Big)\,\Big(\prod_{(k,l)\in E} E_{kl}\Big)\,\Big(\prod_m N_m\Big).

The qubits split into the input qubits (carrying the state to be processed), the output qubits (never measured, holding the answer), and everything in between (measured during the run).

Why measurements carry dependencies

Recall the elementary gadget: an outcome ss leaves a Pauli byproduct XsX^{s} (or ZsZ^{s}) on the next wire. If that wire is later measured at angle ξ\xi, a leftover XsX^{s} in front of the measurement is not harmless, because XX does not commute with the tilted basis. Concretely,

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

So an earlier XX byproduct flips the sign of a later measurement angle, and an earlier ZZ byproduct shifts it by π\pi. These two rules are the heart of the measurement calculus. They mean a later measurement's effective angle depends on earlier outcomes, and we encode this with two outcome sets:

The measured qubit jj is then physically measured at the adapted angle

ξj=(1)sjXξj+sjZπ.\xi_j' = (-1)^{s^{X}_j}\,\xi_j + s^{Z}_j\,\pi .

This adaptation is feed-forward, treated in detail next lesson; here the point is simply that the pattern records which earlier outcomes each angle depends on.

Flow: the guarantee that a pattern is runnable

Not every set of commands is a sensible algorithm. We need a consistent partial order on the measurements such that every dependency points backward in time — a qubit's angle may depend only on outcomes already obtained. The structural condition guaranteeing this is called flow (and its generalisation gflow): a map assigning to each non-output qubit a successor, with the dependency sets derived from it, such that the induced order is acyclic.

A worked specification: the Hadamard pattern

The smallest non-trivial pattern realises a Hadamard on a two-qubit line, input on qubit 11, output on qubit 22:

H=X2s1  M10  E12  N2.\mathcal{H} = X_2^{\,s_1}\; M_1^{0}\; E_{12}\; N_2 .

Reading right to left: prepare qubit 22 in +|+\rangle; entangle (1,2)(1,2) with CZCZ; measure qubit 11 at angle ξ=0\xi = 0 (the plain XX basis); finally apply Xs1X^{s_1} to the output to cancel the byproduct. The result on qubit 22 is HψH|\psi\rangle, deterministically. Composing such tiles — feeding each output line into the next tile's input — builds arbitrary single-qubit unitaries, and adding cross-edges EijE_{ij} between two lines builds entangling gates.

What a pattern is, in one sentence

A measurement pattern is a graph (which qubits, which CZCZ edges), a list of measurement angles, a dependency structure telling each angle which earlier outcomes to fold in, and a final Pauli correction on the outputs. Equipped with flow, it is a complete, runnable, deterministic specification of a quantum computation — the MBQC analogue of a circuit diagram. The next lesson turns the dependency rules into the explicit feed-forward corrections that make it run.

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