Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2023/iii/paper-324/3/ii/solution

If some integer obeys , ordinary amplitude amplification already gives exactly. For a general known , use exact amplitude amplification. Choose so that
and put . Append an ancilla and coherently arrange that its designated good value has amplitude conditional on the original register being good. With the enlarged good subspace defined by
the starting state's total good amplitude is .
Apply the amplitude amplification theorem times to this enlarged problem. Its final good amplitude is
The Boolean quantum oracle implements the reflection by phase kickback, and the known state-preparation circuit implements the reflection about the starting state by prepare--reflect--unprepare. A final computational-basis measurement therefore yields an with with certainty.

New to topics? Read the docs here!