Solution

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

Use the inverse quantum circuit rule. Every gate in is self-inverse, so reverse their order. From left to right, the circuit for is:
1. a controlled-NOT with the lower qubit controlling the upper;
2. on the upper qubit and on the lower qubit;
3. a controlled-NOT with the upper qubit controlling the lower;
4. on the upper qubit.
This is the requested circuit description, with the two wires and control directions unchanged under each individual gate's adjoint.

New to topics? Read the docs here!