# Optimized Polarization Encoder with High Extinction Ratio for Quantum Key Distribution System
## 2 Materials and Methods  
The SCPE is shown in Figure 1, with horizontal light pulses coming in from the laser diode, and the polarization controller (PC) can transform the horizontal polarized light into a superposition of horizontal and vertical polarization. We adjusted the transmission matrix of PC as  
\[ \begin{pmatrix}1&i\\ i&1\end{pmatrix} \]  
Thus, the polarization state arriving at the PBS1 can be described as  
\[ \begin{pmatrix}1\\ i\end{pmatrix} \]  
PBS1 marks the beginning of the Sagnac interferometer, which consists of a polarization beam splitter (PBS), a phase modulator (PM), and a Faraday rotator (FR). The interferometer utilizes a PBS1 to separate the horizontally and vertically polarized parts. The vertically polarized part travels in the clockwise direction (CW), whereas the horizontally polarized part travels in the counterclockwise direction (CCW). The horizontally polarized part propagates in the CCW direction and encounters a PM, where a phase of \(\varphi\) is applied to it. After passing through the PM, the horizontally polarized part encounters the Faraday rotator, which rotates its polarization state by \(90^{\circ}\). This causes the horizontally polarized part to exit the Sagnac interferometer in a vertically polarized state. In the CW direction, the vertically polarized part encounters the Faraday rotator, which first rotates its polarization state by \(90^{\circ}\). The next component encountered is a PM that does not apply any phase to the part propagating in the CW direction. As a result, the vertically polarized impinges once again on the PBS1, exiting the Sagnac interferometer in a horizontal polarized state. As the length of the fiber optic traversed is the same for both CW and CCW pulses, it ensures that they exit the Sagnac interferometer simultaneously, resulting in the perfect recombination of the two orthogonal polarization states at the PBS1. The emerging polarization state is combined at PBS1, as given by  
\[ \begin{pmatrix}i\\ e^{i\varphi}\end{pmatrix} \]  
The combined beam out of the PBS1 and passes though the PC can be described as  
\[ \begin{pmatrix}1&i\\ i&1\end{pmatrix}\begin{pmatrix}i\\ e^{i\varphi}\end{pmatrix} = \begin{pmatrix}i+ie^{i\varphi}\\ e^{i\varphi}-1\end{pmatrix}  \tag{1}\]  
To achieve output polarization states of \(|H\rangle,|V\rangle,|D\rangle,\) and \(|A\rangle\), we load modulation voltages of 0, \(V_{\frac{\pi}{2}}\), \(V_{\frac{\pi}{2}}\) and \(V_{\frac{3\pi}{2}}\) on the CCW pulses, while the CW pulses arrive without any modulation signal. In detail, if 0 voltage is applied to the CCW, the polarization state becomes  
\[\left|\psi_{out}^{0}\right\rangle=\left|H\right\rangle\!=\!2i\binom{1}{0} \tag{2}\]  
If \(V_{\frac{3}{2}}\) voltage is applied to the CCW, the polarization state becomes  
\[\left|\psi_{out}^{\frac{3\pi}{2}}\right\rangle=\left|A\right\rangle\!=\!(1-i) \binom{1}{-1} \tag{3}\]  
If \(V_{\pi}\) voltage is applied to the CCW, the polarization state becomes  
\[\left|\psi_{out}^{\pi}\right\rangle=\left|V\right\rangle\!=\!i\binom{0}{1} \tag{4}\]  
If \(V_{\frac{3\pi}{2}}\) voltage is applied to the CCW, the polarization state becomes  
\[\left|\psi_{out}^{\frac{3\pi}{2}}\right\rangle=\left|D\right\rangle\!=\!(-1-i) \binom{1}{1} \tag{5}\]  
Therefore, the S CPE can generate four polarization states \(\left|H\right\rangle\), \(\left|V\right\rangle\), \(\left|D\right\rangle\), \(\left|A\right\rangle\) by loading different voltages. To evaluate the performance of the S CPE, we conducted a proof-of-principle experiment using the setup illustrated in Figure 1. The experimental setup is composed of three main parts: the emitter (Alice), the channel, and the receiver (Bob). The transmitter utilizes a semiconductor laser (LD) to generate phase-randomized pulses with a pulse width of 200 ps and a repetition rate of 50 MHz. The laser pulse enters the optical circulator (CIRC) through port 1 and exits through port 2. Subsequently, the laser pulse is introduced into the S CPE.