Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2017/iii/paper-324/2/a/solution

Assume first . Define the orthonormal quantum states
and by . The relevant invariant subspace is the two-dimensional span of these quantum states, not the entire Hilbert space. The uniform quantum superposition is .
In the ordered orthonormal basis , the marked-state phase oracle is the reflection operator . Since , conjugation by the Walsh-Hadamard transform gives the Grover diffusion operator
It is the reflection in the line through . The product of these two reflection operators is a rotation matrix by toward the marked quantum state:
Thus the Born rule gives . Choose a nonnegative integer nearest to . Rounding changes the angle from by at most , so
Each Grover search algorithm iteration uses one marked-state phase oracle query; all other gates are known. A final quantum measurement in the computational basis therefore produces a uniformly chosen marked item, conditional on success, with probability better than one half when . This uses the supplied marked count to select the stopping time; an unknown needs an additional search schedule or counting procedure. If , no oracle query is needed; if , no marked item exists, so a successful search is impossible.

New to topics? Read the docs here!