Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 4 b iii Solution Created 2026-10-03 Updated 2026-10-07
The product of the data Pauli Z gates has computational-basis eigenvalueUse the parity circuit from part (ii), apply the target unitary gate , and then uncompute the parity with . For every basis input,This equals on the data, with the ancilla qubit returned to zero. The compute-phase-uncompute construction therefore gives an exact linear-size circuit:This is a Pauli-string phase by parity computation, an instance of simulation of a computable diagonal Hamiltonian. Part (i) also explains it by , whose exponential restricts correctly to the target- subspace. If no extra line is desired, accumulate parity into the last data qubit, apply there, and undo the CNOT gates, for gates. Both constructions implement the global phase as well as the relative phases exactly.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 324 3 b ii Solution Created 2026-10-03 Updated 2026-10-05
Since , the spectral decomposition givesReplace the middle gate of the previous compute-phase-uncompute construction bya one-qubit rotation about the z-axis. ThenThe circuit uses the gates of , their inverses, and one fixed rotation; it returns the quantum ancilla to . The same construction implements with middle gate , an instance of simulation of a computable diagonal Hamiltonian.
Rotation about the z-axis Created 2026-10-05 Updated 2026-10-14
The one-qubit rotation gate is . It implements the two relative phases needed in simulation of a computable diagonal Hamiltonian.