Skip main navigation

Working with larger quantum registers

How do we work with data in a quantum computer? In this article, read about entanglement and collapse of many-qubit states.
© Keio University

Working with multi-qubit registers allows the number of possible states to grow exponentially. It requires us to keep track of the weight (or amplitude) and phase of each possible state.

Weights and measures

Let’s say we have two quantum registers, which we will call (A) and (B), and we add them together and put the result in register (C), so that (C = A + B). (These registers would each have more than one qubit, but for our purposes here we can treat them as a single numeric value.)

Let’s assume we begin with (A) in a superposition of all of the numbers 0 to 3. We can write this using our dial representation, but in this case a simple table will do. Our values for (A):

A
0
1
2
3

and (B) the same:

B
0
1
2
3

Then when we add them together, obviously (C) will be the superposition of the numbers 0 to 6. But it’s not quite as simple as that.

Since there are more different ways to get 3 when you add two numbers (0+3, 1+2, 2+1, 3+0) than to get 6 (only 3+3), there will be a different weight in the register set for the value (C=3) than for the value (C=6).

Moreover, our (A), (B) and (C) registers are now entangled, so we can no longer write down their values independently. There are four possible values for (A), four for (B), and seven for (C), so we might need as many as (4 times 4 times 7 = 112) different clock dial vectors! This shows the amazing growth in the classical resources necessary to represent the state of a quantum computer; although we are using only a few quantum values here, it is already impractical to write down the entire state. Fortunately, out of the 112 possibilities, only sixteen of them are non-zero. Let’s list them:

A B C
0 0 0
0 1 1
0 2 2
0 3 3
1 0 1
1 1 2
1 2 3
1 3 4
2 0 2
2 1 3
2 2 4
2 3 5
3 0 3
3 1 4
3 2 5
3 3 6

If we reorganize our list, sorting according to the values of (C), we get this:

A B C
0 0 0
0 1 1
1 0 1
0 2 2
1 1 2
2 0 2
0 3 3
1 2 3
2 1 3
3 0 3
1 3 4
2 2 4
3 1 4
2 3 5
3 2 5
3 3 6

It’s now obvious that (C=3) has four times the weight of (C=6) or (C=0). When we measure (C), with some probability we will find each of the possible outcomes. The probability of finding 3 is (1/4), four times the probability of finding 0, which is only (1/16).

Let us assume that we do, in fact, find (C=3). When this happens, the superposition collapses, and we are left with only the terms that included a value of 3 for (C):

A B C
0 3 3
1 2 3
2 1 3
3 0 3

After measuring (C), it is no longer entangled with (A) and (B), but in this case (A) and (B) are still entangled with each other.

The ket notation

Of course, writing down tables this way is relatively clear but clumsy, which is why we use the ket notation. We can also track the weights a little more clearly. The initial superpositions for (|Arangle) and (|Brangle) would be

[|Arangle = frac{|0rangle + |1rangle + |2rangle + |3rangle}{2}] [|Brangle = frac{|0rangle + |1rangle + |2rangle + |3rangle}{2}]

To write down the combination of (|Arangle) and (|Brangle), we can put them together inside one ket, separated by a comma. For example, (|1,3rangle) would be (A=1, B=3). Since our two registers are independent and each has four terms, it’s now obvious that we have sixteen values to write down, one corresponding to each line in the table above.

Let’s skip forward a couple of steps and write down all three of our registers after measuring (C) and finding 3:

[|A,B,Crangle = frac{|0,3,3rangle + |1,2,3rangle + |2,1,3rangle + |3,0,3rangle}{2}]

Since all of the values for (C) are the same here, now we can factor (|Crangle) out:

[|A,B,Crangle = frac{(|0,3rangle + |1,2rangle + |2,1rangle + |3,0rangle)|3rangle}{2}]

Since (C) is no longer entangled with (A) and (B), we can ignore it if it’s convenient, and just write (A) and (B). Of course, the vector lengths are adjusted at every step in this process so that the whole set remains normalized, but as long as all of the terms are the same weight and we mentally keep track, we can simplify it and just write down

[|0,3rangle + |1,2rangle + |2,1rangle + |3,0rangle]

This kind of partial collapse of the entire state, leaving some terms and entanglement, is a key to the way quantum algorithms work, and we will see its use in the upcoming Steps.

より大きな量子レジスタの利用

複数の量子ビットを使ったレジスタを使うことで、扱うことのできる状態は指数関数的に増加します。このような大きな量子レジスタを活用するためには、取りうるすべての状態に対して、重み(もしくは振幅)と位相を逐一記憶しておく必要があります。

重みと測定

(A)と(B)の2つの量子レジスタがあると仮定し、そしてそれらを加算した結果をレジスタCに入れると、(C = A + B)となります。 (これらのレジスタはそれぞれ複数の量子ビットを持つ可能性がありますが、ここでは単一の数値を保持することとします)。

まず、(A)が0から3までのすべての数字の重ね合わせの状態にあると仮定します。ダイヤル表記を使用してこれを書くこともできますが、この場合は以下のような単純な表で表現できます。 (A)の値:

A
0
1
2
3

(B)も同じ:

B
0
1
2
3

次に、(A)と(B)を加算した(C)の値は、0から6までの数字を重ね合わせたものになります。しかしそれほど単純ではありません。

2つの数字を足して(C = 6)を得る(3+3の1通り)よりも(C = 3)を得る(0+3, 1+2, 2+1, 3+0の4通り)の方がたくさんの組み合わせがあります。

さらにいえば、(A)、(B)、(C)のレジスタは量子もつれ状態にあるので、それらの値を独立に決定することはできません。 (A)には4つと(B)には4つの値の候補があり(C)には7つの値の候補があります。したがって、(4 times 4 times 7 = 112)種類のクロックダイヤルベクトルが必要になることになります。これは、量子コンピュータの状態を表現するために必要な古典的なリソースの驚異的な量の伸びを示しています。しかし、ここではいくつかの量子値しか使用していませんので、状態全体を書き留めるのは実用的ではありません。幸いにも、112の可能性のうち、可能性がゼロでないものは、わずか16だけですので、まずそれらをリストアップしてみましょう:

A B C
0 0 0
0 1 1
0 2 2
0 3 3
1 0 1
1 1 2
1 2 3
1 3 4
2 0 2
2 1 3
2 2 4
2 3 5
3 0 3
3 1 4
3 2 5
3 3 6

リストを再編成して(C)の値に従ってソートすると、次のようになります。

A B C
0 0 0
0 1 1
1 0 1
0 2 2
1 1 2
2 0 2
0 3 3
1 2 3
2 1 3
3 0 3
1 3 4
2 2 4
3 1 4
2 3 5
3 2 5
3 3 6

この表から、(C = 3)は(C = 6)または(C = 0)の4倍の重みを持つことがすぐに分かります。 (C)を測定すると、ある確率で、それぞれの結果を得ることができます。 3を得る確率は(1/4)であり、0を得る確率の4倍であり、わずか(1/16)です。

実際に(C)を測定して、(C = 3)を得たと仮定します。それと同時に重ね合わせは収束し、(C)の値が3を含む項のみが残されます。

A B C
0 3 3
1 2 3
2 1 3
3 0 3

(C)の測定後、(C)は(A)とも(B)とも量子もつれはなくなりますが、この場合はまだ、(A)と(B)は互いに量子もつれの状態にあります。

ブラ-ケット記法

もちろん、このようにテーブルを書き留めることは、比較的明快ですがあまり効率はよくありません。そのため、ブラ-ケット表記を使用することで、正確にかつ。また、重みを少しはっきりと確認することもできます。(|Arangle)と(|Brangle)の最初の重ね合わせは、

[|Arangle = frac{|0rangle + |1rangle + |2rangle + |3rangle}{2}] [|Brangle = frac{|0rangle + |1rangle + |2rangle + |3rangle}{2}]

(vert Arangle)と(vert Brangle)の組み合わせを表記するには、カンマで区切って1つのケット内にまとめることができます。たとえば、(vert1,3rangle)は(A = 1)、(B = 3)を示します。2つのレジスタは独立していてそれぞれが4つの項を持っているので、ここでは16の値があることが明らかになります。それぞれ上の表の各行に対応しています。

いくつかのステップをスキップし、(C)を測定して3を観測した後の3つのレジスタをすべて書き留めましょう。

[|A,B,Crangle = frac{|0,3,3rangle + |1,2,3rangle + |2,1,3rangle + |3,0,3rangle}{2}]

この段階では、(C)の値はいずれの場合も同じ3なので、ここで(vert Crangle)を因数分解することができます。

[|A,B,Crangle = frac{(|0,3rangle + |1,2rangle + |2,1rangle + |3,0rangle)|3rangle}{2}]

(C)はもはや(A)と(B)と量子もつれの関係にないので、無視して、(A)と(B)を書くだけでも構いません。もちろん、ベクトルの長さはこの過程のすべてのステップで調整されるので、全体が正規化されていて。すべての項が同じ重みであることを覚えておけば、以下のように単純化して表現することができます。

[|0,3rangle + |1,2rangle + |2,1rangle + |3,0rangle]

このように、部分的な状態の収束は、いくつかの項ともつれた量子ビットを残しますが、これこそが、量子アルゴリズムのの動作の鍵を握っています。これからのステップで詳しく見ていきましょう。

© 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