Skip main navigation

Quantum Registers: Growing State Space of Multiple Qubits

When we have more than one qubit, we call it a _quantum register_. Learn how multiple qubits have an exponentially growing state space.
© Keio University

A quantum computer stores its quantum data in one or more quantum registers. They can store data in quantum superposition, the first key in understanding the advantage of quantum computers.

As we just saw with classical data, a register holds a small number of bits. In classical computers, we have a set of registers that are of a fixed size, but in a quantum computer we generally have a single, undifferentiated register that we split up to hold different pieces of data as necessary. First, though, let’s talk about our register as a single entity.

Quantum State Space

The set of possible states for our register is our state space. For a register with (n) qubits, there are a total of (2^n) possible states, just as a classical register has (2^n) possible values. If our quantum register could hold only a single value, a four-qubit register might, for example, have the value (|1010rangle).

However, our ability to put a quantum state into superposition means that we need a total of (2^n) of our dials to represent our state. Equivalently, we can say that our state vector requires (2^n) entries to write out in its entirety.

For example, our 000, 001, 010 and 111 states we would write as

(|000rangle = left( begin{array}{c} 1 0 0 0 0 0 0 0 end{array} right), |001rangle = left( begin{array}{c} 0 1 0 0 0 0 0 0 end{array} right), |010rangle = left( begin{array}{c} 0 0 1 0 0 0 0 0 end{array} right), mbox{ and } |111rangle = left( begin{array}{c} 0 0 0 0 0 0 0 1 end{array} right)).

Fortunately, much of the time, most of those are zero, and so we don’t have to explicitly draw them or write them down – that’s why the Dirac ket notation (on the left) is so much more compact. When we have a superposition, you only need to write down the kets for elements that aren’t zero. For example, the 50/50 superposition of (|000rangle) and (|111rangle) is (frac{1}{sqrt{2}}left( begin{array}{c} 1 0 0 0 0 0 0 1 end{array} right)) written using the full vector, and the much easier to read (frac{|000rangle + |111rangle}{sqrt{2}}) in the ket notation. If it’s not 50/50, we might write (left( begin{array}{c} alpha 0 0 0 0 0 0 beta end{array} right) = alpha|000rangle + beta|111rangle) since only the (|000rangle) (first) and (|111rangle) (last) entries in the state vector aren’t zero.

This set of states is called a Hilbert space (named after the mathematician David Hilbert). We are used to dealing with two or three dimensions in our everyday lives, but this Hilbert space is (2^n) dimensions. This doesn’t mean that our qubits are accessing some fourth or higher spatial dimension, like in a science fiction movie, just that completely describing their behavior requires us to use more elements in our state vector: 8 dials or numbers for three qubits, 16 for four qubits, and so on.

You can think of the set of entries as separate vectors, if you like, but in reality this set forms a single vector of length 1 in the Hilbert space.

This Hilbert space – our ability to use quantum superposition – is the first important factor in the power of quantum computers.

Normalization Condition

We saw with one qubit that the probability of being in the zero state plus the probability of being in the one state must sum to one. We can write that down as (P(|0rangle) + P(|1rangle) = 1).

The same is true with our multi-qubit states, but the number of states is larger so calculating it is a little bit more complicated. If we have a register with three qubits, there are (2^3 = 8) possible states. If (P(|000rangle)) is the probability that we will find the state (|000rangle) when we measure the register, then (P(|000rangle) + P(|001rangle) + P(|010rangle) + P(|011rangle)) (+ P(|100rangle) + P(|101rangle) + P(|110rangle) + P(|111rangle) = 1).

We always get something when we measure our register!

This is known as the normalization condition, and it holds for quantum probabilities the same as it does for classical probabilities. The only difference is that calculating the quantum probabilities involves taking the absolute value of the square of the probability amplitude. If our three-qubit state is (alpha|000rangle + beta|001rangle + gamma|010rangle + delta|011rangle + a|100rangle + b|101rangle + c|110rangle + d|111rangle), then the probability of finding 000 is (|alpha|^2), the probability of finding 001 is (|beta|^2), the probability of finding 010 is (|gamma|^2), etc., and so (|alpha|^2 + |beta|^2 + |gamma|^2 + |delta|^2 + |a|^2 + |b|^2 + |c|^2 + |d|^2 = 1).

Measuring multi-qubit states

The multiple dials view of a quantum state can be a little confusing, but it’s a help when thinking about measurement. If we measure all of the qubits in a register, the probability of finding each state is calculated by taking each vector and squaring its length, just as we did for a single qubit.

To measure only one qubit in a multi-qubit state, calculate the probability of each state, and sum up all of the states with zero in the appropriate position to get the probability of finding zero.

But what happens to the state afterwards? Completely measuring a register results in the state completely collapsing, but if we measure part of the register, it may partially collapse. Consider the state (frac{|000rangle + |011rangle + |101rangle}{sqrt{3}}). If we measure the whole register, there is a 1/3 probability of finding each of the states 000, 011, and 101.

But if we measure only the qubit on the left, we have a 2/3 probability of finding it is zero, and a 1/3 probability of finding that it is one. Interestingly, if we find 1, then the state of the other two qubits is definitely (|01rangle), but if we find 0, then the other two qubits are still left in the state (|00rangle + |11rangle).

Measuring a qubit also results in the destruction of quantum entanglement for that qubit.

 

量子レジスタ

量子コンピュータは、一つ以上の量子レジスタに量子データを格納します。 また、そのデータは重ね合わせ状態のまま格納することもできます。 これが、量子コンピュータを理解する上での最初の鍵となります。

古典的レジスタについて学んだ通り、レジスタは少数のビット情報を保持します。 従来型コンピュータにおいては、複数の静的な大きさのレジスタがCPU内に内蔵されていますが、量子コンピュータにおいては通常、必要に応じて分割される、未分のレジスタを一つ持っています。 まずは量子レジスタを1つのレジスタとして見て学んでいきましょう。

量子状態空間

量子レジスタが取りうる状態の組み合わせを”状態空間”と呼びます。(n)ビットの古典レジスタが(2^n)個の値を取れるのと同様、(n)個の量子ビットからなる量子レジスタでは(2^n)個の取りうる状態が存在します。 もし量子レジスタが、従来のレジスタのように1つの値しか保存できないと仮定したら、例えば、4量子ビットからなる量子レジスタは、 (vert1010rangle)などという風に表現できるかもしれません。

しかし、(n)個の量子ビットは重ね合わせの状態を取ることができるため、それらをうまく表現するためには(2^n)個のダイアルが必要になります。 同様に、「状態ベクトル」を使って任意の量子状態を表すには全体で、(2^n)のベクトル要素が必要となります。

例えば、 000, 001, 010, 111 の4つの状態は、以下のような状態ベクトルとして表記できます。

[|000rangle = left( begin{array}{c} 1 0 0 0 0 0 0 0 end{array} right), |001rangle = left( begin{array}{c} 0 1 0 0 0 0 0 0 end{array} right), |010rangle = left( begin{array}{c} 0 0 1 0 0 0 0 0 end{array} right), mbox{ and } |111rangle = left( begin{array}{c} 0 0 0 0 0 0 0 1 end{array} right)]

幸運にも、大抵の場合は殆どの要素が0であり、それらを明示的に書く必要はありません。それゆえに、(左辺にかかれている)ブラ-ケット記法は非常に簡潔です。量子重ね合わせを表現するときにも、0以外の値を要素として書くだけで良いのです。例えば、50/50の(vert000rangle)と(vert111rangle)の量子重ね合わせ状態は、状態ベクトルで表すと、以下の様な完全ベクトルの表記となります。

[frac{1}{sqrt{2}}left( begin{array}{c} 1 0 0 0 0 0 0 1 end{array} right)]

これをブラーケット記法を使うと

[frac{vert000rangle + vert111rangle}{sqrt{2}}]

となり、非常に見やすくなります。実際には、必ずしも2つの状態が50/50で重ね合わせになっているとは限りません。その場合は、はじめと終わりだけが0以外となり、(vert000rangle)と(vert111rangle)の其々の確率振幅である αとβ を用いて、以下のように表すことができます。

[left( begin{array}{c} alpha 0 0 0 0 0 0 beta end{array} right) = alpha|000rangle + beta|111rangle]

こういった一連の状態空間を、ヒルベルト空間(数学者であるDavid Hilbertに由来します)と呼びます。 私達の日常生活では、2次元や3次元は馴染みがありますが、ヒルベルト空間は 2n次元です。 これは量子ビットが、SF映画に出てくるような、4次元やさらなる高次元にアクセスするということではなく、状態ベクトルで全ての量子状態を表すには、それ相応の要素数が必要になるということです。 例えば、3量子ビットでは8つの要素(あるいは8つのダイアル)、4量子ビットでは16個の要素が必要になります。

一連の要素を個別のベクトルとして扱うこともできますが、実際にはそれらの要素はヒルベルト空間において、長さ1の単一ベクトルを形成しています。

このヒルベルト空間こそが、量子重ね合わせを利用できるするという点で、量子コンピュータの能力を示す最初の重要な要点であるのです。

正規化条件

1量子ビットでは、0状態と1状態の確率の和は1になることを見てきました。これは(P(vert0rangle) + P(vert1rangle) = 1)と書くことができます。

複数の量子ビットの場合でも同様のことが言えますが、状態の数が増えるに連れて、計算は少し複雑になります。 3量子ビットをもつレジスタの場合、(2^3 = 8)の状態を取ることができます。レジスタを測定して状態が(vert000rangle)である確率を(P(vert000rangle))としたとき、以下が成り立ちます。

(P(vert000rangle) + P(vert001rangle) + P(vert010rangle) + P(vert011rangle)) (+ P(vert100rangle) + P(vert101rangle) + P(vert110rangle) + P(vert111rangle) = 1)

量子レジスタに測定を行うと、この確率に沿った状態のうちの1つを、何かしら必ず得ることができるということです。

これは「正規化条件」として知られており、古典的な確率論と同様に、量子力学の世界でも同じ条件が成り立ちます。 唯一の違いは、量子の確率を得るためには確率振幅の絶対値の自乗を取らなければいけないという点です。 例えば、3つの量子ビットの状態が、

[alphavert000rangle + betavert001rangle + gammavert010rangle + deltavert011rangle + avert100rangle + bvert101rangle + cvert110rangle + dvert111rangle]

であったとき、000を観測する確率は、(vertalphavert^2)であり、001を観測する確率は(vertbetavert^2)、 010を観測する確率は(vertgammavert^2)等以下同様、となります。 従って、以下が成り立ちます。

[vertalphavert^2 + vertbetavert^2 + vertgammavert^2 + vertdeltavert^2 + |avert^2 + |bvert^2 + |cvert^2 + |dvert^2 = 1]

複数の量子ビットの測定

量子の状態を表すのに複数のダイアルを扱う必要性があります。 量子ビットの数が増えるたびに、比較的表記が複雑になってきますが、測定について考える上でこの表記法は非常に便利です。 もし、レジスタ内の全ての量子ビットを測定しようとしたとき、各状態が観測される確率は、単一の量子ビットと同じように、各ベクトルそれぞれの長さの自乗から計算されます。

複数の量子ビットの内の1つを測定する場合、たとえばその観測結果が0である確率を求めるためには、観測対象の状態が0である部分の確率の和を求める必要があります。

ところで、量子レジスタに格納されていた状態は測定後にはどうなるのでしょうか? 基本的には、量子レジスタの中の量子ビットを全て測定した場合は格納されていた状態は完全に崩壊してしまいます。 しかし、仮に一部の量子ビットしか測定していなかった場合、部分的な状態の崩壊であるだけの可能性も十分にあります。 (frac{vert000rangle + vert011rangle + vert101rangle}{sqrt{3}}) という状態を考えてみましょう。もし、3つの量子ビット全てに測定を施した場合、1/3の確率で、000, 011, 101のどれかを得ることができます。

同様に、もし仮に一番左側の量子ビットのみを測定した場合、0を観測する確率は2/3で、1を観測する確率が1/3であると計算することができます。 観測結果が1の場合、残った2つの量子ビットは必ず(vert01rangle)という状態に確定してしまうことが分かります。 一方で、興味深いことに、観測結果が0だった場合は他の量子ビットの状態は確定されず、(vert00rangle + vert11rangle) という重ね合わせ状態が残っていることが分かるかと思います。

次回は、測定操作によって崩壊する量子もつれについて取り上げていきたいと思います。

© Keio University
This article is from the free online

Understanding Quantum Computers

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now