## 4 Analysis of Results
### Optimization for Performance and Security  
While the decoy state protocol has been optimized with respect to MPNs contributing to secret key distribution [25], the signal and decoy state occurrence percentages have not been optimized for maximizing quantum throughout while simultaneously detecting PNS attacks with high confidence. Hence, we provide an optimization which assures high security confidence and allows the protocol's performance to be maximized based on a detailed study of signal and decoy state MPNs and occurrence percentages, as well as, design decisions and architectural considerations. From this study, we learn that the protocol's ability to detect PNS attacks is primarily controlled by losses due to each state's occurrence percentage, MPN, and the end-to-end quantum communication path. More specifically, to detect PNS attacks in real-time with high confidence only a few decoy state detections are necessary during each round of quantum exchange (i.e., a predetermined number of detections). For example, the decoy state protocol can be configured to perform the PNS attack check after each round of 100,000 detections. Furthermore, we learn that an arbitrarily high level of confidence (e.g., >99.9%) is possible because statistical confidence is increased through multiple rounds of quantum exchange and not the number of decoy state detections per round. Note this optimization is meant to maximize quantum throughput and requires that other secret key rate estimations such as \(Q_{1}\) and \(e_{1}\) for Equation (2) be derived from dedicated, periodic calibration runs. In order to optimize the decoy state protocol, the developer should choose the highest signal state occurrence percentage possible, while meeting the minimum number of decoy state detections to reliably detect PNS attacks (i.e., choose the minimal decoy occurrence percentage possible). Assuming the suggested MPNs of [PERSON] et al. are used (\(\mu=0.5,\ \
u=0.1\)) [25], the optimized decoy state protocol configuration can be described in a system of equations. First, the signal state occurrence percentage \(S_{\mu}\) should be as a close to unity as possible  
\[S_{\mu}\to 1 \tag{10}\]  
where \(S_{\mu}\) is limited by the decoy and vacuum state occurrence percentages \(S_{\
u}\), \(S_{Y_{0}}\), respectively  
\[S_{\mu}=1-S_{\
u}-S_{Y_{0}}. \tag{11}\]  
Accordingly, it is advantageous to minimize both \(S_{\
u}\) and \(S_{Y_{0}}\); however, the decoy state occurrence percentage \(S_{\
u}\) must be high enough to effectively differentiate between noise on the quantum channel and a PNS attack where the decoy state gain \(Q_{\
u}\) must exceed the system's measured dark count rate \(Y_{0}\). \[Q_{\
u}>Y_{0}. \tag{12}\]This condition implies at least one decoy state detection \(N_{\
u}\) per round of quantum exchange which is not due to a dark count (i.e., a signal to noise ratio >1). Thus, the optimized decoy state configuration can be further clarified  
\[S_{\
u}\ll 1 \tag{13}\]  
\[N_{\
u}\geq 1. \tag{14}\]  
For a given architecture, the optimized decoy state protocol can be determined from the minimum number of decoy state detections \(N_{\
u}\), the desired number of signal state detections \(N_{\mu}\), the signal and decoy state gains \(Q_{\mu}\), \(Q_{\
u}\), and their occurrence percentages \(S_{\mu}\), \(S_{\
u}\) where  
\[N_{\
u}=S_{\
u}Q_{\
u}N_{total\ pulses\ sent} \tag{15}\]  
\[N_{total\ pulses\ sent}=\frac{N_{\mu}}{S_{\mu}Q_{\mu}} \tag{16}\]  
\[S_{\
u}=\frac{N_{\
u}S_{\mu}Q_{\mu}}{Q_{\
u}N_{\mu}}. \tag{17}\]  
While the necessary parameters for optimization are readily available, in order maximize performance the system's architecture must be well-characterized in the desired operational environment.