# Optimized Polarization Encoder with High Extinction Ratio for Quantum Key Distribution System
## 2 Materials and Methods
The S CPE modulates the light pulse with the voltage applied by Alice, and the modulated pulse is output from port 3. Afterwards, the pulse passes through an attenuator, where it is attenuated to the single-photon level. Finally, the light pulse is transmitted through the fiber channel to the receiver, which consists of BS, PBS2, PBS3, PC2, and four InGaAs single-photon detectors with a detection efficiency of approximately 10%, a dark count rate of approximately 250 Hz, and gate width of 2 ns. PBS2 assists us in  
Figure 1: Schematic and experimental diagram of the QKD system. (**a**) Schematic diagram of S CPE LD, laser diode (Qasky Co. Ltd., Wuhu, China); Circ, circulators; PC, polarization controller; PBS, polarized beam splitter; PM, phase modulator (China Electronics Technology Group Co. Ltd., Chongqing, China); FR, Faraday rotator; VOA, variable optical attenuator; D1–D4, single-photon detector (Langyan Optoelectronic Technology Co. Ltd., Shanghai, China). (**b**) Experimental setup of the QKD system. measuring the states of \(|H\rangle\) and \(|V\rangle\), while PBS3 and PC2 enable us to measure the states of \(|D\rangle\) and \(|A\rangle\). The radio frequency (RF) signal employed for modulation is produced by a signal generator that offers the flexibility to arbitrarily adjust the delay with a precision of 100 picoseconds. The QBERs for Z-base (\(|H\rangle\) and \(|V\rangle\)) and X-base (\(|D\rangle\) and \(|A\rangle\)) were measured for 30 consecutive minutes, as shown in Figure 2. The experimental setup was placed on an optical platform without any additional temperature control during the experiment. The QBER is calculated using [33]  
\[QBER= e_{0}Y_{0}+e_{\text{det}}(1-e^{-\eta H}) \tag{6}\]  
where \(e_{\text{det}}\) is the probability that a photon hit the erroneous detector, \(\eta\) represents the transmittance of the system, and \(\mu\) is the strength of signal state. \(Y_{0}\) encompasses the detector's dark count as well as other sources of background, such as stray light emitted from timing pulses. The error rate of the background is \(e_{0}=\frac{1}{2}\). As shown in Figure 2, the QBER was found to be 0.1% for H, 0.8% for V, 0.6% for D, and 0.5% for A. The average QBER was 0.53%. The extinction ratio of 29.21 dB was achieved, calculated as the ratio of the maximum number of counts to the minimum number of counts. These measurements demonstrate the high stability and high extinction ratio of the SCPE. Furthermore, QBER was tested for distances of 20 and 50 km for 30 min. The results showed that during 20 min, the QBER remained below 8% at 50 km and 7% at 20 km. After 20 min, the qubit compensation scheme can be applied without the need for additional optical components [34]. To evaluate the secret key rate (SKR) at varying distances, we performed QKD experiments on commercial fibers with lengths of 20 km, 50 km, 70 km, and 100 km, corresponding to measured channel losses of 4.74 dB, 12.05 dB, 17.62 dB, and 22.12 dB, respectively. The typical loss for commercial optical fibers is 0.2 dB/km @ 1550 nm; therefore, the high loss in our fibers may be caused by imperfect  
Figure 2: Measured QBERs of four polarization states of \(|H\rangle,|V\rangle,|D\rangle,|A\rangle\), and 20 km and 50 km commercial optical fiber for 30 min, demonstrating stability. fusion splicing. A two-decoy-state procedure was used to simulate the performance of SKR. The SKR [33]  
\[R\geq q\big{\{}-Q_{\mu}f(E_{\mu})\,H_{2}(E_{\mu})+Q_{1}^{L,\
u_{1},\
u_{2}}[1-H_{ 2}(e_{1}^{U,\
u_{1},\
u_{2}})\,]\big{\}} \tag{7}\]  
\(q\) denotes the communication efficiency of the BB84 protocol, \(Q_{\mu}\) indicates the count rate of the signal state, f(x) is a two-way error correction function, \(H_{2}(x)\) is the Shannon entropy function \(E_{\mu}\) denoting the QBER of the signal state, and \(Q_{1}^{L,\
u_{1},\
u_{2}}\) denotes the lower bound on the count rate of a single-photon pulse in the indicated signal state. \(e_{1}^{U,\
u_{1},\
u_{2}}\) denotes the upper bound on the QBER of a single-photon pulse in the signal state.