Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2018/ii/paper-4/10d/b/solution

The marked-state phase oracle changes only the amplitude of . Since that amplitude in is ,
Also,
It follows that and , so
The global minus sign has no observable effect. Prepare , query once, apply the fixed operator , and perform a quantum measurement in the computational basis. The outcome is with probability one. This is exact Grover search on four entries.

New to topics? Read the docs here!