Solution

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

An injective self-map of the finite set is a bijection. For sufficiently large , exactly
outputs satisfy the integer comparison, so there are exactly good inputs. Prepare the uniform superposition state , whose good probability is
Use the phase oracle from the previous part and the reflection . The amplitude amplification theorem requires iterations; each uses two queries, while the state preparation and its reflection are independent of . With the nearest-integer iteration count from that theorem, the failure probability is at most , tending to zero. Therefore the success probability eventually exceeds , with
This is a bound on quantum query complexity; implementation costs of the known gates are not counted as oracle queries.

New to topics? Read the docs here!