Before we measure a state we might want to do some operation on it. But what kind of operations can we do on a qubit?
For example, when we start our quantum computer, its quantum bit will always be in state , so we need to apply an operation to create some interesting state .
Whatever the operation is, it should produce another qubit state as an output.
In other words, it should map the qubit state space to itself.
Recall from Fig.2.1 that this state space corresponds to a circle, so we are looking for ways of mapping the circle to itself.
Let us first consider the NOT operation, which we can define in exactly the same way as in Eq.1.17 for probabilistic bits:
How can we extend to arbitrary qubit states?
Just like we did for probabilistic bits in Section1.2.1, we will use the idea of linearity.
If an operation is defined on and then we can define it on an arbitrary qubit state by
(2.8)
We can also write out Eq.2.8 explicitly using the vector notation:
(2.19)
As mentioned earlier, in mathematics an operation that satisfies this condition is called linear, and extending an operation in this way is called extending “by linearity”.
The key point is that if is linear and we know how it acts on and on , we can deduce how it acts on arbitrary qubit states!
In Eq.2.8, we only considered the vectors and .
However it is more generally true that
(2.20)
for arbitrary vectors , and numbers , .
Can you see how (2.20) follows from (2.8)?
The laws of quantum mechanics guarantee that any linear operation is a possible qubit operation – provided it sends the entire qubit state space to itself!
By this we mean that every qubit state (point on the circle) is mapped to some qubit state (point on the circle).
In the case of the NOT operation, the result of extending by linearity is
(2.25)
Note that Eqs.2.8, 2.19 and 2.25 look exactly like Eqs.1.26 and 1.22 – except that now and can also be negative.
In terms of Fig.2.2, the NOT operation amounts to a reflection about the 45 degree axis (this is true also for probabilistic bits).
This is visualized in Fig.2.4.
Clearly, maps the qubit state space (circle) to itself.
Thus, the NOT operation is a valid operation on a quantum bit.
In Quirky, the operation on qubits looks like just like the operation on bits, namely .
Try now to build the following quantum computation:
Now it looks like the measurement outcome will be ‘one’ 100% of the time.
Indeed, the initial gets transformed to a state by the NOT operation, so that the outcome will always be ‘one’ according to the measurement rules in Eq.2.7.
We can similarly define qubit operations by considering reflections through other axes.
For example, the Z operation defined by
(2.26)
corresponds to a reflection about the horizontal -axis.
Indeed, if we extend Z by linearity then it acts on an arbitrary qubit state as
which certainly maps qubit states to qubit states.
Homework 2.2(Z operation).
Consider the following two states of a qubit:
1.
Compute and .
2.
Visualize the -operation graphically on the circle, as in Fig.2.4.
Hack.
1.
acts on the state as follows:
and similarly .
2.
acts as a reflection about the horizontal -axis!
Exercise 2.2(Linearity is not enough (optional)).
Consider the operation obtained by extending and by linearity.
Find a state such that is not a valid qubit state.
Thus, is not a valid operation on qubits!
Solution.
Let , which is a valid quantum state.
Since is obtained by extending by linearity, Eq.2.8 implies that