4.1.3 The most general quantum operations
What are the most general operations that we can apply to quantum states on qubits? In fact, any operation that has the following three properties:
-
1.
it is linear,
-
2.
it sends quantum states to quantum states,
-
3.
it is invertible
is a valid quantum operation!
Exercise 4.4 (Toffoli).
Define the Toffoli operation on three qubits by
on basis states ( is the product of the two bits , and was defined in Eq. 3.21), and extend it by linearity to arbitrary three-qubit states. Show that sends quantum states to quantum states, and that is invertible.
Note: inverts the third bit of the basis vector if and only if the first two bits are both set to one – so it is like a ‘doubly controlled’ NOT operation.
Solution.
Let be an arbitrary three-qubit quantum state. The result of applying the Toffoli operation is We highlighted the two basis states that changed in bold. Note that the only change is that the amplitudes of and were swapped. Thus it is clear that if then also . Thus, maps quantum states to quantum states.4.4 shows that the Toffoli operation is a valid quantum operation of three qubits. Interestingly, it is actually possible to write as a sequence of one- and two-qubit operations. In fact, this is possible for any quantum operation of qubits – but we will not do it in this class since it takes an experienced quantum composer to understand how this can be done!