Solution

ID: past-exam-of-the-laser-science-and-quantum-information-processing-course-of-the-university-of-oxford/2022/5/c/solution

Read the source network as a Hadamard test: a Hadamard gate on the first qubit, a controlled unitary gate with the first qubit as control, and another Hadamard gate on that control. Starting from , the successive quantum states are
Apply b to the last line. Since by unitarity,
For the Pauli Z gate observable on the first qubit, the two eigenvalues are and . Thus
As a check, returns outcome zero certainly, while returns one certainly. The controlled unitary gate makes this relative phase measurable even though multiplying an isolated system's quantum state by is only a global phase.

New to topics? Read the docs here!