Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2008/iii/paper-57/4/a/solution

Label the control qubits by binary weight: the bit contributes to . For each , use that qubit as the control of the supplied controlled-, with the same target eigenstate . The controlled unitary gate acts by
since . The target remains unchanged after every application. Multiplying these factors gives
The ordering of the tensor factors is chosen to match the binary place values. Discarding the unchanged target leaves the required phase register. This uses quantum phase kickback in the phase accumulation step of quantum phase estimation.

New to topics? Read the docs here!