# Tripartite Quantum Key Distribution Implemented with Imperfect Sources
## Appendix A Estimation of Decoy State Parameters
### Determination of Yields in the Virtual and Actual Protocols  
This section demonstrates how to obtain the yields of different signal states that are employed in the virtual and actual protocols. First, we show that the signal states prepared by [PERSON] in the actual protocol can be written in terms of an identity and Pauli matrices. To do this, we rewrite the states using their density matrices, as  
\[ \begin{array}{ll}\rho_{0Z}=|\phi_{0Z}\rangle\langle\phi_{0Z}|&=\begin{bmatrix} \cos^{2}\frac{\delta_{1}}{2}&\sin\frac{\delta_{1}}{2}\cos\frac{\delta_{2}}{2} \\ \sin\frac{\delta_{1}}{2}\cos\frac{\delta_{1}}{2}&\sin^{2}\frac{\delta_{1}}{2} \end{bmatrix}\\ &=(\mathbb{I}+\cos\delta_{1}\sigma_{z}+\sin\delta_{1}\sigma_{x})/2,\end{array}  \tag{125}\]  
\[ \begin{array}{ll}\rho_{1Z}=|\phi_{1Z}\rangle\langle\phi_{1Z}|&=\begin{bmatrix} \sin^{2}\frac{\delta_{1}}{2}&\sin\frac{\delta_{2}}{2}\cos\frac{\delta_{2}}{2} \\ \sin\frac{\delta_{1}}{2}\cos\frac{\delta_{2}}{2}&\cos^{2}\frac{\delta_{2}}{2} \end{bmatrix}\\ &=\mathbb{I}\mathbb{I}-\frac{1}{2}\cos\delta_{2}\sigma_{z}+\frac{1}{2}\sin \delta_{2}\sigma_{x},\end{array}  \tag{126}\]  
\[ \begin{array}{ll}\rho_{0X}=|\phi_{0X}\rangle\langle\phi_{0X}|&=\frac{1}{2} \begin{bmatrix}1+\sin\delta_{3}&\cos\delta_{3}\\ \cos\delta_{3}&1-\sin\delta_{3}\end{bmatrix}\\ &=\frac{1}{2}\mathbb{I}+\frac{1}{2}\cos(\delta_{3})\sigma_{x}+\frac{1}{2}\sin( \delta_{3})\sigma_{x},\end{array}  \tag{127}\]  
\[ \begin{array}{ll}\rho_{0Y}=|\phi_{0Y}\rangle\langle\phi_{0Y}|&=\begin{bmatrix} 1+\sin\delta_{4}&i\cos\delta_{4}\\ -i\cos\delta_{4}&1-\sin\delta_{4}\end{bmatrix}\\ &=\frac{1}{2}\mathbb{I}+\frac{1}{2}\sin(2\Theta)\sigma_{z},\end{array}  \tag{128}\]where \(\Theta=\frac{\pi}{2}+\frac{\delta_{k}}{2}\). From this representation of signal states, we can obtain the joint probability, \(Y^{\omega}_{j_{k}j_{k}j_{m}j_{m}}\), that [PERSON] prepares entangled photons in any of the states \(|\phi_{j_{k}}\rangle\) and [PERSON] and [PERSON] select \(\beta\in\{X,Y,Z\}\) basis and obtain \(k(m)\) bit values. In particular, by exploiting the transmission rate of the Pauli operators, we obtain  
\[ \begin{split} Y^{\omega}_{j_{k}j_{m}j_{m}}&=p(j_{a}) \text{Tr}(\hat{D}_{k_{\beta}}\rho_{j_{k}})\text{Tr}(\hat{D}_{m_{\beta}}\rho_{j_ {k}})\\ &=p(j_{a})\sum_{s=X,Y,Z}\mathbf{n}_{s}q_{k_{\beta}|s}\sum_{t=X,Y,Z }\mathbf{n}_{t}q_{m_{\beta}|t}\\ &=p(j_{a})Y^{\omega}_{j_{k}j_{k}}Y^{\omega}_{j_{m}j_{n}}.\end{split}  \tag{100}\]  
Based on the above equation, we show how to determine the yield of states sent to [PERSON], \(Y^{\omega}_{j_{k}j_{k}}\). The yield, \(Y^{\omega}_{j_{k}j_{m}j_{\beta}}\), of states sent to [PERSON] can be calculated in a similar manner. The calculations proceed as follows:  
\[ \begin{split} Y^{Z}_{0_{2}j_{X}}&=\tfrac{2}{8} \text{Tr}(\hat{D}_{k_{X}}\sigma^{Z}_{B\setminus 2})=\tfrac{1}{8}\text{Tr}(\hat{D}_{k_{X}} \rho_{0_{2}})\\ &=(q_{k_{X}|\mathbb{I}}+\cos\delta_{1}q_{k_{X}|Z}+\sin\delta_{1}q _{k_{X}|X})/8,\end{split}  \tag{101}\]  
where  
\[ \begin{split}\sigma^{Z}_{B\setminus 2}&=\text{Tr}_{A}[\hat{P}(| 0_{Z}\rangle)\otimes\mathbb{I}_{B}\hat{P}(|\Psi_{Z}\rangle_{AB})]\\ &=\tfrac{1}{2}|\phi_{0Z}\rangle\langle\phi_{0Z}|,\end{split}  \tag{102}\]  
\[ \begin{split} Y^{Z}_{1_{2}j_{X}}&=\tfrac{1}{4} \text{Tr}(\hat{D}_{k_{X}}\sigma^{Z}_{B\setminus 2})=\tfrac{1}{4}\text{Tr}(\hat{D}_{k_{X}} \rho_{1_{Z}})\\ &=\tfrac{1}{4}\Big{(}\tfrac{1}{2}q_{k_{X}|\mathbb{I}}-\tfrac{1}{ 2}\cos(\delta_{2})q_{k_{X}|Z}+\tfrac{1}{2}\sin(\delta_{2})q_{k_{X}|X}\Big{)},\end{split}  \tag{103}\]  
\[ \begin{split} Y_{0_{X}j_{X}}X&=\tfrac{1}{8}\text{Tr} (\hat{D}_{k_{X}}\sigma^{Z}_{B\setminus 2_{X}})=\tfrac{1}{8}\text{Tr}(\hat{D}_{k_{X}} \rho_{0_{X}})\\ &=\tfrac{1}{8}\Big{(}\tfrac{1}{2}q_{k_{X}|\mathbb{I}}+\tfrac{1}{ 2}\sin(\delta_{3})q_{k_{X}|Z}+\tfrac{1}{2}\cos(\delta_{3})q_{k_{X}|X}\Big{)}.\end{split}  \tag{104}\]  
Equations (101)-(104) can be written using matrix notation as  
\[