Let be a leaf with neighbour and let the graph on the other vertices be generated by the Controlled-Z gate product . If the leaf has Pauli Z gate frame , measuring it at angle with result applies one-bit teleportation and leaves
Any known Pauli Z gate frames on other vertices remain as additional factors before those vertices' input states. The identity combines the leaf byproduct with the measurement result.
Inverse quantum circuit Created 2026-09-24 Updated 2026-09-24
The inverse of a quantum circuit applies the adjoints of its gates in reverse temporal order. The Hadamard gate, Pauli Z gate, and controlled-NOT gate are each self-inverse.
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.
Take and label the first vector of each measurement basis by outcome . Assign the Pauli measurement value to outcome and to outcome . The four observables are
Here and are the Pauli X gate and Pauli Z gate matrices. These follow by subtracting the two rank-one basis projectors; a real basis rotated through has observable .
The Schmidt-basis Pauli correlation tensor of the state gives
Consequently , and , where . For binary outcomes, , whereas the final offset term has . The chained modular Bell inequality left side is therefore
The local bound is , so the exact violation condition is
Equality saturates the bound. The maximal violation for these fixed measurements occurs at or their common negative, giving . Opposite signs do not violate this particular inequality with these fixed bases, although other measurement choices can reveal the state's entanglement. If unnormalized real amplitudes are used, replace throughout by .