= Solution
Use five resource <qubits>, all initially $|+\rangle$, and prepare the <graph state> with edges $\{1,3\}$, $\{2,4\}$, $\{3,4\}$, $\{4,5\}$. 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.
\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2012/iii/paper-67-measurement-graph.png]
{title=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 $\alpha$, with outcome $s_1$, and vertex 2 at angle $\beta$, with outcome $s_2$. 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
$$
X_3^{s_1}Z_3^{s_2}X_4^{s_2}Z_4^{s_1}E_{34}(J(\alpha)\otimes J(\beta))|++\rangle.
$$
Indeed commuting the two initial $X$ byproducts through $E_{34}$ creates precisely the crossed $Z$ factors. The unused edge from 4 to the fresh vertex 5 is the last <one-bit teleportation> link.
Measure vertex 4 at angle $\theta=(-1)^{s_2}\gamma$, with outcome $s_4$. By the printed <J gate> propagation identities,
$$
X^{s_4}J(\theta)X^{s_2}Z^{s_1}=e^{is_2\theta}X^{s_4\oplus s_1}Z^{s_2}J(\gamma).
$$
Thus the remaining two-qubit <quantum state> is
$$
\left(X_3^{s_1}Z_3^{s_2}\right)\otimes\left(X_5^{s_4\oplus s_1}Z_5^{s_2}\right)|\psi_C\rangle,
$$
up to <global phase>, where $|\psi_C\rangle$ is the desired circuit output relabelled onto vertices 3 and 5. The sign choice cancels the unwanted angle reversal caused by the $X$ frame on vertex 4.
Finally measure vertices 3 and 5 in the <computational basis>, obtaining raw results $t_3,t_5$. 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
$$
\boxed{b_1=t_3\oplus s_1,\qquad b_2=t_5\oplus s_4\oplus s_1.}
$$
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.
Back to article page