Solution

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

Use controlled-NOT gates in parallel. For each , the th input qubit is the control and the th output-register qubit is the target. Their combined action is
which is exactly

New to topics? Read the docs here!