Simulating MBQC Gates
This lesson turns the elementary gadget into something you can run. We simulate the one-bit teleportation circuit on a qubit simulator and watch a single-qubit gate appear on the ancilla as a consequence of measuring the input — the smallest complete MBQC computation.
The gadget as a circuit
The measurement-based Hadamard is a three-line circuit on two qubits:
- Input sits on qubit .
- Ancilla qubit is prepared in by a Hadamard on .
- Entangle the edge with a controlled-, — this is precisely the two-qubit cluster state construction.
- Measure qubit in the basis.
A state-vector simulator measures only in the computational basis, so we realise the -basis measurement the standard way: apply a Hadamard to qubit and then read it in the computational basis, since maps the basis onto .
Tracing the simulated state
Before any measurement, after the entangling step and the rotating Hadamard on qubit , the joint state is (from the gadget identity of the previous lessons, with the final applied):
Reading qubit now gives outcome , and qubit collapses to — the Hadamard, up to the byproduct .
Choosing a deterministic instance
To get a clean, outcome-independent check without post-selecting on a measurement, choose the input to be an eigenstate that the byproduct fixes. Take . Then
so both branches leave qubit in . The two outcomes are physically identical on the ancilla; tracing out the (still-entangled) measured qubit, the reduced state of qubit is the pure state , with reduced Bloch vector
That is the signature of a successful Hadamard: the teleported logical qubit has been mapped from to .
Why this is the whole story in miniature
Nothing in this circuit ever applied a gate to qubit . The Hadamard on the logical information arose entirely from entangling and then measuring qubit . Replace the plain -basis measurement with a tilted one at angle and the same circuit realises instead; chain several edges and the gadgets compose into an arbitrary single-qubit unitary; add a cross-edge between two such chains and you get an entangling gate. Everything in the one-way model is this gadget, repeated and stitched together.
Try it
Build the Hadamard gadget for input : prepare the ancilla qubit in , entangle the edge with , and rotate qubit into the -measurement basis with a Hadamard. The grader reads the reduced Bloch vector of qubit , which must be — the teleported state .
Sign in on the full site to ask questions and join the discussion.