Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2010/iii/paper-49/1/a/solution

Write and . The initial Hadamard gates prepare in the search register and in the final quantum ancilla. Since the Pauli X gate satisfies , the Boolean quantum oracle acts by quantum phase kickback:
For a single marked entry this is the marked-state phase oracle on the search register. The ancilla stays separate and unchanged throughout.
The Grover diffusion operator is , because . The PDF circuit places one diffusion after each oracle call, so the state before measurement is
In the supplied amplitude amplification theorem, take and . Their overlap has modulus , so the Grover rotation angle is . A quantum measurement in the computational basis therefore gives
The inverse sine here is applied to the overlap of the two different states. The converted TeX's self-overlap in the angle definition is a transcription error; the original PDF has .

New to topics? Read the docs here!