# Tripartite Quantum Key Distribution Implemented with Imperfect Sources
## Appendix A Estimation of Decoy State Parameters
### Determination of Yields in the Virtual and Actual Protocols
\begin{split}\begin{bmatrix}Y^{Z}_{0_{2}j_{X}}\\ Y^{Z}_{1_{2}j_{X}}\\ Y^{\omega}_{0_{X}j_{X}}\end{bmatrix}&=\frac{1}{64} \begin{bmatrix}1&\sin\delta_{1}&\cos\delta_{1}\\ 1&\sin\delta_{2}&-\cos\delta_{2}\\ 1&\cos\delta_{3}&\sin\delta_{3}\end{bmatrix}\begin{bmatrix}q_{k_{X}| \mathbb{I}}\\ q_{k_{X}|x}\\ q_{k_{X}|z}\end{bmatrix}\\ &=\frac{1}{64}\mathbf{A}\begin{bmatrix}q_{k_{X}|\mathbb{I}}\\ q_{k_{X}|x}\\ q_{k_{X}|z}\end{bmatrix}\end{split}  \tag{105}\]  
where  
\[\mathbf{A}= \begin{bmatrix}1&\sin\delta_{1}&\cos\delta_{1}\\ 1&\sin\delta_{2}&-\cos\delta_{2}\\ 1&\cos\delta_{3}&\sin\delta_{3}\end{bmatrix} . \tag{106}\]  
Notably, it is possible to measure all these quantities directly during experiments. Now, in order to compute the yield of virtual states, we employ the same method as above and obtain  
\[ \begin{split} Y^{Z,\text{vir}}_{0_{X}j_{X}}&=\tfrac{1}{8} \text{Tr}(\hat{D}_{k_{X}}\delta^{\text{vir}}_{B\setminus 2_{X}})\\ &=\tfrac{1}{8}\Big{(}\tfrac{1}{2}\Big{(}1+\sin\tfrac{\delta_{1}}{2}\cos \tfrac{\delta_{2}}{2}\Big{)}q_{k_{X}|\mathbb{I}}+\tfrac{1}{2}\Big{(}\cos\Big{(} \tfrac{\delta_{1}-\delta_{2}}{2}\Big{)}+\tfrac{1}{2}\Big{(}\sin\tfrac{\delta_ {1}}{2}+\sin\tfrac{\delta_{2}}{2}\Big{)}\Big{)}q_{k_{X}|X}\Big{)},\end{split}  \tag{107}\]\[ \begin{array}{rl}\gamma_{1\chi;k_{X}}^{Z,\text{vir}}&=\frac{1}{8}\text{Tr}(\hat{D} _{k_{X}}\delta_{B;1\chi}^{\text{vir}})\\ &=\frac{1}{8}\Big{(}\frac{1}{2}\Big{(}1-\sin\frac{\delta_{1}}{2}\cos\frac{ \delta_{2}}{2}\Big{)}q_{k_{X}|\mathbb{I}}+\frac{1}{2}\Big{(}\cos\Big{(}\frac{ \delta_{1}-\delta_{2}}{2}\Big{)}-\frac{1}{2}\Big{(}\sin\frac{\delta_{1}}{2}+ \sin\frac{\delta_{2}}{2}\Big{)}\Big{)}q_{k_{X}|X}\Big{)}.\end{array}  \tag{124}\]  
Again, Equations (119) and (124) can be written using matrix notation as  
\[ \begin{array}{rl}\begin{array}{rl}\begin{array}{rl}\begin{array}{rl}Y_{0,\text{yr};k_{X}}^{Z,\text{vir}}\\ Y_{1\chi;k_{X}}^{Z,\text{vir}}\end{array}\end{array}&=\frac{1}{48}\begin{bmatrix} \frac{1}{2}\Big{(}1+\sin\frac{\delta_{1}}{2}\cos\frac{\delta_{2}}{2}\Big{)} &0&\frac{1}{2}\Big{(}\cos\Big{(}\frac{\delta_{1}-\delta_{2}}{2}\Big{)}+\frac{1 }{2}\Big{(}\sin\frac{\delta_{1}}{2}+\sin\frac{\delta_{2}}{2}\Big{)}\Big{)} \end{array}\\ &=\frac{1}{48}\begin{bmatrix}\frac{1}{2}\Big{(}1-\sin\frac{\delta_{1}}{2}\cos \frac{\delta_{2}}{2}\Big{)}&0&\frac{1}{2}\Big{(}\cos\Big{(}\frac{\delta_{1}- \delta_{2}}{2}\Big{)}-\frac{1}{2}\Big{(}\sin\frac{\delta_{1}}{2}+\sin\frac{ \delta_{2}}{2}\Big{)}\Big{)}\end{array} \\ &=\frac{1}{48} \begin{bmatrix}\frac{q_{k_{X}|\mathbb{I}}}{q_{k_{X}|x}}\\ q_{k_{X}|z}\end{bmatrix} \end{array}\\ &\text{where}\\ &\text{\bf B}= \begin{bmatrix}\frac{1}{2}\Big{(}1+\sin\frac{\delta_{1}}{2}\cos \frac{\delta_{2}}{2}\Big{)}&0&\frac{1}{2}\Big{(}\cos\Big{(}\frac{\delta_{1}- \delta_{2}}{2}\Big{)}+\frac{1}{2}\Big{(}\sin\frac{\delta_{1}}{2}+\sin\frac{ \delta_{2}}{2}\Big{)}\Big{)}\end{bmatrix} .\end{array} \tag{125}\]  
Combining Equation (119) with Equation (125), we obtain the yield of virtual states based on the yield of the signal states used in the actual protocol, expressed as  
\[ \begin{array}{rl}\begin{array}{rl}\begin{array}{rl}Y_{0,\text{yr};k_{X}}^{Z,\text{vir}}\\ Y_{1\chi;k_{X}}^{Z,\text{vir}}\end{array}\end{array}=\text{\bf B}\times\text{ \bf A}^{-1}\begin{bmatrix}Y_{0,\text{yr};k_{X}}^{Z}\\ Y_{1\chi;k_{X}}^{Z,\text{vir}}\\ Y_{0\chi;k_{X}}^{Z,\text{vir}}\end{array} . \tag{126}\]