Solution

ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2020/quantum-information/1/c/solution

Swap the first two computational vectors and fix the third:
This permutation matrix has orthonormal columns; equivalently, and , proving unitarity. Its first column gives , as required. A unitary must also specify what happens to the rest of the basis, which is why a single outer product alone would not suffice.

New to topics? Read the docs here!