Course InformationEdit

This is the fourth and last course. "Theoretically" it should be possible create some nice circuits after these courses, or even pick up a book on quantum computing and understand it reasonable well.

This is a very short course that explains the basics of the bloch sphere, and an introduction to eigenvalues/vectors in quantum circuits.

After having read/browsed through these courses (or parts of them), I think it's a good idea to review Nielsen's videos on quantum computing. It should hopefully be more clear by then.


Course C, and you should know what eigenvalues and eigenvectors are. You don't need to know how to compute them or anything like that though, just some general knowledge is enough.


Course D is mostly about eigenvalues/vectors. It explains how the bloch sphere works.

Lecture 1 - The bloch sphereEdit

256px-Bloch Sphere

The Bloch Sphere

Take a look at this image of the bloch sphere. What are x, y and z in this image? We will answer that now.

Eigenvalues and vectors are used to define the bloch-sphere. The sphere has got 3 axes, X, Y, and Z. They correspond to the Pauli matrices X, Y, and Z. Each of those matrices has two eigenvalues, 1 and -1; each with a corresponding eigenvector.

If we look at the vectors, we see that they put z = |0>. This is because |0> is the eigenvector of the pauli Z matrix, corresponding to the eigenvalue 1. They also set -z = |1>. That is because |1> is the eigenvector of Z corresponding to the eigenvalue -1.

It works the same way for X and Y. All these matrices has two eigenvectors, and two eigenvalues: 1 and -1. For example, x = |+> and -x = |->.

Why bother with the bloch sphere at all? Well, every (pure) qubit state can be expressed as a point on the sphere defined by these vectors, so we can use it to express qubit states, and to interpret operations on qubit states geometrically.

From section 6 of course B (or the wiki article on the bloch sphere), we know that a general qubit state can be expressed in therms of the two angles theta and phi:

$ |\psi\rangle = \cos \left(\frac{\theta}{2}\right)|0\rangle + e^{i\phi}\sin \left(\frac{\theta}{2} \right)|1\rangle $

Let us connect these angles with the axes of the bloch sphere. For example, applying the X gate to the state |q> = |0> takes it to |q> = |1>. That would correspond to a half circle rotation on the sphere, taking it from the top of the sphere to the bottom. Applying the X gate to |1> takes us to |0>, so two applications of the X gate to |q> = |0> leaves it un-changed, and thus corresponds to a full circle rotation. Also, the rotation happens around the X axis.

We have these expressions of |0> and |1>, in terms of theta and phi (you can plug those values into the equation to ensure that it works):

$ |0\rangle, \phi = 0, \theta = 0 $

$ |1\rangle, \phi = 0, \theta = \pi $

What about the Z gate then? What does it do? It leaves |0> unchanged, but takes |1> to -|1>, and should correspond to a 180 degree rotation along the Z axis. We might get a little surprise when trying to find -|1> on the Bloch sphere though, but remember: a state times a global phase is the same. -|1> = |1>. This is true on the Bloch sphere as well. If you are at the point -z = |1> on the sphere, and rotate 180 degrees around the Z axis, that corresponds to adding 180 degrees to the angle phi. That will not affect the position on the sphere. If on the other hand we apply Z to |+>, we get |->, which corresponds to a 180 degree rotation from x to -x (again, those are the eigenvectors of X).

Now some people will go "wait a second... This is obviously a hoax. Applying an X gate to |0> and |1> does indeed rotate 180 degrees, but the rotation does not have to be around the X axis; it could just as well be around the Y axis." They would be right. At least about the second part. Y|0> = i|1> = |1> (global phase). Also, Y|1> = -i|0> = |0>. It does the same thing as X. This does not apply to general states though. If you want you can try and apply X to |+> and |->, then Y, to see that Y and X cannot be interchanged.

Anyways, this is essentially how you orient yourself on the Bloch sphere. The sphere connects the Pauli matrices X, Y, Z, its eigenvectors, and the two angles in the "phase form" of a qubit.

Btw, I mention "pure states". Those are "base qubit states" in a sense, whereas the opposite - mixed states - are statistical ensembles of pure states. We don't consider mixed states here, ever, but it can actually be shown that the state vectors of mixed states lie inside of the bloch sphere, so it is a useful object in those cases as well.

Lecture 2 - Eigenvectors, eigenvalues and measurementEdit

It is important to know what the eigenvalues and vectors are, and how they work. For example - sometimes in diagrams you will see measurement devices labeled 'z'. What does that mean? It means measurement is in the "Z basis". So, what does that mean? It means the base states are the eigenvectors of Z, namely |0> and |1>, and yes - that means the computational basis is in fact the Z basis.

There are other bases as well. Sometimes I've done measurements with |+> and |-> as basis states. I sometimes refer to it (casually) as the "hadamard basis". The reason for this is that you can switch between this basis and the standard computational basis (|0> and |1>) by applying a Hadamard gate before measuring. In truth, though, this is really the X basis, in the same sense that |0> and |1> is the Z basis.

There is much more to this. In "general" quantum physics you encounter terms such as observables, Hamiltonians, and other things, but that is beyond the scope of these courses. It is treated in books on quantum computing.