## Want to keep learning?

This content is taken from the Keio University's online course, Understanding Quantum Computers. Join the course to learn more.
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

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

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.

# 量子状態を表現する

## ブロッホ球: 量子状態を単位球面上に表す表記法

これまで私たちは、0状態と1状態のそれぞれを表す２つのダイアルを使って1つの量子ビットを表現してきました。 しかし、状態の推移と共に変化する2つのダイアルを同時に追いかけるのは少し手間がかかりますし、片方が伸びるともう片方は縮むという変化も直観的ではありません。

よい所に気が付きました！

ところが、実際は、量子ビットには振幅と位相の２つの自由度があり、この円を使った表記法では位相の情報を一切表現することができません。 任意の量子状態を書き表すには、その振幅と位相の両方に関して記述ができる表記法が必要となります。

ブロッホ球とは、単一量子ビットの振幅と位相の両方を視覚的に表現できる表記法の１つです。 （お気づきかもしれませんが、この表記法はノーベル物理学賞の受賞者であるフェリックス・ブロッホさんによって考案されました）。 常に大きさが1であるような一つのベクトルを用いて量子状態を表現し、ベクトルがブロッホ球の北極点を指しているときには0状態を表し、南極点を指しているときには1状態を表します。

ベクトルがブロッホ球の赤道上のを指しているときは、0と1の状態が同じ比率で重ね合わせの状態でることを表します。 その場合、経度(ベクトルが球の赤道のどこを指すか)は、状態の位相によって決定します。 このページ上部にある画像はブロッホ球上で取り得るベクトルの一例を表したものです。

ご覧のように、画像には$$X$$・$$Y$$・$$Z$$軸が書き入れてあります。量子ビットの状態はブロッホ球の球面上の任意の点で示されますが、その中でも特に、$$X$$,$$Y$$,$$Z$$の各軸の両端を指す６つの点は、それぞれ「プラス」の点・「マイナス」の点と呼ばれ、特別な点として扱われます。これらの点は、2ダイアル図を用いると、以下のように表せます。

これらの図が何を表しているかを解説する前に、ブロッホ球についてもう少し学んでおきましょう。

また、球を使うことで直交する状態をうまく表すこともできます。 ブロッホ球上では，原点を挟んで対称な2点が示す状態はそれぞれ直交します。 （数学では，直交するのは角度が90度のときでしたが、ブロッホ球の場合は角度が180度のときに直交します。 これは、ブロッホ球が抽象的なモデルであり、その上のベクトルは、物理的なベクトルとは少し異なる特徴をもっているためです。）

この表記法は単一量子ビットに対する操作や測定（今週後半で解説する話題ですが）の説明に使う場合、とても便利ではありますが、複数の量子ビットの振る舞いを説明するには使えないという大きな欠点があります。 そのため、このコースでは主に複数のダイアル図を使って説明を続けることにします。

## 重ね合わせ

これまで学んできた量子ビットの数学的な記法とダイアル図を使って、この重ね合わせという現象についてもう少し詳しく見ていきましょう。 前述の式では，$$\alpha$$と$$\beta$$ の両方がゼロ以外の任意の値をとることができ、それぞれが0状態と1状態の確率振幅となります。

たとえば、以下のような式で表せる 0状態と1状態が50%ずつ重ね合わされた状態は、量子計算を語る上で欠かせない状態の一つです。 確率から確率振幅に変換する場合は、その平方根をとる必要があることに気をつけてください。

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

この式は、ダイアル図を使うと、次のように表現することもできます。

もちろん， 量子ビットは 0と1の割合が均等ではない重ね合わせ状態も取り得ます．たとえば以下のような状態です。

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

この重ね合わせ状態は、0状態である確率が25%（1/4）で1状態である確率が75%（3/4）となります．

## 位相（とその幾何学的表現）

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

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

で示される２つの状態は、よくペアとして使われる状態です。

$$\vert+\rangle$$と$$\vert-\rangle$$はそれぞれ直交していますが、これらは$$\vert0\rangle$$や$$\vert1\rangle$$とは直交しません。

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

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

これらの状態をブロッホ球上にプロットすると，それぞれの直交ペアは原点に対して対称な2点に対応します。$$\vert0\rangle$$と$$\vert1\rangle$$のペアは$$Z$$軸の両端に、$$\vert+\rangle$$と$$\vert-\rangle$$はX軸両端に、最後のペアは$$Y$$軸の両端となります．この$$\pi/2$$の倍数の位相は、適正な干渉を生成することができるので、量子アルゴリズムが正しく動作するためには、不可欠な存在です。もちろん，$$\pi/2$$の倍数以外でも重要な位相は存在します。

## 位相（のもう少し数学的な定義）

ここでは，$$i$$を$$-1$$の平方根として使います。すなわち、$$i =\sqrt{-1}$$です。 この講義では、複素数を使うことで量子状態の位相、すなわちベクトルの角度を変えることができるということだけ知っていれば十分です。 では、それはどのようにしてできるのでしょうか。 それは、以下に示すオイラーの等式（これを世界で一番美しい数式と呼ぶ人もいます）によって可能になります。

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

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

が成立します。

$|+\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$

$|-\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$

で、$$Y$$軸の先端の状態は

$\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$ $\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$

と書くことができます。