Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2012/iii/paper-65/5/ii/solution

Apply a Hadamard gate to qubit , followed by a controlled-NOT gate with controlling . The resulting Bell-basis conversion circuit is and gives
Thus map respectively to . The first input bit becomes the phase bit and the second becomes the parity bit.
Both gates are self-inverse, but inversion of their product reverses the order:
So the same two gates convert the Bell basis back to the computational basis when applied in reverse order: first the controlled-NOT, then the Hadamard. Using the forward order twice does not generally work, since these gates do not commute. For example, , which is not a computational-basis state.

New to topics? Read the docs here!