bloch-sphere-0

Multiple Qubits

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.

Tensor Product

The tensor product is a new operation we will introduce that can act between two vectors or operators. It is denoted by the symbol \otimes. As we deal with more and more qubits, writing out this \otimes symbol will get tedious so we will add some special syntax to our bra-ket notation for this:

ψϕ=ψϕ\ket{\psi} \otimes \ket{\phi} = \ket{\psi\phi}

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 0\ket{0}, 1\ket{1} and 0\ket{0} we will represent the combined state of the three qubits as the tensor product of the three:

010=010\ket{0} \otimes \ket{1} \otimes \ket{0} = \ket{010}

The result can then be thought of as a binary number, in this case representing the number 22. 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 22 since it has two basis vectors 0\ket{0} and 1\ket{1}. When we tensor product two qubits together though we end up with 4 basis vectors:

ψ=a0+b1  and  ϕ=c0+d1then  ψϕ=ψϕ=(a0+b1)(c0+d1)=ac00+ad01+bc10+bd11=ac00+ad01+bc10+bd11\ket{\psi} = a\ket{0} + b\ket{1}\ \ \textmd{and}\ \ \ket{\phi} = c\ket{0} + d\ket{1} \\[3ex] \textmd{then}\ \ \ket{\psi\phi} = \ket{\psi} \otimes \ket{\phi} = (a\ket{0} + b\ket{1}) \otimes (c\ket{0} + d\ket{1}) \\[3ex] = ac\ket{0} \otimes \ket{0} + ad\ket{0}\otimes\ket{1} + bc\ket{1}\otimes\ket{0} + bd\ket{1}\otimes\ket{1} \\[3ex] = ac\ket{00} + ad\ket{01} + bc\ket{10} + bd\ket{11}

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):

(AB)(ϕψ)=AϕBψ(A \otimes B)(\ket{\phi} \otimes \ket{\psi}) = A\ket{\phi} \otimes B\ket{\psi}

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 XX gate to another:

(HX)(00)=H0X0=+1=+1(H \otimes X)(\ket{0} \otimes \ket{0}) = H\ket{0} \otimes X\ket{0} = \ket{+} \otimes \ket{1} = \ket{+1}

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:

An=AAAn  timesA^{\otimes n} = \underbrace{A \otimes A \otimes \ldots \otimes A}_{n\ \ \text{times}}

Be careful not to confuse this with the AnA^n notation. This would represent applying the operator AA nn times on the same qubit.

We can also use the tensor product on bras. Here's how it works on the inner product operation:

ψϕαβ=(ψϕ)(αβ)=ψαϕβ\braket{\psi \phi | \alpha \beta} = (\bra{\psi} \otimes \bra{\phi})(\ket{\alpha} \otimes \ket{\beta}) = \braket{\psi|\alpha}\braket{\phi|\beta}

Exercises

Exercise 1

Show that the 4 basis vectors 00\ket{00}, 01\ket{01}, 10\ket{10} and 11\ket{11} are orthonormal

Show solution

Exercise 2

Show that when applying HnH^{\otimes n} to a state of n 0\ket{0} qubits we get an even super position of all n-bit binary numbers.

Show solution

Exercise 3

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.

Show solution
> Next Article (Multi Qubit Gates)