Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2024/iii/paper-324/2/b/iv/solution

Attach a quantum ancilla prepared with amplitude
on ; this is possible because . Mark a state as good only when both the original success qubit and this ancilla equal one. The enlarged state's good probability is , so its good amplitude is . One amplitude amplification iteration rotates the angle from to . It therefore prepares exactly, after which the flag and ancillary qubits may be discarded. This is an instance of exact amplitude amplification.

New to topics? Read the docs here!