Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 324 4 b Solution Created 2026-10-03 Updated 2026-10-05
Use a reversible circuit to compute an -bit representation of the angle into a workspace register, with all additional work bits retained:Write that representation as , with known binary place values (including the fixed scale and any integer bit). On the target, apply a controlled unitary gate controlled by each angle bit . Rotations about the same axis add their angles, so their product isFinally apply to perform uncomputation. The workspace returns to zero while the control register and rotated target remain unchanged; the construction works coherently on every superposition of .
A polynomial time classical calculation has a polynomial-size reversible circuit with Toffoli gates, and each Toffoli gate has a constant-size decomposition into one-qubit and two-qubit gates. The controlled rotations are themselves two-qubit gates. Thus the total quantum circuit size is . This is the binary-angle implementation of a quantum variable rotation; the stipulated angle precision is understood.
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.
Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 3 10C a Solution Created 2026-09-24 Updated 2026-09-25
Reversible circuit Created 2026-09-25 Updated 2026-10-03
A reversible circuit is composed of bijective gates. The Toffoli gate is universal for reversible Boolean computation when ancillary bits are available.