# A New Security Proof for Twin-Field Quantum Key Distribution (QKD)
## 4 New Security Proof  
We now present our new proof of security for the above TF-QKD protocol. Our proof uses the quantum sampling framework of [PERSON] [29] discussed above, along with proof techniques used for sampling-based entropic uncertainty relations [30]. Namely, we prove security of the entanglement-based version which will imply security of the prepare-and-measure version. The main result is shown in the following theorem:  
**Theorem 2**. : _Let \(\ket{\psi}_{ABCE}\) be the state [PERSON] prepares where the \(A\) and \(B\) portions are \(N\) qubits each and the \(C\) portion is in a Hilbert space of dimension \(\mathcal{A}^{N}\). After [PERSON]'s measurement of the \(C\) register, let \(c\in\{0,1,v,2\}^{N}\) be the resulting outcome and \(\ket{\psi^{c}}_{ABE}\) be the post measured state (tracing out the measured \(C\) register). Let \(N_{c}\) be the number of signals not discarded, namely \(N_{c}=\#_{0,1}(c)\) for \(\Pi\)-Total, \(N_{c}=\#_{0}(c)\) for \(\Pi\)-Zero, and \(N_{c}=\#_{1}(c)\) for \(\Pi\)-One. [PERSON] and [PERSON] will choose a random sample of size \(m_{c}<N_{c}/2\), measure those qubits in the \(X\) basis and determine the relative number of errors in that basis, denoted as \(Q_{X}\). Then, it holds that, except with probability \(\epsilon_{fail}=2\epsilon^{1/3}\), if the remaining \(N_{c}-m_{c}\) signals are measured in the \(Z\) basis_  
\[H_{\infty}^{\mathcal{A}\epsilon+3\epsilon^{1/3}}(A|E)\geq(N_{c}-m_{c})(1-h(Q_ {X}+\delta_{c})), \tag{22}\]  
_where_  
\[\delta_{c}=\sqrt{\frac{(N_{c}+2)\ln(2/\epsilon^{2})}{m_{c}N_{c}}}. \tag{23}\]  
Proof. : Consider the post-measured state \(\ket{\psi^{c}}_{ABE}\) as discussed in the theorem statement. Without loss of generality, we may write this state as follows:  
\[\ket{\psi^{c}}_{ABE}=\sum_{i\in\mathcal{A}_{4}^{N}}\alpha_{i}\ket{\phi_{i}} \ket{E_{i}^{c}}. \tag{24}\]  
At this point, [PERSON] and [PERSON] discard certain systems based on the value of \(c\). For instance, whenever \(c_{j}\in\{v,?\}\), they will discard that round; furthermore, if they are running \(\Pi\)-Zero (respectively \(\Pi\)-One), they will discard rounds when \(c_{j}=1\) (respectively \(c_{j}=0\)). This effectively traces out these systems. Let \(N_{c}\) be defined as in the theorem statement and \(R_{C}=N-N_{C}\) (the number of signals Rejected). It is easy to see that this operation, effectively tracing out certain systems of \(A\) and \(B\), yields a mixed state which may be written as follows:  
\[\rho_{ABE}^{c}=\sum_{r\in\mathcal{A}_{4}^{R_{C}}}p(r)P\left(\sum_{i\in \mathcal{A}_{4}^{N_{c}}}\beta_{i|r}\ket{\phi_{i}}\ket{E_{i|r}}\right)=\sum_{r \in\mathcal{A}_{4}^{R_{C}}}p(r)\ket{\psi^{c,r}}\bra{\psi^{c,r}}_{ABE}, \tag{25}\]  
where \(P(\ket{z})=\ket{z}\bra{z}\). The \(A\) and \(B\) registers of \(\ket{\psi^{c,r}}_{ABE}\) are of \(N_{c}\) qubits each. At this point, [PERSON] and [PERSON] choose a random subset \(t\) of size \(m_{c}<N_{c}/2\) (which may depend on \(N_{c}\)) with uniform probability \(P_{T}(t)\) and measure their respective systems in the \(X\) basis, observing the number of errors in this test set. The remaining qubits are measured in the \(Z\) basis. Our goal is to compute the min entropy of this final \(Z\) basis measurement. We now switch to ideal states to complete our analysis. Next, \(r\) and \(c\) are fixed.