2.3

# Writing Down Qubit States

In the video in the previous step, we briefly introduced the key ideas of superposition and phase in our qubits, and used the two-dial diagrams to discuss the state. Let’s look into why we use that approach, and what some alternatives are.

## A Point on the Bloch Sphere

So far, we have represented our one qubit using two dials, one for the zero state and one for the one state. But it may seem to be a bit of a hassle to keep track of two dials, and not entirely intuitive that one of them gets longer when the other gets shorter.

In the video, we showed you the equation $|\alpha^2| + |\beta^2| = 1$ and said that $|\alpha^2|$ is the probability of being in the zero state and $|\beta^2|$ is the probability of being in the one state.

If you are a sharp observer, you may have noted that $\alpha$ and $\beta$ are almost like $x$ and $y$ in the simplest equation for a circle, $x^2 + y^2 = 1$. But why the absolute value? Can we just use a point on a circle to represent our qubit?

Almost.

If the only thing we needed to represent was the amplitude of the states of the qubit, we could use a single circle, or even just a quarter of a circle, with the $x$ value representing the amount of zero and the $y$ value representing the amount of one.

The problem with this approach is that it doesn’t show us the phase of the qubit. We need a way to record both the phase and amplitude in a single picture.

A different way of representing a single qubit is known as the Bloch sphere. (As you might guess, it was created by a person named Bloch – the Nobel prize-winning physicist Felix Bloch.) With the Bloch sphere, we need only one vector, always of length one. It points at the sphere’s north pole to represent zero, to its south pole to represent one, and to somewhere on the equator to represent our 50/50 state. Which “longitude”, or side of the sphere, the vector points to depends on the phase. You can see an example of a vector on the Bloch sphere in the image at the top of this article.

You can see the $X$, $Y$ and $Z$ axes marked on the Bloch sphere. The state of the qubit can be anywhere on the surface of this sphere, but there are six particularly interesting points on it, which we will call the “positive” and “negative” points on each of those axes. We can write them using our dials like this:

Below, we’ll see where those six different diagrams come from, but first a couple of points about the Bloch sphere.

With the sphere, you don’t have to remember to shorten one amplitude when lengthening the other. As long as you have a point on a sphere with a radius of one (the “unit sphere”), the squares of the amplitudes naturally add up to one.

The sphere also conveniently expresses which states are orthogonal: if you have two points opposite each other on the sphere, they are orthogonal. (If you learned about orthogonal vectors in physics or trigonometry, you might wonder why the orthogonal states are 180 degrees apart rather than 90. The Bloch sphere is not a directly physical representation, so vectors on the Bloch sphere have slightly different characteristics.)

This sphere is useful in explaining operations and measurements on single qubits, which we will cover shortly. However, it has a significant drawback: it is not useful for describing multiple qubits, so we will stick with the multiple dials representation most of the time.

## Superpositions

A key point of a single qubit is that it can be in a superposition state. Now that we understand a little bit about how to write down the states of a qubit mathematically and how to draw them, we’re ready to look a little more closely at superposition. In the equation above, both alpha and beta can be non-zero, giving us probability amplitudes from both the zero term and from the one term.

For example, we will frequently use a state that is 50% zero and 50% one. Recalling that we need to take the square root, that gives us

which we can draw using two dials,

We can also have states that aren’t 50/50, such as

$1/2|0\rangle + \sqrt{3/4}|1\rangle$

where there is a 25% probability that the state is a zero and 75% probability that it is a one.

## Phase (and its Geometric Representation)

As noted in the video, a qubit, like a wave, has a phase. By definition, the zero state always has phase zero, while the one state can have any phase, $0$ to $2\pi$. In fact, the phase of the one state is defined relative to the zero state.

A commonly used pair of states is

$\sqrt{1/2}|0\rangle + \sqrt{1/2}|1\rangle$ and $\sqrt{1/2}|0\rangle + (\pi)\sqrt{1/2}|1\rangle$

We call these the “ket plus” and “ket minus” states, and write them $|+\rangle$ and $|-\rangle$. They are orthogonal to each other, but not to the $|0\rangle$ and $|1\rangle$ states.

Another orthogonal pair of states is

$\sqrt{1/2}|0\rangle + (\pi/2)\sqrt{1/2}|1\rangle$

and

$\sqrt{1/2}|0\rangle + (3\pi/2)\sqrt{1/2}|1\rangle$.

If we plot these on the Bloch sphere, each orthogonal pair is two opposite points. The $|0\rangle$/$|1\rangle$ pair defines the $Z$ axis, the $|+\rangle$/$|-\rangle$ pair defines the $X$ axis, and the third pair defines the $Y$ axis.

Of course, it’s possible to have any phase we find useful, not just multiples of $\pi/2$. That phase is critical to generating the proper interference that drives the success of quantum algorithms.

## Phase (the Slightly More Mathematical Definition)

If you aren’t familiar with imaginary numbers and complex numbers, you can skip this section without any trouble; our entire discussion depends only on the geometric description above. But if you want to know a little more about the math, read on.

Unlike the classical probabilities we discussed in the video, our quantum probability amplitudes $\alpha$ and $\beta$ aren’t restricted to being non-negative, real numbers between zero and one. They can be negative, or even imaginary or complex. Imaginary numbers, you probably recall, are square roots of negative numbers. Complex numbers, in general, can have a real part and an imaginary part. Hopefully, you even remember that a complex number can be represented on a plane where the real part is one axis and the imaginary part is the other axis.

We use $i$ to represent the square root of minus one, $i = \sqrt{-1}$. You don’t really need to know anything more about complex numbers in this course than the fact that they change the phase of a state, or the angle of our vector. But how does this happen? It happens thanks to Euler’s equation (called by some people the most beautiful equation in all of mathematics),

$e^{i\pi} + 1 = 0$.

More generally, if we have an angle $\theta$,

$e^{i\theta} = \cos\theta + i\sin\theta$.

For our purposes, whether the number is real, imaginary, or complex shows up as the phase of our probability amplitude. In fact, the dials and vectors we have already been using actually represent the phase and amplitude of a state. Using the dial vector representation, you don’t need to worry about the fact that complex numbers are involved, you only have to remember to add the vectors appropriately.

But, for the record, our $X$ axis states are

$|+\rangle = \sqrt{1/2}|0\rangle + (0)\sqrt{1/2}|1\rangle = \sqrt{1/2}|0\rangle + e^0\sqrt{1/2}|1\rangle = \sqrt{1/2}|0\rangle + \sqrt{1/2}|1\rangle$, while $|-\rangle = \sqrt{1/2}|0\rangle + (\pi)\sqrt{1/2}|1\rangle = \sqrt{1/2}|0\rangle + e^{i\pi}\sqrt{1/2}|1\rangle = \sqrt{1/2}|0\rangle - \sqrt{1/2}|1\rangle$.

Our $Y$ axis states become

$\sqrt{1/2}|0\rangle + (\pi/2)\sqrt{1/2}|1\rangle = \sqrt{1/2}|0\rangle + e^{i\pi/2}\sqrt{1/2}|1\rangle = \sqrt{1/2}|0\rangle + i\sqrt{1/2}|1\rangle$ and $\sqrt{1/2}|0\rangle + (3\pi/2)\sqrt{1/2}|1\rangle = \sqrt{1/2}|0\rangle + e^{i3\pi/2}\sqrt{1/2}|1\rangle = \sqrt{1/2}|0\rangle - i\sqrt{1/2}|1\rangle$.

## Physical Qubits

A brief peek ahead: So far, we have talked about qubits as entirely abstract, mathematical entities. But of course, to compute with them, they have to exist in the real world. At the end of this week, we will see that qubits can made using a variety of physical phenomena, such as individual photons and individual electrons. All of these phenomena have complex behavior, but if we use them carefully, we can make them follow a set of rules that allows us to use them as qubits. Then, in the last week of the course, we will learn more about the devices that can create and control these quantum states.