Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 324 4 c Solution 2026-09-25
Implement the assumed efficient classical algorithm for as a reversible circuit. On input , it computes an -bit binary expansion of the angle in a work register using Toffoli gates and elementary reversible gates. Write the computed angle as a sum of binary-weighted angles. For each angle bit, apply the corresponding controlled single-qubit rotation to the target. These rotations have the same axis, so their angles add and produceFinally apply uncomputation to erase the work register. Each Toffoli gate and controlled rotation has a constant-size decomposition into one- and two-qubit gates when arbitrary one-qubit rotations are available. Ignoring the stipulated precision costs, the resulting circuit has size and returns every quantum ancilla to zero.