Use five resource qubits, all initially , and prepare the graph state with edges , , , . The labels here identify resource vertices; logical wire 1 travels from vertex 1 to 3, and logical wire 2 travels from 2 to 4 to 5. Each edge is a Controlled-Z gate, and these entangling gates commute, so all can be applied when preparing the resource.
Figure 1.
Five-vertex graph resource, adaptive measurement angle, and classical output corrections for the two-qubit circuit
.
Measure vertex 1 in the equatorial qubit measurement basis at angle , with outcome , and vertex 2 at angle , with outcome . These measurements can be simultaneous. The one-bit teleportation lemma leaves the state on vertices 3 and 4, before the last teleportation, equal up to global phase to
Indeed commuting the two initial byproducts through creates precisely the crossed factors. The unused edge from 4 to the fresh vertex 5 is the last one-bit teleportation link.
Measure vertex 4 at angle , with outcome . By the printed J gate propagation identities,
Thus the remaining two-qubit quantum state is
up to global phase, where is the desired circuit output relabelled onto vertices 3 and 5. The sign choice cancels the unwanted angle reversal caused by the frame on vertex 4.
Finally measure vertices 3 and 5 in the computational basis, obtaining raw results . The Pauli Z gate affects only phases, while the Pauli X gate flips a computational result. The five-vertex graph-state circuit simulation therefore outputs
This deterministic classical correction reproduces the ideal joint probability distribution for every preceding measurement branch. The final fixed-basis measurements may share the second layer with the adaptive measurement of vertex 4, because their projectors act on different vertices; measuring them afterwards is also valid.