Solution

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

Since , the spectral decomposition gives
Replace the middle gate of the previous compute-phase-uncompute construction by
a one-qubit rotation about the z-axis. Then
The 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.

New to topics? Read the docs here!