ラベル Bell's Inequality の投稿を表示しています。 すべての投稿を表示
ラベル Bell's Inequality の投稿を表示しています。 すべての投稿を表示

2023年6月16日金曜日

A mobile app that simulates the Ekert protocol for quantum key distribution

Abstract: In my previous article, I theoretically described how the quantum key distribution protocol Ekert, which uses streams of entangled qubit pairs, works, referring to [1]. This time, for each individual qubit, an orthonormal basis is randomly chosen and the measurements are simulated. As a result, confirm that the same conclusion (probability value) as the theory is obtained. A mobile application for this purpose was developed using MIT App Inventor. By creating such an app, we can deepen our understanding of measurements involving quantum entanglement.

What can you do with the mobile app?
The app logo, shown in Fig. 1, highlights the features of this mobile app. Now the pair of qubits possessed by Alice and Bob are in an entangled state, and they measure each other on different orthonormal bases (hereafter simply called bases). There are three types of bases that can be selected. Without eavesdropping, the probability that both measurements agree is 1/4. If there is eavesdropping, the probability increases to 3/8. This app can verify these theoretical values for a large number of entangled quantum pairs (eg, 3000 pairs).

Run the mobile app to validate the Ekert protocol
Fig.2 shows an execution example of this application. (a) is the case without wiretapping. First Alice makes the measurements, then Bob makes the measurements. Since the qubit pairs are in entangled states, Bob's measurement depends on Alice's measurement. The theoretical value of the matching probability between the two measurement results is 1/4 (=0.250), but the execution result of this application was 0.254. I'd say it's an almost perfect match.

On the other hand, in the case of eavesdropping, the situation is as shown in Fig.2(b). Suppose Eve has eavesdropped (namely measured) a qubit before Alice and Bob. Alice then measures. It depends on Eve's measurements. After that, when Bob measures, it depends on Eve's, but not on Alice's. This is because the entangled states between qubits have disappeared when Eve measures them. The matching probability between Alice and Bob's measurement results is theoretically 3/8 (0.375), but the application execution result is 0.374. This was also an almost perfect match.

From the above observations, we can say that this app simulates the Ekert protocol correctly. If it is confirmed that there is no eavesdropping as in FIg.2(a), the measurement results of 1001 pairs, which is about one-third of the 3000 pairs, can be shared as a secure quantum key. A great advantage is that there is no need to exchange the key between the two, that is, there is no need to send it to each other. In fact, in this case, ["a",1]["b",1]["b",1]["b",0]["a",0]["c",0]["b",1]["a",1]["a",1]["c",0]["a",1]["a",0] ... match both, so the classical bit string "111000111010..." can be an encryption key.

Mechanism of the mobile app
The most important parts of this mobile app are shown in Fig.3. This deals with the cases where the results of measuring  qubits by the base ① are the classical bits shown in ②. The probability ④ that results in "|0>" when measuring such a qubit with a newly selected basis ③ is stored in the table on the right side of the figure. From such information, we can obtain the result (classical bit) of measuring the qubit by the basis of ③.

Note that this measuring block that uses the photon transit probability can also be constructed as shown in the figure below, without using a table:

Additional information
This app uses random numbers, so the results will vary slightly each time you run it. However, I would like to confirm that this is not an obstacle in determining the presence or absence of eavesdropping. FIG. 4 shows the results of 25 runs of the 3000-pair entangled quanta measurements shown above. Fig. 4(a) shows the probability that Alice's and Bob's measurement results agree with each other (when they choose different orthonormal bases) both with and without eavesdropping. Both probabilities were found to be in good agreement with the theoretical values (0.375 and 0.250). On the other hand, Fig. 4(b) shows that the quantum key length that can be used when it turns out that there is no eavesdropping agrees well with the theoretical value (here, 1,000).
In the above, the length of the quantum pair is assumed to be 3,000. Fig.5 shows the results when this length is changed to 150 and 30,000. With a length of 150, it is difficult to determine the presence or absence of eavesdropping. On the other hand, when the length is set to 30,000, it was found that the presence/absence of eavesdropping can be determined more clearly than in the case of Fig.4.

----------------------------------------------------------------------------------
My recent quantum computing related mobile apps : Polarization, the BB84, and the Ekert. Both were developed based on Reference[1].
----------------------------------------------------------------------------------

Reference
[1] Chris Bernhardt: Quantum Computing for Everyone, The MIT Press, 2020.

2023年6月12日月曜日

Detecting eavesdropping in Ekert protocol for quantum key distribution

Abstract: The Ekert protocol is a secure key distribution protocol that utilizes a stream of two qubit pairs in an entangled state. Alice and Bob each measure the received quanta using a randomly chosen orthonormal basis. The degree of matching between the classical bit strings of the two as a result indicates the presence or absence of eavesdropping. This is explained in the last section of chapter 8 "Bell's Inequality" of reference [1]. There, the calculation of the match probability in the absence of eavesdropping is clearly explained. However, details of how to calculate the matching probability (=3/8) in the case of eavesdropping are not shown. This blog post tracked that calculation.

Primitive cryptographic key distribution using quantum entanglement
Quantum entanglement makes it possible to share cryptographic keys without having to create them in advance and send them to each other. However, as shown in Fig.1, in practice, such a method cannot be used easily. This is because, if eavesdropped, it cannot be detected.


Ekert protocol (E91) for quantum key distribution
The solution is the Ekert protocol. Send a stream of entangled pairs of qubits (of length 3n) to Alice and Bob. They receive the qubits one by one from the pair. Each time, they both randomly select one of the three orthonormal bases to measure one's qubit. The results of the measurements are recorded along with the basis of choice. Finally, both sides exchange selected bases information (not measurements) in normal communication. Of these, approximately n bases should be the same in both, and the remaining 2n should be different in both.

For bases (2n of their own) that do not agree between them, they exchange their measurement results. It can be done by normal communication without encryption. When calculating the probability that the measurement results match, the value becomes 1/4, if there is no eavesdropping by a third party (that is, if the third party does not measure the qubits). Details of the calculation are given in reference [1]. If the value can be confirmed, the measurement results for the remaining n bases that agree with each other can be used as  an encryption key. That is, both parties can share the encryption key without sending it to each other. See Fig.2(1).

However, if a third party Eve eavesdrops on the qubits before Alice's and Bob's measurements, the matching probability of Alice's and Bob's measurements changes to a value of 3/8. See Fig.2(2). But how is this value calculated? I will clarify that next.

Comparison of Alice's and Bob's measurement results when eavesdropped
Fig.3 shows the calculation of the match probability (3/8) mentioned above. See diagram for details. There are nine combinations of bases that Alice and Bob can choose from, but we are only interested in the cases that their bases are different. The match probability for the six combinations is shown in red. In this example, Eve chose Standard basis, but she would have chosen anything else.

Fig. 4 shows in more detail the calculations for cases (a) and (b) among the six combinations. Eve's results are measured by Alice and Bob on the basis of their choice. The probability amplitude at that time is used in the calculation.


From the above, the Ekert protocol mechanism for generating cryptographic keys and detecting eavesdropping by a third party has been completely clarified.

Special Acknowledgment
I have forwarded this blog post to Prof. Chris Bernhardt, the author of reference [1]. He sent me an email confirming that this calculation is correct. Below is the last two lines of his answer. I would like to thank him. (2023-06-12)
Reference
[1] Chris Bernhardt: Quantum Computing for Everyone, The MIT Press, 2020.
https://www.chrisbernhardt.info/

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