## 2 The Principle of the Drift-Insensitive Self-Comparison Method and the Experimental Setup  
### The Principle of the Drift-Insensitive Self-Comparison Method  
The self-comparison method is that two clock loops (\(R_{1}\) and \(R_{2}\)) alternately operate in the time domain. As shown in Figure 1a, a clock feedback cycle of the traditional self-comparison (TSC) method contains four clock detection cycles (the duration of the clock detection cycle is 1 s in this experiment). In the first and the second clock detection cycles, where the clock operates in the systematic parameter of _para.1_, the initial clock laser frequency is set to \(f_{01}-\delta/2\) and \(f_{01}+\delta/2\), respectively, where the \(\delta\) is the full width at half maximum (FWHM) of the spectral peak, and \(f_{01}\) corresponds to the center frequency of the spectral peak of the \(R_{1}\). After clock excitations, the excitation fractions of \(P_{1}\) and \(P_{2}\) are obtained, and thus the frequency correction can be calculated by \(\Delta f_{1}=(P_{2}-P_{1})\delta/(2P_{\text{max}})\), where \(P_{\text{max}}\) is the maximum excitation fraction. The corrected frequency of \(f_{01\text{N}}=f_{01}+\Delta f_{1}\) is closer to the resonance of the \(R_{1}\). In the same way, after the third and fourth clock detection cycles, where the clock operates in the systematic parameter of _para.2_, \(f_{02\text{N}}=f_{02}+\Delta f_{2}\) can be obtained. The frequency difference between the \(R_{1}\) and \(R_{2}\) can be expressed by \(\Delta v=f_{02\text{N}}-f_{01\text{N}}\) which is determined every four clock detection cycles. By closed-loop operation, the uncertainty of the \(\Delta v\) can be reduced, and thus the influence of a certain parameter on the clock transition frequency can be measured with high precision. Figure 1: Schematic diagram of self-comparison method. (**a**) Traditional self-comparison method. (**b**) Drift-insensitive self-comparison method. _Pan.1_ and _Pan.2_ represent two different values of the same system parameter (such as atomic density, magnetic field strength); \(R_{1}\) and \(R_{2}\) indicate the two clock loops that operate in an interleaved way in the time domain; \(f_{01-02}\) correspond to the central frequency of the spectral peaks of \(R_{1}\) and \(R_{2}\), respectively; \(P_{\text{max}}\) indicates the maximum excitation fraction; and \(P_{1-4}\) are the clock transition probabilities of the first to forth clock detection cycles, respectively. Obviously, in the process of TSC method, because the \(R_{1}\) and \(R_{2}\) successively operate in the time domain and the amount of the frequency drift accumulates over time, the frequency correction, caused by the frequency drift, of \(R_{2}\) is twice that of \(R_{1}\). To take the measurement of the collisional shift as an example, in the first two clock detection cycles, the atomic density is higher (\(H\)), while in the second two clock detection cycles, the atomic density is lower (\(L\)). If the drift rate is \(\zeta\) Hz/s and the measurement sequence is \(HHLL\), the drift-induced frequency offset for \(R_{1}\) is about \(\Delta_{s1}=(\zeta+2\zeta)/2=3\zeta/2\), and in terms of \(R_{2}\), the drift-induced frequency offset is about \(\Delta_{s2}=(4\zeta+3\zeta)/2=7\zeta/2\). Therefore, the SCME is about \(\Delta_{s}=\Delta_{s2}-\Delta_{s1}=2\zeta\) as the density shift is measured by the TSC method. According to the previous analysis, a simple but high-efficiency way (DISC method), which is realized by changing the detection sequence as \(HLLH\) (or \(LHHL\)) (as shown in Figure 1b), can be used to cancel the SCME and achieve drift-insensitive self-comparison measurement. When the detection sequence is \(HLLH\), the drift-induced frequency offset is \(\Delta^{\prime}_{s1}=(\zeta+4\zeta)/2=5\zeta/2\) for \(R_{1}\) and \(\Delta^{\prime}_{s2}=(2\zeta+3\zeta)/2=5\zeta/2\) for \(R_{2}\). Thus, the SCME is \(\Delta^{\prime}_{s1}=\Delta^{\prime}_{s1}-\Delta^{\prime}_{s2}=0\), indicating that the SCME is cancelled.