## 4 Results after Laser-Frequency Stabilization  
In order to investigate the variation of the in-phase component, we changed the laser detuning over a large range. As shown in Figure 3, the laser-frequency detuning is changed from \(-0.45\) GHz to \(0.6\) GHz centered on the \(D_{0}\) line of \({}^{4}\)He atoms. The in-phase component is nearly linear with thelaser detuning. On both sides of the resonance frequency, the sign of the in-phase component is opposite, which can be used to feedback and lock the laser frequency. The bias magnetic field \(B_{0}\) is detected by the laser pumped \({}^{4}\)He magnetometer with and without laser-frequency stabilization. Here, the bandwidth of our magnetometer system is about 5 Hz. As shown in Figure 4a, the black line is the Allan deviation of the measured magnetic field without laser-frequency stabilization, which is falling first and then rising quickly, indicating that several kinds of noises caused by different physical mechanisms exist simultaneously including the drift of the frequency of pumping laser [29]. For comparison, the red line is the Allan deviation of the measured magnetic field with laser-frequency stabilization through the in-phase component feedback control. From the measurement time 0.2 s to 50 s, the Allan deviation is falling continuously thanks to the laser frequency fluctuation suppression, demonstrating a better system stability. However, although the simple method performs well, we have observed an increased Allan deviation for the measurement time smaller than \(\sim\)3 s. This is because that the parameter settings of the PID controller is optimized to suppress the long-term drift of the laser frequency. Such a conclusion is well supported by Figure 4b,c,  
Figure 4: (**a**) The Allan deviation of the measured results of the magnetometer with and without frequency stabilization. (**b**) The measured results in the time domain. (**c**) The measured results in the frequency domain. The bandwidth of the laser pumped \({}^{4}\)He magnetometer is about 5 Hz and is determined by the time constant of the lock-in amplifier and the parameter settings of the PID controller. Figure 3: The in-phase component of the magnetic resonance signal with different laser detuning. For the in-phase component, the error bar is from eight individual measurements. There are some error sources that can affect the in-phase signal, i.e., the laser intensity fluctuations, the \(B_{1}\)-field frequency shift, the magnetic field gradient, the phase shift setting in the lock-in amplifier and the collision shift. For the laser frequency detuning, the error bar is from the resolution limit of the wave meter (\(\sim\)50 MHz) that we use to monitor the laser frequency. both of which show clearly that after laser frequency stabilization, the long-term frequency drift is suppressed while the short-term fluctuation increased. However, the in-phase signal also depends on the \(B_{1}\)-field frequency shift, as shown in Figure 2a. A change in the bias field \(B_{0}\) will introduce an offset to the in-phase signal. In order to operate the magnetometer in an environment with changing magnetic fields, we shall adjust the loop bandwidth of the PID2 in control of the in-phase component to be smaller than that of the PID1 which controls the \(B_{1}\)-field frequency. By properly choosing the parameters of the two PIDs, the adjustment rate of the \(B_{1}\)-field frequency is higher than that of the in-phase component, and the \(B_{1}\)-field frequency is still resonant when the magnetometer is operated in an environment with changing magnetic fields. Under this condition, the \(B_{1}\)-field frequency shift has negligible effects on the amplitude of the in-phase component. In order to illustrate that the in-phase component signal for laser frequency stabilization has no dependence on the strength of the bias magnetic field when the \(B_{1}\)-field is resonant, we change the bias magnetic field and record the amplitude of the in-phase component signal simultaneously.