# What is the probability of detecting Eve's tampering, in BB84?

Alice sends a 0 in computational basis I understand that theres a $$\frac12$$ probability that eve guesses the basis wrong, and can go with Hadamard. So it's $$\frac12$$ chance Eve will pick computational and $$\frac12$$ chance of Hadamard.

Now if Eve measured wrong and went with Hadamard, and Bob computational, however Bob got it wrong and got a $$|1\rangle$$ instead of $$|0\rangle$$, which is a $$\frac12$$ probability,

Theres a $$\frac14$$ probability Alice and bob will detect Eve's intrusion if they verify that bit.

This is all clear to me, however. Tampering is where I get confused. Detecting Eve tampered with a qubit is $$\frac14$$, and depending on the qubits $$n$$, Eve will go undetected with the probability $$\left(\frac34\right)^n$$

The question is (keep in mind there is an intruder), say Alice sent $$20$$ qubits to Bob, and only $$10$$ qubits Bob chose the correct basis, the rest are discarded. Alice and Bob then compare the results between the two to detect Eve, is the probability of detecting Eve $$1-\left(\frac34\right)^{10}$$ or just $$\left(\frac34\right)^{10}$$?

Firstly we have $$\mathbb{P}[\text{Eve detected in round i}] = \mathbb{P}[\text{Eve chooses wrong basis and Bob chooses correct basis}].$$ As we assume Alice, Bob and Eve choose their basis independently and uniformly at random we have $$\mathbb{P}[\text{Eve detected in round i}] = \frac12 \times \frac12 = \frac14.$$ So we also have $$\mathbb{P}[\text{Eve not detected in round i}] = 1-\mathbb{P}[\text{Eve detected in round i}]=\frac34$$.
Now suppose we run the protocol for $$n$$ rounds \begin{aligned} \mathbb{P}[\text{Eve detected}] &= 1-\mathbb{P}[\text{Eve not detected}] \\ &=1- \mathbb{P}[\text{Eve not detected in round 1},\dots,\text{Eve not detected in round n}] \\ &=1-\prod_{i=1}^n \mathbb{P}[\text{Eve not detected in round i}] \\ &= 1 - \left(\frac34\right)^n \end{aligned} where on the second line we used the fact that the event "Eve not detected" is the same as the event "Eve is not detected in every round", on the third line we used the assumption that each round is performed independently to take the joint probability to a product and on the final line we inserted our probability that Eve is not detected on round $$i$$.
• Intuitively this is what you'd expect (and hope) as $n$ gets large and the protocol gets longer Alice and Bob should have a larger probability to detect Eve. It would be quite strange if the probability they detected her decreased with the length of the protocol. Apr 14 at 13:44