Working with larger quantum registers
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]
ใใฎใใใซใ้จๅ็ใช็ถๆ ใฎๅๆใฏใใใใคใใฎ้ ใจใใคใใ้ๅญใใใใๆฎใใพใใใใใใใใใ้ๅญใขใซใดใชใบใ ใฎใฎๅไฝใฎ้ตใๆกใฃใฆใใพใใใใใใใฎในใใใใง่ฉณใใ่ฆใฆใใใพใใใใ
Share this post
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.
Register to receive updates
-
Create an account to receive our newsletter, course recommendations and promotions.
Register for free