Apply the gates from left to right. The first Hadamard gate and the first controlled-NOT gate produce the Bell state
The parallel gates then produce
The final controlled-NOT has the lower qubit as control; it interchanges and , whose amplitudes here are equal. Thus the output is
By quantum measurement in the computational basis, every basis outcome has probability equal to the squared modulus of its amplitude:
Use the inverse quantum circuit rule. Every gate in is self-inverse, so reverse their order. From left to right, the circuit for is:
1. a controlled-NOT with the lower qubit controlling the upper;
2. on the upper qubit and on the lower qubit;
3. a controlled-NOT with the upper qubit controlling the lower;
4. on the upper qubit.
This is the requested circuit description, with the two wires and control directions unchanged under each individual gate's adjoint.
Use three controlled-NOT gates with control-target directions
On computational-basis bits they act as
They therefore implement the Three-CNOT decomposition of the SWAP gate, and linearity proves the identity on every two-qubit state.
After the first Hadamard gate and the controlled unitary gate, the state is
The final Hadamard gate gives
Hence the Hadamard test returns one with probability
If , then and the outcome is zero with certainty. If , then modulo and the outcome is one with certainty. The single measurement therefore distinguishes the two promised cases exactly.

Articles by others on the same topic (0)

There are currently no matching articles.