|q⟩ Bad Qubits

advanced · Physics · Measurement-Based Quantum Computation

Checkpoint: Measure to Compute

This checkpoint pulls the module together. You will build the smallest genuinely two-dimensional cluster state — the graph state on a four-cycle — the resource whose cross-links make measurement-based computation universal. A one-dimensional chain can only teleport single-qubit gates; closing the chain into a loop introduces the connectivity that, with single-qubit measurements, yields entangling gates and hence universal logic.

The resource we are building

The four-qubit ring cluster state C|C_\square\rangle is the graph state on the cycle with vertices {0,1,2,3}\{0,1,2,3\} and edges

E={(0,1),(1,2),(2,3),(3,0)}.E = \{(0,1),\,(1,2),\,(2,3),\,(3,0)\}.

By the graph-state recipe, prepare every qubit in +|+\rangle and apply a controlled-ZZ on each edge:

C=CZ30CZ23CZ12CZ01  +4.|C_\square\rangle = CZ_{30}\,CZ_{23}\,CZ_{12}\,CZ_{01}\;|+\rangle^{\otimes 4}.

All four CZCZ gates commute (each is diagonal), so the order in which you lay the edges does not matter.

What the amplitudes look like

Start from the uniform superposition,

+4=14b0b1b2b3{0,1}4b0b1b2b3,|+\rangle^{\otimes 4} = \frac{1}{4}\sum_{b_0 b_1 b_2 b_3 \in \{0,1\}^4} |b_0 b_1 b_2 b_3\rangle,

with every amplitude +14+\tfrac14. Each CZabCZ_{ab} multiplies a basis string by (1)babb(-1)^{b_a b_b} — a minus sign exactly when both endpoints of that edge are 11. Over the four edges the total sign on the string bb is

(1)b0b1+b1b2+b2b3+b3b0.(-1)^{\,b_0 b_1 + b_1 b_2 + b_2 b_3 + b_3 b_0}.

So C|C_\square\rangle is real, every amplitude has magnitude 14\tfrac14, and the sign of each is set by the parity of the cycle's edges that the string "lights up." For instance 0011|0011\rangle (b2=b3=1b_2=b_3=1) acquires one minus sign from edge (2,3)(2,3); 1111|1111\rangle has babb=1b_a b_b = 1 on all four edges, an even number, so it stays positive. The grader checks all sixteen amplitudes against the simulator's derived values — there is nothing to memorise, only the construction to get right.

Why this is the right capstone

Everything in the module converges here. The state is assembled by the cluster-state recipe (Lesson 2), described by the graph-state stabilizers Ka=XabN(a)ZbK_a = X_a\prod_{b\in N(a)} Z_b (Lesson 8) — for the ring each vertex has exactly two neighbours — and it is the resource on which measurement patterns (Lesson 4) run gates by measurement and feed-forward (Lessons 3, 5, 6). The square is the unit cell from which large 2D clusters, and thus universal MBQC and its fault-tolerant 3D extension (Lessons 7, 9), are tiled. Build the ring correctly and you have built, in miniature, the substrate of the entire one-way model.

Try it

Construct the four-qubit ring cluster state: a Hadamard on each qubit, then a controlled-ZZ on each of the four cycle edges (0,1),(1,2),(2,3),(3,0)(0,1), (1,2), (2,3), (3,0). The grader verifies the full 16-amplitude state vector against the simulator's own derivation.

Run your code to see the quantum state.

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