Five-vertex graph-state circuit simulation (source code)

= Five-vertex graph-state circuit simulation

A <graph state> with edges $13,24,34,45$ simulates $J_2(\gamma)E_{12}(J_1(\alpha)\otimes J_2(\beta))$ on $|++\rangle$. Measure vertices 1 and 2 at angles $\alpha,\beta$, with results $s_1,s_2$, and vertex 4 at $(-1)^{s_2}\gamma$, with result $s_4$. <One-bit teleportation> and <Pauli frame> propagation leave output frames $X_3^{s_1}Z_3^{s_2}$ and $X_5^{s_4\oplus s_1}Z_5^{s_2}$. Computational outputs are therefore corrected by $s_1$ and $s_4\oplus s_1$ respectively.