## 1 Introduction  
The rapid development of quantum computing technology [1; 2; 3; 4; 5; 6] has radically stimulated interest in quantum cryptography. Particularly, quantum key distribution (QKD) systems, which allow two distant parties to share secure keys [7; 8; 9; 10; 11; 12; 13], have attracted considerable attention as a core element of quantum cryptography.  
Practical QKD systems using weak coherent pulses are sensitive to environmental noise. Accordingly, many efforts [14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25] have been made to design a noise-tolerant optical architecture and to stabilize optical devices, such as lasers, detectors and modulators. However, to date, a Mach-Zehnder modulator (MZM) bias control method for QKD systems is missing, despite the MZM being essential for implementing a decoy-state protocol [26; 27], which is the only way to prevent photon number splitting attacks [28; 29], except for ideal single-photon sources. In other fields, there are primarily two types of MZM bias control methods: one that utilizes optical power monitoring [30; 31; 32; 33; 34] and the other that utilizes a dither signal [35; 36; 37; 38; 39; 40; 41; 42; 43]. In the former case, the input and output power or their ratio are used as the feedback signal. In the latter case, a dithering signal is used to generate the first- and second-order harmonics, and, subsequently, the bias voltage is controlled according to their power ratio. However, they are not suitable methods for a QKD system because even a small amount of optical crosstalk noise from the strong light used in their bias control may increase errors in the QKD system. For the same reason, commercial products for bias control requiring additional optical devices are not efficient for QKD systems. In addition, they are incompatible with system miniaturization owing to additional optical devices.  
In this study, we propose an MZM bias control method that can be efficiently applied to QKD systems. The proposed method does not require additional devices, such as lasers, beam splitters (BSs) or detectors. This is because it is implemented using a software modification that only adds \(N\) (\(\geq\)2) diagnostic pulses [34] for bias drift estimation. Therefore, it does not conflict with system miniaturization. Moreover, it does not degrade the key rate significantly because the number of signal pulses can be maintained regardless of the number of diagnostic pulses. This is performed by consuming the time slots allocated to existing decoy pulses. Such advantages are significant when implementing a QKD network system [44; 45; 46; 47; 48; 49] comprising many users that require individual bias controllers. In addition, it can be efficiently implemented on a parallel processor such as a field-programmable gate array (FPGA) device. This is because its calculations can be parallelized. As the proposed method immediately compensates for the phase drift estimated by the diagnostic pulses, it has a higher convergence rate than conventional proportional-integral-derivative (PID) control, in which the current point converges to the desired setpoint by gradually reducing errors. Finally, we experimentally demonstrated the proposed method in a laboratory and in the field to show its feasibility. In the field test, we applied the control method to a testbed consisting of a \(1\times 3\) QKD network system installed in the security facility of a smart factory in South Korea. We verified that the method could keep the MZM bias point at the desired setpoint (null point) by compensating for the bias drift owing to environmental changes.  
The remainder of this study is organized as follows. In Section 2, the proposed control method is described. In Section 3, we present the results of the laboratory and field tests. Finally, our main conclusions and findings are summarized in Section 4. See Table 1 for the abbreviations and symbols used in this work.