Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2022/ii/paper-3/15d/b/solution

Use the convention
Changing the summation variable from to gives
Thus the Fourier-basis states are eigenvectors of the cyclic shift, with respective eigenvalues , and the cyclic shift diagonalization by the quantum Fourier transform is
For , write with . Then
so
Hence the required quantum circuit applies, from input to output,
The first phase gate acts on the most significant qubit and the second on the least significant qubit .

New to topics? Read the docs here!