I was trying to self-study qmc by reading the Quantum Computing A Gentle Introduction book, in section 2.4 it talks about the quantum key distribution protocol BB84. After (I thought) I understood it I went to work on exercise 2.9 and 2.10.
Ex. 2.9 is asking how many bits do Alice and Bob need to compare to be 90% confident that there is no Eve present in BB84. So if I understood correctly, BB84 is as follows:
- Alice randomly chooses a basis/polarization of photon from the two bases $\{ | 0 \rangle, | 1 \rangle \}$ and $\{ |+\rangle, |-\rangle \}$ to encode the bit information $0$ or $1$ (the encoding rule is known e.g. $|0\rangle$ represents $0$). Then she sends a sequence of such photons to Bob.
- Bob receives the sequence of photons and randomly chooses a basis from the two same bases and measures for each one of the photon.
- They then compare the bases they chose and discard the ones where they chose base differently. Bob should be able to figure out what bit Alice is trying to send. (e.g. if the base they use is $\{ |0\rangle, |1\rangle \}$ and Bob has measured using the basis $|1\rangle$ but got $0$ light intensity then he knows that Alice's polarization was $|0\rangle$ so the bit information is $0$).
- To be more secure, they also compare a subset of bits, if there is no interference then their bits should all agree. They discard these bits and what left is the key.
Eve, on the other hand, is trying to intercept the photon from Alice, measures it randomly from the two bases too, then she sends the basis she uses for measurement to Bob. After Alice & Bob publicly compare their bases, Eve can know $25%$ of the key for sure, although she inevitably changed the photon Bob would have received.
So to answer the first question ex. 2.9, I listed out different scenarios when Alice and Bob compare a subset of bits :
Suppose Alice sends a $|0\rangle$,
There is $0.25$ probability Eve also measures with $|0\rangle$, then she would not get detected.
$0.25$ - Eve measures using $|1\rangle$ then she would get detected for sure as Bob will get the opposite bit value as Alice.
$0.25$ chance Eve measures using $|+\rangle$, Bob now will receive $|+\rangle$, then if Bob uses $|0\rangle$ and obtain the same with $0.5$ chance, else if he uses $|1\rangle$ to measure but still end up with the correct bit with $0.5$ chance. That is $0.25 \times (0.5 + 0.5) = 0.25$
Same as 3, 0.25
So to sum up the probability Eve would go undetected, it's $0.25 + 0 + 0.25 + 0.25 = 3/4$, and we want the sequence of bits Eve goes undetected be less than $10%$, which yields $(\frac{3}{4})^n < 0.1$, approximately $n=8$.
The second question 2.10c, modifies the condition a little bit, instead of Eve chooses from the two known bases (the standard and the $+/-$), she does not know which to choose so she chooses randomly, then how many bits A&B needs to compare to have 90% confidence?
My approach is that, suppose Alice still uses standard base $\{|0\rangle |1\rangle \}$ and she sends a $|0\rangle$. Now Eve can measure it in her base $\{ |e_1\rangle, |e_2\rangle \}$ where $|e_1\rangle = \cos\theta|0\rangle + \sin\theta|1\rangle$ and $|e_2\rangle = \sin\theta|0\rangle-\cos\theta|1\rangle$, then Eve sends off the basis she uses to Bob again. I'm again listing out the scenarios,
- If Eve measures with $|e_1\rangle$ (with 0.5 chance) then Bob receives $|e_1\rangle$, then if Bob measures with $|0\rangle$ then he gets correct bit with $|\cos\theta|^2$ probabiltity, if he measures in $|1\rangle$ then he gets correct bit with $1 - |\sin\theta|^2=|\cos\theta|^2$. Simiarly when Eve uses $|e_2\rangle$
sum up then I got $0.5\times(2|\cos\theta|^2)+0.5\times(2|\sin\theta|^2)=1$, this for sure is not correct!
Then I tried to search online and found a solution here, where it says the probability Bob gets correct bit is instead: $|\langle0|e_1\rangle\langle e_1|0\rangle|^2 + |\langle0|e_2\rangle\langle e_2|0\rangle|^2 =\cos^4\theta+\sin^4\theta$, then integrate over $[0, \frac{\pi}{2}]$ (normalized by $\pi/2$) is $\frac{3}{4}$ which is again same as in ex2.9.
Can someone explain why it's $\cos^4\theta+\sin^4\theta$ in both math details and high-level intuition (e.g. why even Eve does not know which base to use it still requires 8 bits comparison for A&B?)?
Thanks a lot!