# 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.2 Case 2: With [PERSON]  
A more complex scenario occurs when [PERSON] mimics [PERSON]'s behavior by attempting to intercept the bits transmitted by [PERSON]. The discussion of this case considers an example similar to the previous case, i.e., [PERSON] encodes the bit 0 with the basis \(+\). The alternative events are illustrated in Figure 6 and described in the following. * [PERSON] picks the correct basis with a probability of 0.5, always measuring the bit 0. As illustrated in the lower edge of the tree shown in Figure 6, in this case, [PERSON] is in the same situation as in the previous case; i.e., he receives a bit, \"0\", transmitted using the basis \(+\) (i.e., state \(|0\rangle\)). [PERSON] is transparent to [PERSON]'s reception performance. Therefore, [PERSON] measures the bit \"0\" with a probability of 1 when the correct basis, \(+\), is selected. Consequently, the global probability of measuring the bit \"0\" in this case is \(\frac{1}{4}\). Another event that allows [PERSON] to observe \"0\" is when he uses the wrong basis. In this case, the two alternative outputs, 0 and 1, can be observed with the same probability. Thus, the probability of observing 0 is obtained from the intersection of the following events: \"[PERSON] selects the correct basis\", \"[PERSON] selects the wrong basis\", and \"on the wrong basis [PERSON] measures 0\". All of these events have the same probability, \(\frac{1}{2}\). Thus, the probability of this global event is \(\frac{1}{8}\). * [PERSON] picks the wrong basis with a probability of 0.5 and will equiprobabilly measure the two alternative bits, 0 and 1. From this point, [PERSON] performs his measurement, which leads to two different scenarios:
* [PERSON] measured 0; [PERSON] will measure 0 with a probability equal to 1 when picking the wrong basis (with respect to [PERSON] and, hence, the same basis of [PERSON]) and, randomly, 0 (with 50% probability) when picking the same basis as [PERSON]. When taking into account the probability of [PERSON]'s choices, the global probabilities of the two events are \(\frac{1}{8}\) and \(\frac{1}{16}\), respectively. * If [PERSON] measured 1, [PERSON] will measure 1 with a probability equal to 1 when picking the wrong basis and, randomly, 0 (with, again, a 50% probability) when picking the same basis as [PERSON]. In summary, [PERSON] selects the correct state, 0, with probability \(\frac{1}{16}\). This can be computed as the product of the probability of the following
events: \"[PERSON] picks the wrong basis\", \"[PERSON] measures 1\", \"[PERSON] picks the same basis as [PERSON]\", and \"[PERSON] measures 0\". Indeed, all the above events are independent and have the same probability, \(\frac{1}{2}\). Equation (2) allows \(\mathbb{P}\{Sb\}\) to be obtained via the calculation of \(\mathbb{P}\{Sb|+\}\). The detailed analysis presented above allows for the calculation of this probability as follows:  
\[ \begin{split}\mathbb{P}\{Sb|+\}&=\mathbb{P}\{Sb| +\bigcap 0\}\,\mathbb{P}\{0\}+\mathbb{P}\{Sb|+\bigcap 1\}\,\mathbb{P}\{1\}\\ &=2\,\frac{1}{2}\,\mathbb{P}\{Sb|0\bigcap+\}=\mathbb{P}\{Sb|+ \bigcap 0\}.\end{split}  \tag{4}\]  
\(\mathbb{P}\{Sb|+\bigcap 0\}\) can be calculated by summing the probability of the different events leading [PERSON] to measure state 0, as detailed above. Hence, referring to Figure 6, we get \(\mathbb{P}\{Sb|0\bigcap+\}=\frac{1}{4}+\frac{1}{8}+\frac{1}{16}+\frac{1}{16}+ \frac{1}{8}=\frac{5}{8}\). Consequently,  
\[\mathbb{P}\{Sb\}=\mathbb{P}\{Sb|+\}=\frac{5}{8}=0.625. \tag{5}\]  
This result indicates that [PERSON]'s presence reduces \(\mathbb{P}\{Sb\}\) from 0.75 to 0.625. It is worth noting again that, in the BB84 procedure, only the bits that [PERSON] obtains using the same basis as [PERSON] are considered. The others are rejected. Figure 6: Case 2: with [PERSON]. Consequently, it is also important to calculate \(\mathbb{P}\{Sb|CB\}\):  
\[\mathbb{P}\{Sb|CB\}=\frac{\mathbb{P}\{Sb\bigcap CB\}}{\mathbb{P}\{CB\}}, \tag{6}\]  
where, again, \(\mathbb{P}\{CB\}=\frac{1}{2}\), and  
\[