# Estimating Interception Density in the BB84 Protocol: A Study with a Noisy Quantum Simulator
## 5 Intrusion Detection Method
### Model QBER vs. [PERSON]'s Interception Density
#### 5.2.1 Case 1: Without [PERSON]'s Interception  
This analysis starts by considering the following example. Referring again to Table 1, we consider the case in which [PERSON] encodes the bit 0 with the basis \(+\), hence employing the \(\left|\uparrow\right\rangle\) state. Indeed, we will carry out the subsequent statistical analysis by making such an assumption. Anyway, it is worth emphasizing that such a model does not preclude the generalization of the obtained results to the remaining cases, given the inherent symmetry of the problem (i.e., equiprobable random choice of bit values and bases). Moreover, throughout the remainder of this paper, quantum states will be explicitly represented only with their corresponding bit values, as each state is uniquely determined according to its associated bit once the basis has been defined. On [PERSON]'s side, the events and their associated probabilities are illustrated in Figure 5 and described as follows:  
* [PERSON] picks the correct basis, \(+\), and hence, he always measures the correct state, 0, given the ideal communication channel.
* [PERSON] picks the wrong basis, \(X\), and then the measured state is random, 0 or 1, with each state having the same probability of 0.5.  
The probability of the event \"[PERSON] selects the correct basis\", shortly \(CB\) (i.e., the \(+\) basis in Figure 5), can easily be determined:  
\[\mathbb{P}\{CB\}=\frac{1}{2}. \tag{1}\]  
With the assumption of an ideal communication channel and the properties of quantum mechanics, the probability of the event \"[PERSON] measures the same bit\" of [PERSON], shortly \(Sb\), conditioned to have selected the correct basis is \(\mathbb{P}\{Sb|CB\}=1\), as is evident from Figure 5. Therefore, in this scenario, if [PERSON] chooses the correct basis (i.e., the same as [PERSON]), he is sure about the correctness of the decoded bit.  
Figure 5: Case 1: without [PERSON].  
Differently, the unconditioned probability of the event \"[PERSON] decodes the same bit transmitted by [PERSON]\" can be easily computed using the total probability theorem:  
\[\mathbb{P}\{Sb\}=\mathbb{P}\{Sb|+\}\ \mathbb{P}(+)+\mathbb{P}\{Sb|X\}\ \mathbb{P}(X)=\mathbb{P}\{Sb|+\}, \tag{2}\]  
since \(\mathbb{P}(+)=\mathbb{P}(X)=0.5\), and \(\mathbb{P}\{Sb|+\}=\mathbb{P}\{Sb|X\}\) (for the symmetry of the formulation, as previously discussed). In the above Equation (2), the condition refers to the basis employed by [PERSON].  
Applying the total probability theorem and also considering the assumption of the state (or bit, equivalently) transmitted by [PERSON], \(\mathbb{P}\{Sb|+\}\) is given by the following:  
\[\mathbb{P}\{Sb|+\}=\mathbb{P}\{Sb|+\bigcap 0\}\ \mathbb{P}\{0\}+\mathbb{P}\{Sb|+ \bigcap 1\}\ \mathbb{P}\{1\}=\frac{3}{4}, \tag{3}\]  
where \(\mathbb{P}\{Sb|+\bigcap 0\}=\mathbb{P}\{Sb|+\bigcap 1\}=(\frac{1}{2}+ \frac{1}{4})\), and \(\mathbb{P}\{0\}=\mathbb{P}\{1\}=\frac{1}{2}\) (we recall that it is assumed that [PERSON] encodes with equal random probability 0 or 1 bit values through qubits).  
Again, the symmetry of the problem allows us to neglect the explicit computations for the other basis cases.  
Therefore, Equation (3) shows that [PERSON] measures the correct bit with a probability of 0.75. However, it is worth noting that the BB84 implementation discards the bits measured with the wrong basis, i.e., the edge \(X\) in the tree shown in Figure 5. Consequently, only around 50% of the received bits will be kept. Nevertheless, 100% of the set of measured bits with the correct bases will produce the transmitted bits without errors, as previously shown. The importance of this strategy is outlined by the successive discussion that describes the scenario where [PERSON]'s presence is assumed.