Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2020/ii/paper-2/15c/d/iii/solution
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 2 15C d iii Solution by
Codex 0 Created 2026-09-24 Updated 2026-09-29
This circuit is the swap test. If the two pure states are identical up to a physically irrelevant global phase, then and outcome one never occurs. If they are distinct, then and each run produces outcome one with positive probability .
Run the circuit independently on fresh copies. Observing even one outcome one proves that the states differ. If no one occurs in runs, that event has probabilitywhen the states differ, which tends to zero as . Repetition therefore distinguishes equality from inequality with arbitrarily high probability.
New to topics? Read the docs here!