# Sending-or-Not-Sending Twin-Field Quantum Key Distribution with Light Source Monitoring
## 2 SNS Protocol with LSM
### Security Analysis under UPC
The secret key rate of the SNS protocol has been given as [22; 27]:  
\[R=2\epsilon(1-\epsilon)P_{1}^{L}(\mu_{s})s_{1}^{L}[1-H(e_{1}^{ph,U})]-fS_{Z}H( E_{Z}), \tag{9}\]  
in which \(\epsilon\) is the probability that [PERSON] ([PERSON]) chooses to send out a signal pulse (it can be preset in the protocol), \(H(x)=-x{\rm log}_{2}x-(1-x){\rm log}_{2}(1-x)\) is the binary Shannon entropy function, \(P_{1}^{L}(\mu_{s})\) is the lower bound of the probability that a state with intensity \(\mu_{s}\) sent in signal windows contains single photon, \(s_{1}^{L}\) and \(e_{1}^{Ll}\) refer to the lower bound of the count rate and the upper bound of phase error rate for the single photon part of signals, \(S_{Z}\) and \(E_{Z}\) refer to the count rate and the bit error rate of the signals. In decoy windows, a three-intensity decoy method with intensities \(\mu_{d_{0}}=0,\mu_{d_{1}},\mu_{d_{2}}\) and \(\mu_{d_{2}}>\mu_{d_{1}}>0\) is used to estimate \(s_{1}^{L}\) and \(e_{1}^{Ll}\) and the results are obtained as [22]  
\[s_{1}^{L}=\frac{p_{2}(\mu_{d_{2}})[S_{\mu_{d_{1}}}-p_{0}(\mu_{d_{1}})S_{0}]-p_{ 2}(\mu_{d_{1}})[S_{\mu_{d_{2}}}-p_{0}(\mu_{d_{2}})S_{0}]}{p_{2}(\mu_{d_{2}})p_ {1}(\mu_{d_{1}})-p_{2}(\mu_{d_{1}})p_{1}(\mu_{d_{2}})}, \tag{10}\]  
\[|\psi_{1}\rangle=\frac{1}{\sqrt{2}}[e^{i(\delta_{B}+\gamma_{B})}|0\rangle_{A}|1 \rangle_{B}+e^{i(\delta_{A}+\gamma_{A})}|1\rangle_{A}|0\rangle_{B}]. \tag{2}\]0  
where \(p_{0}(\mu_{d_{k}}),p_{1}(\mu_{d_{k}}),p_{2}(\mu_{d_{k}})\)\((k=0,1,2)\) are the probabilities that a state with intensity \(\mu_{d_{k}}\) sent in decoy windows contains zero, single or two photons, \(S_{\mu_{d_{k}}},E_{\mu_{d_{k}}}\) are the count rate and bit error rate of a state with intensity \(\mu_{d_{k}}\) sent in decoy windows. In the original SNS protocol, the light source is assumed to be able to prepare ideal coherent states [22], thus the PND of the light source satisfies Poisson distribution for each of [PERSON] and [PERSON], that is,  
\[|\psi_{1}\rangle=\frac{1}{\sqrt{2}}[e^{i(\delta_{B}+\gamma_{B})}|0\rangle_{A}|1 \rangle_{B}+e^{i(\delta_{A}+\gamma_{A})}|1\rangle_{A}|0\rangle_{B}]. \tag{2}\]1  
for \(\mu=\{u_{s},\mu_{d_{1}},\mu_{d_{2}}\}\), hence the probabilities \(p_{n}(\mu)\)\((n=0,1,2)\) obtained in Equation (6) can be directly calculated as:  
\[|\psi_{1}\rangle=\frac{1}{\sqrt{2}}[e^{i(\delta_{B}+\gamma_{B})}|0\rangle_{A}|1 \rangle_{B}+e^{i(\delta_{A}+\gamma_{A})}|1\rangle_{A}|0\rangle_{B}]. \tag{2}\]2 \[|\psi_{1}\rangle=\frac{1}{\sqrt{2}}[e^{i(\delta_{B}+\gamma_{B})}|0\rangle_{A}|1 \rangle_{B}+e^{i(\delta_{A}+\gamma_{A})}|1\rangle_{A}|0\rangle_{B}]. \tag{2}\]3  
When \(p_{n}(\mu)\) are known, the parameters \(s_{1}^{L}\) and \(e_{1}^{Ll}\) in Equations (10) and (11) can be estimated. In addition, the probability \(P_{1}^{L}(\mu_{s})\) is also obtained exactly from Equation (12). With these results, the secret key rate in Equation (9) can eventually be calculated. However, as mentioned above, the probabilities \(p_{n}(\mu)\) become unknown under UPC, though the security analysis can be held. Fortunately, as analyzed in Reference [39], the decoy-state method is still valid under UPC when the lower and upper bounds of \(p_{n}(\mu)\)\((n=0,1,2)\) are obtained, and the results of \(s_{1}^{L}\) and \(e_{1}^{Ul}\) can be rewritten as  
\[|\psi_{1}\rangle=\frac{1}{\sqrt{2}}[e^{i(\delta_{B}+\gamma_{B})}|0\rangle_{A}|1 \rangle_{B}+e^{i(\delta_{A}+\gamma_{A})}|1\rangle_{A}|0\rangle_{B}]. \tag{2}\]4  
\[|\psi_{1}\rangle=\frac{1}{\sqrt{2}}[e^{i(\delta_{B}+\gamma_{B})}|0\rangle_{A}|1 \rangle_{B}+e^{i(\delta_{A}+\gamma_{A})}|1\rangle_{A}|0\rangle_{B}]. \tag{2}\]5  
where \(p_{n}^{L(U)}(\mu)\) refers to the lower (upper) bound of \(p_{n}(\mu)\).