Quite soon, we're going to need to look at systems containing more than one qubit. Since our definitions of qubits and gates are quite mathematical, we need to make sure we have a solid mathematical framework for representing these systems.
The tensor product is a new operation we will introduce that can act between two vectors or operators. It is denoted by the symbol . As we deal with more and more qubits, writing out this symbol will get tedious so we will add some special syntax to our bra-ket notation for this:
This notation is useful and should remain unambiguous as long as we only use a single character to represent a vector, which should always be the case.
If we have three qubits in the states , and we will represent the combined state of the three qubits as the tensor product of the three:
The result can then be thought of as a binary number, in this case representing the number . This starts to give us a hint of how we will achieve more meaninful computation as we can see that multiple qubits can be used to represent numbers.
A mathematical technicality we need to note here is how the dimensionality of vectors changes with this tensor product. We know that a single qubit has a dimension of since it has two basis vectors and . When we tensor product two qubits together though we end up with 4 basis vectors:
This gives us the intuition that tensor producting two vectors together, multiplies their dimensions.
Here's how we define the tensor product of gates (linear operators):
So this means the tensor product of 2 1-qubit gates would simply represent the 2 gates acting independantly on either qubit. Let's look at an example of applying a Hadamard gate to one qubit and an gate to another:
There will often be times when we want to apply the same single qubit gate to many qubits at the same time. To do this we introduce the notation:
Be careful not to confuse this with the notation. This would represent applying the operator times on the same qubit.
We can also use the tensor product on bras. Here's how it works on the inner product operation:
Show that the 4 basis vectors , , and are orthonormal
Show that when applying to a state of n qubits we get an even super position of all n-bit binary numbers.
Given we have the 4 basis vectors for the 2-qubit system (defined in Exercise 1), are all possible states of the 2-qubit system seperable?
Seperable here means that the state of the 2-qubit system can be written as the tensor product of two 1-qubit states.