ラベル Entanglement の投稿を表示しています。 すべての投稿を表示
ラベル Entanglement の投稿を表示しています。 すべての投稿を表示

2025年10月22日水曜日

Bell回路の時間発展アニメーション

Time Evolution of the Bell Circuit

🔴概 要
 前報(→こちら)では、1量子ビットに対するアダマール変換が、シュレディンガー方程式を利用した時間発展と等価であることを知った。今回は、2量子ビットで量子もつれを生じさせるBell回路を対象として、同様の考察を行った。多くの量子コンピューティングの書籍では、1番目の量子ビットにアダマール変換を施し、次に2つの量子ビットにCNOTを施すと、瞬時に量子もつれ状態になると説明されている。だが、そこへ至るまでの時間発展を観察することは、量子力学を少し深く知ることに繋がり、量子コンピューティングを学ぶ上で有用であろう。

In the previous post, we learned that the Hadamard transformation applied to a single qubit is equivalent to time evolution governed by the Schrödinger equation.In this study, I extended that idea to a two-qubit system — the Bell circuit, which generates quantum entanglement.

In many quantum computing textbooks, it is explained that if we apply a Hadamard gate to the first qubit and then a CNOT gate to the two qubits, the system instantly becomes an entangled Bell state. However, observing how the system evolves in time toward that entangled state provides deeper insight into quantum mechanics itself. Such an approach can be highly valuable for anyone learning quantum computing, as it connects the abstract circuit model with the underlying physical process of quantum evolution.

🔴Bell回路の時間発展の観察
 下図の下段には、Bell回路のシミュレーションのスナップショットが示されている。左側は、アダマール変換を施した結果を、右側にはその後CNOTを施した結果である。一方、上段のグラフは、Bell回路に対応するハミルトニアンを時間発展させた結果である。シミュレーションの前半と後半に分けて、4つの基底|00>, |10>, |01>, |11>それぞれの測定確率を描いている。

 詳細は略すが、前報同様に、アダマールゲートとCNOTゲートそれぞれに対応するハミルトニアンを時間発展させている。完了時間も、前報と同様に設定されるが、ここでは、前半と後半がそれぞれ換算時間が1.0となるようにしてある。経過時間1.0では、シミュレーションの結果と同じく、|00>と|01>がそれぞれ確率0.5で出現することがわかる。また、経過時間2.0では、量子もつれを意味する結果が得られている。すなわち、|00>と|11>の確率がそれぞれ0.5に置き換わっている。
 さらに、上記のことを見やすくするために、アニメーションも作成した。
 
 なお、3-qubitがGHZと呼ばれる量子もつれに至る状況も同様に描くことができた。つまり、|000>を初期状態として、適切なハミルトニアンの時間発展で (|000>+|111>)/√2の状態に至る過程は以下のようになる。

2025年5月17日土曜日

Exploring Quantum Entanglement through Visualization

[Abstract]
The Mermin-Peres Magic Square is a well-known example that illustrates quantum entanglement. I have written related articles in the past (in Japanese, available [here]). This time, I aimed to deepen my understanding by visualizing the phenomenon, using four different methods:
(1)Display of a disk shape using my own simulator, (2)3D Qsphere representation with Qiskit, (3)Pauli correlation analysis, and (4)Measurement on IBM Quantum real hardware.

🔴Example: Tiny Mermin-Peres Magic

An explanation of this example is provided [here]. As shown in Fig. 1, Alice and Bob each possess two qubits. In the first half, their qubit pairs are prepared in an entangled quantum state, ǀψ₁⟩. After that, there is no further interaction between them. Nevertheless, when the final state ǀψ₂⟩ is measured, a strong correlation is observed between their outcomes (as shown later in Fig. 2 and Fig. 3). Specifically, the number of "1"s in the 2-bit classical measurement results is always even for one party and odd for the other. This reveals a strong inverse (or anti-) correlation.

🔴Confirmation Using a Homemade Quantum Circuit Simulator

Figure 2 shows the results of verifying the behavior of this example using a homemade quantum circuit simulator. The probability and phase of each basis state are displayed on a disk. In addition, numerical lists of the probability amplitudes, probabilities, and phases are provided.

For example, in the quantum state ǀψ₁⟩, if Alice's qubits are in the state ǀ00⟩, Bob's qubits will definitely be in the state ǀ11⟩. In the final state ǀψ₂⟩, if Alice is in the state ǀ00⟩, Bob's state will be either ǀ01⟩ or ǀ10⟩. It is also possible to confirm whether the total number of "1"s in the measured classical bitstrings is even or odd, as described earlier. In other words, this disk representation allows us to visually understand the quantum entangled state shared between Alice and Bob.

🔴3D display of quantum states using Qiskit's Qsphere

Quantum entanglement cannot be separated into individual qubit states, so quantum states cannot be displayed individually on a Bloch sphere. However, by using Qiskit's Qsphere, it is possible to simultaneously display all possible basis states on a sphere, as shown in Fig. 3. Here, the size of the circle at the tip of the quantum state vector is the probability value, and the color indicates the phase. It matches well with the disk display in Fig. 2.


🔴Indication of the strength of quantum entanglement by Pauli correlation

One way to investigate the quantum entangled state in more detail is the Pauli correlation measurement. This is based on the fact that, for example, the expectation value when the quantum state ǀψ⟩ is measured on the Z axis is calculated as follows: ⟨ZZ⟩ = ⟨ψǀ Z⊗Z ǀψ⟩

As an example, for the Bell state ǀψ⟩ = (ǀ00⟩+ǀ11⟩)/√2, calculations show that ⟨ZZ⟩ = 1, which means that the Z measurements of the two qubits are correlated in exactly the same direction. On the other hand, for the simple tensor product ǀψ⟩ = ǀ01⟩, ⟨ZZ⟩ = -1, which shows a strong correlation in the opposite direction but is not entangled.

In Fig. 4, in addition to the Z measurement, X and Y measurements are also performed. Although the above Pauli measurements can calculate correlations, they do not necessarily fully reflect the "quantum entanglement". Therefore, in some cases, measurements other than the Z measurement may be performed.
In Fig. 4, ZZ(q2,q3) on the horizontal axis is the ⟨ZZ⟩ calculation for Bob's quantum bit, and ZZ(q0,q1) on the vertical axis is the ⟨ZZ⟩ calculation for Alice's quantum bit. The color of the square at the intersection represents the product of their values ​​(expectation values). The darker the red, the closer it is to +1.

In the state ǀψ1⟩, if the Z measurement results of Alice's two qubits are in the same direction, then the Z measurement results of Bob's two qubits will also be in the same direction. If, on the other hand, the Z measurement results of Alice's two qubits are in opposite directions, then the Z measurement results of Bob's two qubits will also be in opposite directions. Such a strong correlation is also observed in ⟨XX⟩ and ⟨YY⟩, so they can be said to be in a fully entangled state.

On the other hand, in the state ǀψ2⟩, the Z measurement of the two qubits will have the same direction for either Alice or Bob, but different directions for the other. Therefore, it makes sense that the squares in the right panel of Fig. 4 are dark blue (the product of the expectations is -1).
 
🔴Measurement results on an actual IBM Quantum computer

Finally, Fig. 5 shows the measurement results on an actual IBM Quantum computer. This is the result of 10,000 shots performed on one of the most advanced machines, ibm_torino (Heron r1). Although there are some errors (likely due to noise) in both the measurements for the quantum states ǀψ1⟩ and ǀψ2⟩, the results well support the calculation results shown in Fig. 2, Fig. 3, and Fig. 4. It is once again amazing how far quantum computers have progressed!

2024年6月6日木曜日

ChatGPT-4oの「量子もつれ」に関する説明

 ChatGPT-4oに、以下の写真を与えて、その説明を求めた。
 2量子ビット間のもつれ(Entanglement)であるとの説明、見事ではないか!!!
 写真の中に書かれていた数式が決め手となったのか。

🔴私の問い(プロンプト)
これは何?特に、曲がった銅線は何?

🔴ChatGPT-4oからの答え
これは、量子ビットの状態を示すためのBloch球の物理モデルです。写真には、2つのBloch球があり、各Bloch球は量子ビットの状態を表しています。

曲がった銅線は、2つのBloch球の間のエンタングルメントを視覚的に示しているものです。エンタングルメントは、量子ビットが相互に依存する状態を表し、1つの量子ビットの状態がもう1つの量子ビットの状態に影響を与えることを意味します。

写真の下部にある数式 CNOT(H|0⟩|0⟩) = 1/√2 (|00⟩ + |11⟩) は、Hadamardゲート (H) と制御NOTゲート (CNOT) の操作を示しています。この操作により、2つの量子ビットがエンタングルされた状態になります。具体的には、Hadamardゲートが最初の量子ビットに適用され、その後に制御NOTゲートが両方の量子ビットに適用されます。この結果、エンタングルメント状態が得られます。

2022年11月10日木曜日

My understanding of the Quantum Key Distribution Protocol Ekert (E91)

Japanese abstract
前報は、単一量子ビットを利用する量子鍵配送プロトコルBB84の説明であったが、今回は、「もつれた状態」の2つの量子ビット対のストリームを利用した安全な鍵配送プロトコルEkertを説明する。これは、すでに本ブログで紹介した「Bellのテスト(Bellの不等式)」に基づいている。このような量子ビットを受け取った2者が、それぞれランダムに選択した正規直交基底を使ってそれを測定する。その結果の両者の古典ビット列の一致度が盗聴の有無を明らかにする。この記事は、Prof. Chris Bernhardtの著書[1]に基づいているが、小生が理解した内容を独自の観点からまとめたものである。

English Abstract
In my previous article, I described the quantum key distribution protocol BB84, which uses a single qubit. Here I describe the Ekert, a secure key distribution protocol that uses a stream of two qubit pairs in an entangled state. This is based on Bell's test (Bell's inequality) which was already introduced in this blog. Two parties that receive such qubits each measure them using randomly chosen orthonormal bases. The degree of matching between the two resulting classical bit strings reveals the presence or absence of eavesdropping. This article is based on Prof. Chris Bernhardt's book [1] and explains the Ekert from my own point of view.

●Measure qubits in different orthonormal bases
First, let's see what happens when we measure the received qubits in a different orthonormal basis than the one from the sender. In the following, for simplicity, the orthonormal bases will simply be referred to as bases. Here, one is randomly selected from the three types of bases shown in Fig 1. Bases D000, D120, and D240 correspond to setting the orientation of measurement apparatus to due north, southeast, and southwest, respectively.
    Next, Fig. 2 summarizes how each ket vector (vertical vector) of the basis used for measurement on the transmitting side is expressed in a different basis. In general, the state of a qubit will be a linear combination of the ket vectors of the chosen basis. The probability that a measurement result falls to a ket vector is the square of the coefficient of that ket vector.
    As already shown in Bell's test, Fig. 2 reveals an important point. If the measurement result in the original basis is 0 (falling to the first ket vector), it will be 0 with a probability of 1/4 when measured in another different basis. Also, if the measurement in the original basis is 1 (falling to the second ket vector), it will be 1 again with a probability of 1/4 when measured in a different basis.
    That is, there is a 1/4 probability that a measurement on the original basis agrees with another measurement on a different basis. This is a theoretical value, but if you send enough qubits and measure them, it should approach this probability infinitely.

●How the quantum key distribution protocol Ekert works
With the above preparation, we can describe the Ekert protocol. Suppose we send a stream of two qubit pairs to Alice and Bob. Importantly, paired qubits are always in the entangled state 
(1/√2) |↑〉|↑〉+(1/√2) |↓〉|↓〉.
 Both will each receive one of the pair. My description will be made below with reference to Fig.3.
    Note that the entangled states
(1/√2) |↑〉|↑〉+(1/√2) |↓〉|↓〉 
        and  
(1/√2) |↘︎〉|↘︎〉+(1/√2) |↖︎〉|↖︎〉
are exactly the same. This fact is proven in reference [1], but is omitted here.
    Suppose that Alice performs measurements on the selected basis D120 (see Figure 1) before Bob does. For example, if the result is 0 (ie, |↘︎〉|↘︎〉), Bob's qubit will also be |↘︎〉 because of the entangled state. Bob measures it on a randomly chosen basis. If the basis is different from Alice's, he gets 0 with probability 1/4, from the fact already revealed in Fig2. Similarly, if Alice's measurement result is 1, Bob's measurement result will be 1 with probability 1/4.
    Now, after all qubits have been processed, Alice and Bob exchange their lists of bases (not measurement results) of their choice. In that case, secure communication is not particularly required. Since there are three types of bases that can be selected by both, the two bases match in 1/3 of the total cases. Qubits always give the same result when measured on the same basis. Therefore, If no eavesdropping has occurred, the measurements with their agreed bases can be the common key.

●Why can eavesdropping be detected?
Now consider the case where Eve eavesdrops on an entangled qubit. As I mentioned in the previous BB84 protocol explanation, Eve always needs to set a certain base and use it to make measurements. If measured in such a way, the entanglement will disappear immediately. As a result, the probability that Alice's and Bob's classical bits match will change. For example, if Eve eavesdrops before Alice's measurements, we find that the entanglement disappears and the probability that Alice and Bob's classical bits match increases to 3/8. In other words, when the bases of Alice and Bob are different, if the probability that the classical bits of both match is 1/4, it can be said that there was no eavesdropping.
Acknowledgments
Thanks to Prof. Chris Bernhardt, author of reference [1], for kindly answering some of my questions about entanglement and Bell's inequality.
    I used the illustration (icon) of the Qni quantum circuit simulator[2] to show the qubit vectors..

References
[1] Chris Bernhardt, “Quantum Computing for Everyone”, MIT Press, 2020 

2022年10月24日月曜日

"Bellの定理"という名前の北アイルランドの通り

 今回は、Entanglement(量子もつれ)に関する著名なBell's Inequality(1964年発表のベルの不等式)について簡単に書きたいと思います。まず、この物理学者John Stewart Bellの偉大な功績を示すGoogle Mapsのスクリーンショットをご覧ください。
 人名に由来する、街の通りは幾つかあると思いますが、数学や物理の定理の名前がついているのはこれくらいしかないでしょう。すでにご紹介済みのProf. Chris Bernhardtの著書[1]に、そういう通りがあると書かれていたので、Google Mapsで検索したところ、上図のとおり発見。北アイルランドBelfastにある大学前の三日月形道路 "Bell's Theorem Crescent" がそれです。素晴らしい!多分無理ですが、Belfastへ旅行できればいいのですが。

■ノーベル物理学賞2022とBellの不等式
 今年のノーベル物理学賞は、1982年に "violation of Bell inequalities"(Bell不等式の破れ)を確立したAlain Aspect等に贈られました。ここで誤解のないように書きたいのですが、「Bell不等式の破れ、すなわち不成立」と言うと、Bellが誤っていたかのように聞こえますが、全くその逆なのです。Bellは、ある問題に関する(Local Realism, Hidden Variablesを仮定した)古典物理観点の答えと量子物理の答えが異なること(すなわち、等しくない=inequality)を示しました。そして、量子物理の方が正しいだろうと唱えていたのです。それが、発表から20年近く後に、Alain Aspectによって実証されたのです。このことは、量子物理にとって(従って量子コンピューティングにも)極めて重要なこととされています。

■Bellの不等式を古典物理と量子物理の観点から高校数学で理解する
 Bellの不等式の真髄を理解することは難しいかも知れません。しかしながら、Prof. Chris Bernhardtの著書[1]は、ある例題を用いて、高校数学の範囲の数式で、この理論を厳密かつ明快に説明しています。一貫性、厳密性、分かりやすさにおいて、卓越した名著だと感じ入ります。
 それでもなお生ずる疑問や理解が難しい点を、私は、著者にメールで2回質問(EntanglementとBell's Inequalityに関する確認)をしました。すぐに丁寧な回答を送ってくれました。それによって、私の理解は一段と深まったのです。そのメールでの応答はこちらにありますので、ご参考にして下さい。

■Bellの理論が量子物理の正しさを示すことの実用的利用
 上のBell's Inequalityは、アカデミックな世界の理論ですが、実は応用上も注目されています。その一つは、現在主流の公開鍵暗号RSAなどにとって替わるとも言われる量子暗号での量子暗号鍵の配送の安全性保証です。これに関しても、[1]に簡潔に説明されていますが、2者間で配送している量子暗号鍵を第三者が盗聴すれば、Bellの理論におけるEntanglementによって必ず露呈してしまう、というものです。Eckert Protocol for Quantum Key Distributionと呼ばれています。

参考文献
[1] Chris Bernhardt: Quantum Computing for Everyone, The MIT Press, 2020.


2022年10月21日金曜日

著者に質問してみよう - 量子計算の基礎理論

 私は、量子コンピュータの基礎理論を下記に示した英語の本で勉強しています。単なる教養としてではなく、高校数学の範囲で、厳密に式を使ってクリアに説明しているところが非常に気に入っています。易しい英語で貫かれています。

●ノーベル物理学賞2022の量子理論を高校数学で学ぶ
https://sparse-dense.blogspot.com/2022/10/2022.html

 読み進めているうちに、ヤマ場となるEntanglement(量子もつれ)とBell's Inequality(Bellの不等式(の不成立))のところで、どうしても確認したい点が出てきました。著者のChris Bernhardt(米国Fairfield大学の数学の名誉教授)に質問したところ、直ちに回答してくれました。この世界、そういう文化になっているので、思いついたら質問するのがいいですね。

もしかすると、この本で勉強する人にとって、以下の応答は役立つかも知れないと考え掲載します。Prof. Chrisからは、メール応答文のブログ掲載に同意していただいています。
(あなたのブログはとても役立ちそうだ、と言っていただいたのも嬉しい。)

----------------
【山本より】
Hello Chris,
I am a Japanese reader of "Quantum Computing for Everyone".
This book is wonderful because it tries to explain difficult things clearly in high school mathematics.

I have a few questions regarding the Entangled Quantum Clocks on Page 68.
I think this is one of the most important parts of the book.
Thank you for your reply in advance.

Q1
I understand as follows, is it correct?
"There are two humans here (me and you), each with 100 clocks.
In other words, it is not the assumption that 100 people each have a watch."

Q2
Is the First scenario or the second scenario a fact that can be derived from the entangled state shown in the center of this page?
Or rather, if such a scenario were to hold, would it be considered as explained on page 69 below?
----------------

【Chrisより】
Hello Fujio,
You are correct that entanglement is one of the most important parts. 

Q1. You are correct. There are 100 pairs of clocks. Each pair of clocks is entangled. For each pair, you have one and I have the other.

Q2. The entangled state shown corresponds to one pair of entangled clocks. As soon as one of us looks at a clock, the state immediately jumps to either 

 or .

 Both states are unentangled. We either both get YES or both get NO.

 Our clocks are correlated, they always agree, but they don’t “decide” what the answer will be until one of us looks at (measures) our clock.


Hope this helps,
Chris 
----------------

【山本より】
Dear Chris,
Thank you very much for your reply.
Your answer cleared my mind.
I totally understand!
This takes me to Chapter 5, "Bell's Inequality".

I have already featured this book of yours in my blog post.
It's in Japanese so you may not be able to read it, but here it is:
https://sparse-dense.blogspot.com/2022/10/2022.html

I hope my question and your answer will be useful to other readers.
May I publish this response as-is on my blog?

Add the following information:
A Japanese version of this book was already published by Yuichiro Minato et. al.
In the middle of p.68 of the English version, "and I have the hundred partners." was mistranslated as follows:
"suppose there are 100 people to be paired with me"
I quickly realized that it was a weird translation, but your answer made it clear.
----------------

【Chrisより】
Of course! The translation sounds a little strange. Your blog looks as though it could be very helpful.
----------------

【山本より】

Dear Chris,

With your answers to my previous questions, I was able to read and understand Chapter 5 Bell's Inequality. Just in case, I would like to confirm. I understood as below, is it correct?

In the classical model, the results of Alice's and Bob's agree at least 5/9 (=0.55) in the case of P.82. The existence of such a lower bound is called Bell's inequality.

On the other hand, in the Quantum theory model, both results agree exactly by half (=0.50). The difference between the classical model and the quantum model, that is, 0.55 not equal 0.50, is called Bell's inequality violation.

Best regards,
Fujio Yamamoto

----------------

【Chrisより】

Dear Fujio,

The classical model predicts the proportion of times the measurements agree to be at least 5/9. Quantum theory predicts 1/2. These two numbers are not equal — that’s Bell’s inequality. It means that we can perform experiments to determine which theory is incorrect. 

All experiments performed so far, have agreed with quantum theory.

Chris

----------------

【山本より】

Dear Chris,

Thank you very much again for your reply.

The word "inequality" reminded me of ">" or "<", so I focused on the "lower limit" or "upper limit". Anyway, now I have a clear understanding.

I think your book can be divided into chapters 1 to 5 (Bell' Inequality) and chapters 6 onwards. The first half is basic theory and the second half is applied. I understand the first half almost perfectly, so I can work on the second half smoothly.

Incidentally, I was able to find a street in Belfast on Google Maps named "Bell's Theorem Crescent". Great!
----------------

【山本より】

Dear Chris

I really like your book on Quantum Computing and am studying.
I wrote a blog post to remind myself of what I've learned about Entanglement and the Ekert protocol.

#My understanding of the Quantum Key Distribution Protocol Ekerthttps://sparse-dense.blogspot.com/2022/11/my-understanding-of-quantum-key.html

Thanks for your wonderful book.

Regards,
Fujio

----------------

【Chrisより】

Dear Fuji,

Great post — and in English!
Thanks for sending me this,

Chris 
----------------