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

2024年1月26日金曜日

Ekert protocol revisited

Recently, I have been working on quantum algorithms that apply various quantum gates. There, the direction in which the quantum is measured is fixed, often by projecting it onto the Z axis. On the other hand, quantum algorithms that change the measurement method, that is, change the orthonormal basis and use it, are also important. For example, there is the Ekert protocol, which is the basis of quantum key distribution. I've already written about Ekert in this article, so I won't go into any further explanation, but I've revised the app that demos it this time. The situation is shown below.

The left side of the figure shows the case where there is no eavesdropping, and the right side shows the case where eavesdropping was detected. An important aspect of the Ekert protocol is the use of Bell's test, or quantum entanglement.

Animation added!
If there is no eavesdropping and Alice and Bob measure in the same orthonormal basis, the result will be 00 or 11. That is, the result is the same. Quantum entanglement is at work. On the other hand, if Eve eavesdrops first, the same thing happens between Eve and Alice. However, since quantum entanglement has already disappeared, there is no such relationship between Alice and Bob. This fact is tied to eavesdropping detection.

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