## 4 Simulation Results and Discussion  
Employing the procedure described in Section 3, averages over 1000 simulations using raw keys with lengths \(N_{\text{raw}}=100\) to 1,024,000 bits give QBERs of \((4.04\pm 20/\sqrt{N_{\text{sifted}}})\%\). The observed sample standard deviation of the QBER follows the expected dependence on the length of the sifted key. These results are consistent with the HOM-interference visibility reported in [17]. The fraction of bits discarded due to opposite basis selection or unusable measurement results are also in line with expectations--approximately 25% of the raw key bits are retained in the sifted key. Additionally, we explore the consequences of systematically relaxing photon source tolerances to determine the sensitivity of the QBER to fluctuations in wavelength, pulse bandwidth, polarization angle, and source synchronization. The results of these simulations are shown in Figure 4. Each point in the figure represents the average QBER from 100 iterations with \(N_{\text{raw}}=2500\) for a fixed set of photon source parameters. The standard deviations of (a) photon wavelength; (b) pulse bandwidth; (c) polarization angle; and (d) photon synchronization are varied relative to their nominal values, indicated by orange diamonds, while other photon source parameters are held fixed. As expected, the QBER increases with increasing probability of photon distinguishability due to source fluctuations. In our simulation of the MDI-QKD protocol, we obtain [PERSON]'s and [PERSON]'s sifted keys, from which we can identify specific bit errors and calculate the QBER explicitly. In a fielded QKD system, a sifted key that contains errors is not useful for encrypted communication and neither party alone possesses sufficient information to identify and correct these errors. Further, the finite QBER sets a information-theoretic non-zero upper bound on how much information [PERSON] might have obtained about the sifted key by eavesdropping on the quantum channel. All bit errors in our simulated sifted key are attributable to finite source tolerances rather than an eavesdropper. However, in practice, bit errors due to the actions of [PERSON] on the quantum channel are physically indistinguishable from bit errors arising from finite source tolerances (or other system imperfections), and thus, in a rigorous security analysis, bit errors arising from all sources must be attributed to information gained by [PERSON] [1]. The process of removing bit errors and [PERSON]'s information from the sifted keys to obtain a shorter secure shared key is called key distillation. The first step of the process is the estimation of the QBER. This can be achieved by publicly comparing a random sample of bits from the sifted key. As the selected bits are revealed on an open channel, they must be discarded, reducing the length of the sifted key. For given key distillation and QKD protocols, the QBER determines the fraction of the remaining key bits that must be consumed to achieve the desired error free and secure key. If the QBER exceeds a protocol-dependent threshold, this fraction is greater than one and the key distillation fails [23]. Even if the QBER does not exceed the threshold, the length of the distilled key can be a tiny fraction of the length of the original sifted key, making the absolute rate of secure shared key generation prohibitively low. For these reasons, minimizing all sources of bit errors, including those due to finite photon source tolerances, is critical for MDI-QKD system performance. Assuming the QBER does not exceed the failure threshold, classical error correction and privacy amplification protocols are applied to the remaining sifted key to complete the key distillation. The extensive literature addressing the application of error correction and privacy amplification to QKD protocols is summarized by [PERSON] and [PERSON].