Many-body quantum lock-in amplifier

Achieving high-precision detection of time-dependent signals in noisy environment is a ubiquitous issue in physics and a critical task in metrology. Lock-in amplifiers are detectors that can extract alternating signals with a known carrier frequency from an extremely noisy environment. Here, we present a protocol for achieving an entanglement-enhanced lock-in amplifier via empoying many-body quantum interferometry and periodic multiple pulses. Generally, quantum interferometry includes three stages: initialization, interrogation, and readout. The many-body quantum lock-in amplifier can be achieved via adding suitable periodic multiple-$\pi$-pulse sequence during the interrogation. Our analytical results show that, by selecting suitable input states and readout operations, the frequency and amplitude of an unknown alternating field can be simultaneously extracted via population measurements. In particular, if we input spin cat states and apply interaction-based readout operations, the measurement precisions for frequency and amplitude can both approach the Heisenberg limit. Moreover, our many-body quantum amplifier is robust against extreme stochastic noises. Our study may point out a new direction for measuring time-dependent signals with many-body quantum systems, and provides a feasible way for achieving Heisenberg-limited detection of alternating signals.


I. INTRODUCTION
Detecting time-dependent alternating signals with high precision is an important problem in fundamental physics and a critical task in metrology [2][3][4][5][6][7][8][9]65]. Generally, the target signal is submerged in a noisy environment. To obtain a high signal-to-noise ratio of the target signal, one has to choose an optimal tradeoff between decreasing the effect of noise and enhancing the response to the target signal. Usually, lock-in amplifier has been used as a high-efficient classical detector to extract a signal from noisy environments with high signal-to-noise ratio. The lock-in amplifier selects the signal with a specific frequency and phase from a mixture of mostly unwanted frequencies.
It is well known that, many-body quantum entanglement is a useful resource for improving measurement precision [18,[30][31][32]. For N individual particles, the measurement precision only scales as the standard quantum limit (SQL) (i.e. ∝ 1/ √ N ). The SQL can be surpassed by using entangled particles. Remarkably, entangled non-Gaussian states (ENGSs), such as spin cat states or even Greenberger-Horne-Zeilinger (GHZ) state, set a benchmark for beating the SQL in metrology. The measurement precision can be improved to the Heisenberg limit (i.e. ∝ 1/N ) [33][34][35][36][37]. With state-of-art techniques, the spin cat states can be generated in ultracold atomic gases [15,38,[38][39][40][41][42][43], trapped ions [44], and photonic systems [45]. Can one employ many-body quantum entanglement to improve the measurement precision of a quantum lock-in amplifier? In further, whether the entanglement-enhanced lock-in amplifier is robust against environment noises?
In this article, we present a general protocol for achieving a many-body quantum lock-in amplifier via quantum interferometry and periodic multiple pulses. In manybody quantum systems, the interferometry can be divided into three steps: state preparation, signal interrogation and readout. To detect an unknown alternating signal, we apply a train of π-pulses with equidistant spacing in the signal interrogation stage. The modulation (i.e. the applied π-pulse sequence) is non-commuting with the signal acquisition, which is the key for achieving quantum lock-in amplifier. The pulse spacing τ = π/ω e is adjusted in order to probe the oscillating frequency ω of the target signal. At resonance ω e = ω, when the signal and the modulation pulses are locked in, the π pulses are applied at every peak and valley of the signal and thus  1: (color online). The schematic of classical lock-in amplifier and many-body quantum lock-in amplifier. (a) The classical lock-in amplifier. Vs(t) is the target signal submerged in an extremely noisy environment. Vr(t) is a known reference signal. Inputting the two signals through the classical lock-in amplifier, the signal Vs(t) will be obtained. (b) The many-body quantum lock-in amplifier. The coupling between the probe and the signal is described byĤint = M(t)Ĵz with M(t) = S(t) + No(t), the target signal S(t) and the stochastic noise No(t). The oscillating modulation termĤmix, which is analogue to the reference signal Vr(t), does not commute withĤint. Thus the probe evolution, obeying the HamiltonianĤ =Ĥint +Ĥmix, can be used to realize a quantum lock-in amplifier for extracting the signal S(t).
the accumulated phase is very close to zero. While for ω e = ω, the accumulated phase oscillates dramatically and is sensitively dependent on the detuning ω − ω e . As this accumulated phase determines the half-population, one may infer the resonant point ω e = ω via measuring the half-population versus the detuning. Meanwhile, the signal amplitude can also be extracted.
Moreover, we analytically study the measurement precisions for frequency and amplitude of an AC magnetic field via many-body quantum systems. For nonentangled states, the measurement precisions only attain the SQL. Through utilizing entangled states, the measurement precisions can be improved to the Heisenberg limit. In particular, by employing spin cat state and suitable interaction-based readout operations [46][47][48][49][50][51][52][53][54][55][56], the measurement precisions for frequency and amplitude can simultaneously achieve the Heisenberg-limited scaling. Besides, our many-body quantum amplifiers are robust against stochastic noises, even with highly entangled spin cat states. This paper is organized as follows. In Sec. VI B, we introduce the general protocol for our many-body quantum lock-in amplifier. In Sec. VI C, we show how to achieve a many-body quantum lock-in amplifier with individual particles. In Sec. VI D, we demonstrate how to achieve the Heisenberg-limited quantum lock-in amplifier via spin cat states. In Sec. VI E, we discuss the robustness of our many-body quantum lock-in amplifier against stochastic noise. Finally, we give a brief summary and discussion in Sec. VI.

II. GENERAL PROTOCOL
Classical lock-in amplifiers can extract a signal with a known carrier frequency from a noisy environment, see Fig. 1(a). In essence, a lock-in amplifier receives a target signal, multiplies it by a reference signal, and inte-grates over a specified time. After the integration, there is almost no contribution from any signal that is not at the same frequency as the reference signal. In analogy, a quantum lock-in amplifier with many-body quantum systems can be realized by using quantum control techniques, see Fig. 1(b). For a quantum lock-in amplifier, non-commutativity of different operations plays an important role.
To show the general protocol, we consider an ensemble of N identical two-state bosonic particles. The two states can be selected as any desired two levels, and hereafter we label them as spins |↑ and |↓ , respectively. The system states can be well characterized by the collective spin operators:Ĵ x = 1 2 (â †b +âb † ),Ĵ y = 1 2i (â †b −âb † ),Ĵ z = 1 2 (â †â −b †b ), whereâ andb denote annihilation operators for spins |↑ and |↓ , respectively. The system states can be represented in terms of the Dike basis {|J, m }, wherê J z |J, m = m|J, m with J = N 2 and m = −J, −J + 1, ..., J − 1, J. The interaction between the system and the external AC field is described by the Hamiltonian, H int (t) = M (t)Ĵ z , where the external field M (t) = S(t)+ N o (t) consists of the target signal S(t) = S 0 sin(ωt + β) and the stochastic noise N o (t). The target signal is modulated with time, ω corresponds to the oscillation frequency, β is the initial phase of the signal, and S 0 stand for the strength of the signal.
To implement the quantum lock-in amplifier, we mix the system with an induced modulation signal that does not commute withĤ int . Here, we consider the mixing termĤ mix (t) = Ω(t)Ĵ x and the interaction Hamiltonian becomeŝ Below we briefly illustrate how to achieve high signalto-noise ratio. The non-commutativity of the two modulation termsĤ int andĤ mix plays an important role for lock-in measurement. In units of = 1, the timeevolution of system state |Ψ(t) obeys the Schrödinger In the interaction picture with respect toĤ mix (see Supplementary Material), the time-evolution is described by, where with the time-ordering operatorT , the initial state |Ψ(0) I = |Ψ(0) , and the two phase factors and If we apply a suitable modulation Ω(t) to make cos(α) and sin(α) periodic and synchronized with the signal S(t), the phase accumulated owing to S(t) can adds up coherently whereas the phase accumulated owing to stochastic noise N o (t) can be averaged away. Especially, if the frequencies of the noise spectral components is far from the signal frequency ω, the noise spectral components can be disappeared in the long-time integration. In this way, the signal-to-noise ratio of the output can be significantly improved. DD is one of the effective modulation methods for quantum control. In the following, we will consider the mixing modulation Ω(t) by DD techniques and demonstrate how to use many-body entanglement to enhance the measurement precision.

III. QUANTUM MANY-BODY LOCK-IN AMPLIFIER WITH NON-ENTANGLED STATES
In this section, we will discuss how to use DD to achieve a many-body quantum lock-in amplifier for an AC magnetic field sensing. Preparing the probe in non-entangled states, the measurement precisions can only attain the SQL. While preparing the probe in entangled states, the measurement precisions can be improved to the Heisenberg limit, which will be discussed in Sec. VI D.
Given the probe as an ensemble of two-mode bosonic particles, the coupling between the probe and the target signal [an AC magnetic field B(t) = B sin(ωt + β)ẑ] is described by the Hamiltonian, Here, B corresponds to the magnetic field amplitude, γ is the gyromagnetic ratio, ω denotes the oscillation frequency, and β is the initial phase. For convenience, we assume β = 0. Our goal is to determine the frequency ω and the amplitude B via many-body quantum lock-in amplifier. Here, we neglect the stochastic noise N o (t) and its influences will be discussed in Sec. VI E.
The key is to find out suitable modulation of Ω(t) for the mixing process. In our scheme, the time-dependent modulation Ω(t) is designed as a sequence of π pulses with equidistant spacing. Generally, a single π pulse can be expressed by a rectangular waveform, i.e., Ω single (t) = π a for t 0 ≤ t ≤ t 0 + a with a the width (duration) of the single π pulse. Ideally, the π pulse is assumed sharp enough so that a → 0 and Ω single (t) = πδ(t − t 0 ), where δ(t) is the Dirac delta function. For simplicity, we approximate Ω(t) as a sequence of equidistant sharp π pulses so that it can be written as Here, τ is the spacing of the adjacent π pulses, M denotes the number of pulses. We define the carrier frequency ω e ≡ π τ , which can be analogous to the carrier frequency for the classical lock-in amplifier. k determines the relative phase with respect to the target signal. We consider k = 0 in the following, which is assumed to be the lockin condition. When ω e = ω, the π pulses are applied at every peak and valley of the oscillating signal resulting in a tiny accumulated phase [i.e., Eq. (65)], which can be used for frequency and phase locking. Here, k can be easily tuned by adjusting the start point of the initial pulse. The other condition k = −1 will be discussed in Supplementary Material.
Through adjusting the carrier frequency ω e , we can extract the frequency ω of the AC magnetic field according to the population measurement, see Fig. 2. For every fixed carrier frequency ω e , one can implement many-body quantum interferometry for measurement.
The many-body interferometry process can be divided into three stages: (i) probe preparation, (ii) signal interrogation, and (iii) readout, see Fig. 2. In the initialization stage, an input state |Ψ in is prepared. Then, the input state undergoes an interrogation stage for signal accumulation. At this stage, the system state interacts with In the initialization stage, an input state |Ψ in is prepared. Then, the input state undergoes an interrogation stage for signal accumulation. At this stage, the system state interacts with the magnetic field, and a train of π-pulses with specific equidistant spacing τi is applied. In the readout stage, a certain unitary operationÛ is applied for recombination, and the half-population difference is measured. Here, the pulse spacing τi (i = 1, 2, ..., M ) is adjusted in order to find the the frequency locking point ω = ωe. (b) The half-population difference versus the detuning ω − ωe can tell the frequency locking point ω = ωe. Here, for illustration, we choose a GHZ state with N = 2, T = 4π, ω = 20π and γB = 2π.
the AC magnetic field, and a train of π-pulses with an equidistant spacing are applied at the same time. In the readout stage, a certain unitary operationÛ is applied for recombination, and the half-population difference is measured.
To adjust the carrier frequency ω e , one can choose M different pulse spacing τ i , i = 1, 2, ..., M . The pattern of half-population difference measurement results versus ω − ω e can tell us the frequency locking point ω = ω e , as shown in Fig. 2. Now, we show how to find the frequency locking point.
We turn to discuss the signal interrogation stage. When the evolution time T is fixed, for the i-th pulse spacing, the number of the π pulses is L = [T /τ i + 1/2], where [·] stands for the greatest integer. Substituting Eq. (8) into Eqs. (3) and (4), we obtain the Hamiltonian (7) in the interaction picturê where h(t) is the square wave function, In experiments, one can tune ω e very close to ω, that is, |ω − ω e | ≪ ω. Under the conditions of |ω − ω e | ≪ ω and T ≫ 2π/ω, the Hamiltonian (62) can be approximated by an effective Hamiltonian, For an example, T = 2π, the approximation is valid for |ω − ω e |/ω < 0.1 for ω ≥ 10π, see Supplementary Material. The output state after the interrogation stage (of duration T ) is given as, |Ψ Finally, in the readout stage, a suitable unitary op-erationÛ is performed for recombination. The selection of unitary operationÛ depends on the input state and will have influences on the measurement precisions, which will be discussed in the next section. The final state (in Schrödinger picture) before half-population difference measurement can be written as Substituting Eq. (63) into Eq. (11), we have |Ψ final = U e −iαĴx e −iφĴz |Ψ in . Here, the accumulated phase reads Thus, for the lock-in condition, when ω − ω e → 0, the accumulated phase φ → γB(ω−ωe)T 2 π ≈ 0. The expectation of the half-population difference measurement on final state is When the pulse number L is even, We first consider individual particles without any entanglement. Suppose all the particles are prepared in the spin coherent state (SCS) |Ψ SCS = e −i π 2Ĵ y |N/2, −N/2 . This input state can be easily generated by applying a π/2 pulse on the state of all particles in spin-down |↓ . In this situation, one can chooseÛ I = e −i π 2Ĵ y . Then, the final state before the half-population difference measurement can be written as In an explicit form, the final state becomes where After some algebra, the expectations of half-population difference and the square of half-population difference on the final state can also be explicitly written as and x . For spin cat states, the expectation of half-population difference is anti-symmetric with respect to the zero detuning, i.e., Ĵ z = 0 for ω − ωe = 0. (b) The inset in the range of (ω − ωe)/ω ∈ [−0.001, 0.001]. Here, T = 2π, ω = 20π, γB = 2π, and N = 6.
It is found that the information of the estimated two parameters ω and B can be inferred from the oscillation of the half-population difference. The form of Eq. (68) is exactly symmetric with respect to detuning ω − ω e , as shown in Fig. 3 (green dotted line).
Thus, one can determine the zero detuning point ω − ω e = 0 [grey line in Fig. 3(a)] from the symmetry of the pattern for half-population difference. Once the value of ω is determined, and one can further extract B according to the analytic form of Eq. (68) via a fitting procedure. In this point, the values of ω and B can be simultaneously obtained only via the half-population difference measurement in experiments.
To further characterize the measurement precision of ω and B, we use the error propagation formula [65][66][67][68]. The measurement precisions for ω and B are and where Substituting Eq. (68) and Eq. (69) into Eq. (70) and Eq. (71), one can analytically obtain ∆ω and ∆B. They read as and where From Eq. (73) and Eq. (74), the measurement precisions ∆ω and ∆B for individual particles only exhibit the SQL scaling. For a fixed N , the measurement precision ∆ω is dependent on detuning ω − ω e , the signal amplitude B and evolution time T . When ω − ω e → 0, ∆ω → π 3γBT 2 √ N attains the optimal value. However, the measurement precision ∆B is just dependent on detuning ω − ω e and T . When We numerically find the optimal measurement precisions in the range of |(ω − ω e )/ω| ∈ [0, 0.008] and calculate the corresponding scaling versus particle number for γB = 2π. According to the fitting results (see Fig. 4), the log-log measurement precision for ln (∆ω min /ω) ≈ −0.5ln(N )−8.51 and ln (γ∆B min /ω) ≈ −0.5ln(N )−5.20. For the two parameters, the optimal measurement precision ∆ω min (purple circles) and ∆B min (purple circles) both exhibit SQL scaling as expected.

IV. QUANTUM MANY-BODY LOCK-IN AMPLIFIER WITH SPIN CAT STATES
In this section, we will discuss how to realize the Heisenberg-limited measurement for ω and B within this framework. Entanglement is a useful quantum resource to improve the measurement precision. Spin cat state, as a kind of non-Gaussian entangled state, is one of the promising candidates for Heisenberg-limited metrology [36,51,[60][61][62]. In this section, we demonstrate how to use spin cat states to realize the Heisenberg-limited quantum many-body lock-in amplifier. Spin cat states are typical kinds of macroscopic superposition of spin coherent states (MSSCS) [36,51]. We consider the states in the form of where N c is the normalization and |Ψ(θ) SCS denotes the N -particle SCS |Ψ(θ) SCS = J m=J c J m (θ) |J, m with c J m (θ) = (2J)! (J+m)!(J−m)! cos J+m ( θ 2 ) sin J−m ( θ 2 ). For total particle number N ≥ 6, when θ ≤ π/8, the corresponding MSSCS can be regarded as a spin cat state [51]. Under this condition, we approximate the spin cat states as It is known that, the interaction-based readout is a powerful technique for achieving Heisenberg limit via spin cat states without single-particle resolved detection [46][47][48][49][50][51][52][53][54][55][56], which is now feasible in experiments [17,55]. Similarly, we adopt an interaction-based operationÛ I = e i π 2Ĵ x e i π 2Ĵ 2 z e i π 2Ĵ x in the readout stage. Therefore, the final state before the half-population difference can be written as When N is an even number, the final state |Ψ I final has analytical form which is written as Thus, the expectation of the half-population difference is and its derivative with respect to φ reads as, The expectation ofĴ 2 Correspondingly, the standard deviation of halfpopulation difference is Now, the oscillation of J z f becomes related to 2m. The form of Eq. (28) is also exactly anti-symmetric with respect to detuning ω − ω e , see the example for spin cat state with θ = π/8 in Fig. 3 (orange dashed line). Correspondingly, one can determine the zero detuning point ω − ω e = 0 from the symmetry property of the halfpopulation difference. Especially when θ = 0, the spin cat state |Ψ(0) CAT = The expectation of the half-population difference is Clearly, the main frequency of the oscillation of J z f becomes proportional to N = 2J. The function of Eq. (86) is anti-symmetric with respect to ω − ω e , which can be used to locate the zero detuning point ω = ω e , as shown in Fig. 3 (blue lines). Moreover, the square of halfpopulation difference is independent on the two parameters, i.e., J 2 z f = J 2 = N 2 /4. According to Eq. (70) and Eq. (71), the measurement precisions for ω and B can be analytically obtained, Similar to the case of SCS, for a fixed N , the measurement precision ∆ω is dependent on detuning ω − ω e , the signal amplitude B and evolution time T . When ω − ω e → 0, ∆ω → π 3γBT 2 N attains the optimal value, which is Heisenberg-limited. The measurement precision ∆B is just dependent on detuning ω − ω e and evolution time T . When ω − ω e → 0, ∆B → They are written as Here, the coefficientÃ When ω − ω e →, φ = 2γB π 1−cos[(ω−ωe)T ] ω−ωe → 0, sin(2mπ) ≈ 0, and cos(2mπ) ≈ 1, the measurement precisions ∆ω and ∆B can be simplified as In particular, when φ = 2γB π 1−cos[(ω−ωe)T ] ω−ωe = π 2 , sin(mπ) = 0, and (−1) J−m cos(mπ) = 1, the measurement precisions ∆ω and ∆B can be simplified as The coefficient C(θ) = 1 + 2 tan 2 (θ/2) 1+tan 2 (θ/2) is independent on particle number N [51]. Still, when ω − ω e → 0, ∆ω → π 3γBT 2 N is the optimal value. Under condition cos[(ω − ω e )T ] + (ω − ω e )T sin[(ω − ω e )T ] = 1, ∆B attains its optimal.

V. ROBUSTNESS
Below, we analyze the robustness of the many-body quantum lock-in amplifier against the stochastic noise. In realistic experiments, there are many imperfections that limit the parameters estimation. Here, we will discuss the effect of noise caused by environment on our scheme.
The Hamiltonian for the system coupled to the external AC magnetic field in a noisy environment can be described asĤ Thus, The effect of stochastic noise N o (t ′ ) is cancelled out in this integral. Meanwhile, the contribution of the target signal S 0 sin(ωt) is imprinted into the phase φ which is sensitively dependent on the detuning ω − ω e . The signal-tonoise ratio can be effectively improved with our manybody quantum amplifier.
To illustrate the robustness of the scheme directly, we numerically calculate the expectation of population versus detuning under stochastic noise N o (t) with η = 0, γB/4 and γB, see Fig. 5. It is shown that, for modest noise strength η = γB/4, even for spin cat states, the curves are almost identical to the ones of their corresponding ideal cases. When the noise strength is extremely strong η = γB, only small fluctuations appear and the negative impact of the noise can still be eliminated mostly. Our numerical simulation clearly indicates that, even though extreme stochastic noises exist, our quantum many-body lock-in amplifier can still be used for alternating signal detection with high signal-to-noise ratio. Moreover, the spin cat states can still be exploited for achieving the Heisenberg-limited quantum lock-in am- plifier, which is feasible in realistic experiments.

VI. SUMMARY AND DISCUSSIONS
In summary, we have presented a general scheme for realizing a quantum lock-in amplifier via many-body quantum interferometry under suitable periodic modulations. Based on our protocol, the frequency and amplitude of an alternating signal can be efficiently extracted with high signal-to-noise ratio, even in a noisy environment. We have analytically studied the measurement precisions for frequency and amplitude of an AC magnetic field via nonentangled and entangled many-body quantum states. For non-entangled states, the measurement precisions exhibit the SQL scaling as expected. For entangled particles, by employing the spin cat states as the input states and applying suitable interaction-based readout operations, the measurement precisions can exhibit the Heisenberglimited scaling.
Moreover, we illustrate the robustness of our manybody quantum amplifier to noise. In the presence of strong stochastic noise, even for spin cat states, the many-body quantum amplifiers can still be used for AC field sensing. Our scheme highlights the multi-π-pulse sequence as a useful technique for quantum sensing and provides a promising method for achieving Heisenberglimited detection for alternating signals.
In addition, our study may point out a new way for achieving time-dependent signal measurement via manybody quantum lock-in amplifier. The amplifier demonstrate the potency of quantum lock-in measurement technique, which is readily available for quantum probes. In single particle systems, the quantum lock-in measure-ment technique has widely used for frequency metrology [23], magnetic field sensing [24,27,29], and force detection for the quantum motion of magnetic mechanical resonators [28]. With the help of our many-body quantum lock-in amplifier, the measurement precisions for frequency, magnetic field and weak force may be further improved. This would be beneficial for the development of practical quantum technologies, such as atomic clocks, magnetometers and force detectors. In Sec. A, we provide the detailed derivations of the time-evolution in the interaction picture in the main text. In Sec. B, we discuss the influence of the pulse number on the operators and their expectations. In Sec. C, we confirm the validity of the effective Hamiltonian in the main text. In Sec. D, we give detailed results for the variation of the measurement precisions ∆ω and ∆B with detuning ω − ω e and amplitude B. In Sec. E, we discuss the other condition where the initial phase shift between the input and reference signals is different.

A. Time-evolution in the interaction picture
In this section, we give the proof of Eq.(2) ∼ Eq.(6) in the main text. The Schrödinger equation for an ensemble of two-level bosonic particles evolving under the HamiltonianĤ = M(t)Ĵ z + Ω(t)Ĵ x can be written as For convenience, we move into the interaction picture with respect toĤ mix = Ω(t)Ĵ x . In this case, we have |Ψ(t) = e −i t 0Ĥ mix(t ′ )dt ′ |Ψ(t) I , thus the state evolution for |Ψ(t) I can be expressed as ( = 1) Defining α = t 0 Ω(t ′ )dt ′ , and since [Ĵ a ,Ĵ b ] = iǫ abcĴc (ǫ abc is the Levi-Civita symbol with a, b, c = x, y, z), e iβĴxĴ z e −iβĴx = cos(β)Ĵ z + sin(β)Ĵ y , we have After integration, at time T , the evolved state |Ψ(T ) I becomes Here,T is the time-ordering operator and operatorÂ can be written aŝ Thus, we have with |Ψ(0) I = |Ψ(0) and the two phase factors and If one adding the suitable modulation Ω(t) to make cos(α) and sin(α) are periodic and synchronized with single S(t), the phase accumulated owing to S(t) can adds up coherently whereas the phase accumulated owing to N o (t) can averaged away.

B. Influence of pulse number
Here, we discuss the influence of the pulse number in our scheme. Since we work in the interaction picture, the operator can be written as,Ô whereÔ is the operator in Schrödinger picture. In our scheme, we consider the modulation is a set of sharp π pulses and can be approximated as Ω(t) = π M m=1 δ t − (m + 1 2 )τ . Thus, at the time T , the operator in the interaction picture can be written as, When the evolution time T is fixed, for the i-th pulse spacing τ i , the number of the π pulses is L = [T /τ i + 1/2], where [·] stands for the integer-valued division. Due to the property of the delta functions, we have T 0 π M m=1 δ t − (m + 1 2 )τ dt = Lπ. Therefore, the operators in the interaction picture becomeŝ For the collective spin operators, we havê According to Eqs. (57), we find that the parity of pulse number alters the operators. When L is an even number, the collective spin operators in the interaction picture areĴ While L is an odd number, the operators becomeĴ Except forĴ I x , the operatorsĴ I y andĴ I z change the sign when L is odd. Thus, the half-population difference of the final state Ĵ z f in Eqs. (16), (27), (31) are dependent on the parity of pulse number L.

C. Validity of the effective Hamiltonian
In the interaction picture, the Hamiltonian for the interrogation stage reads aŝ where h(t) is the square wave function. When Ω(t) = π M m=1 δ t − (m + 1 2 )τ and the corresponding square wave function is 1 ω e t + π/2 mod 2π ∈ [0, π) −1 ω e t + π/2 mod 2π ∈ [π, 2π) Under the condition |ω − ω e | ≪ ω and T ≫ 2π/ω, the Hamiltonian (58) can be approximated by an effective Hamiltonian [63,64] To compare with the two Hamiltonians, we denote the integrals over time as Here, Φ 1 and Φ 2 are two phases dependent on frequency ω and amplitude B, which can be expressed as Here, we confirm the validity of the effective Hamiltonian (63) via numerical calculations. According to our numerical results, we find that the two phases is almost the same when |ω−ωe| ω ≤ 0.1, i.e., Φ 1 ≈ Φ 2 , for evolution time T = 2π, ω ≥ 10π, as shown in

D. Variation of the measurement precison
In the main text, we only show the optimal measurement precision for the two parameters. In this section, we will give the variation of the measurement precision with detuning ω − ω e and amplitude B in detail. According to the analytical expression of the measurement precision, we find that the measurement precisions ∆ω and ∆B are dependent on both the frequency ω and amplitude B simultaneously. For comparison, we choose three typical input states: spin coherent state (SCS) |Ψ SCS , spin cat state |Ψ(π/8) CAT , and GHZ state |Ψ(0) CAT . In Fig. 7, the variations of ∆ω/ω and γ∆B/ω versus B and ω − ω e with the three input states are shown. When the input state is a SCS or a GHZ state, the measurement precision ∆ω attains its optimal value when cos[(ω − ω e )T ][2 − (ω − ω e ) 2 T 2 ] + 2T (ω − ω e ) sin[(ω − ω e )T ] = 2 under a fixed particle number N . Meanwhile, the measurement precision ∆B is just dependent on the frequency ω. The measurement precision of ∆B attains its optimal value when cos[(ω − ω e )T ] + (ω − ω e )T sin[(ω − ω e )T ] = 1. In contrast, the dependence of ∆ω/ω and γ∆B/ω on B and ω − ω e with spin cat states |Ψ(θ) CAT (θ = 0) is more complicated, e.g. see Fig. 7 (b) and (e).

E. Influence of initial phase shift between the input and reference signals
In our scheme, the modulation of Ω(t) is a set of π-pulse in the form of Ω(t) = π M m=1 δ t − (m + 1+k 2 )τ where k ∈ [−1, 1). The parameter k corresponds to the initial phase shift between the input and the reference signals. The lock-in case of k = 0 has been discussed. In the following, we consider the other condition where k = −1.
The Hamiltonian for the interrogation stage (after moving to the interaction picture with respect to the modulation) readsĤ where the square wave function h(t) becomes h(t) = 1 ω e t mod 2π ∈ [0, π) −1 ω e t mod 2π ∈ [π, 2π) Similarly, one can easily tune ω e close to ω in experiment. When |ω − ω e | ≪ ω and T ≫ 2π/ω, the Hamiltonian (62) can be approximated by an effective Hamiltonian (the approximation is also valid for |ω − ω e |/ω < 0.1 when ω > 10π), After similar procedures with the case of k = 1, the final state before half-population difference measurement can be written as The analytical form of the phase is written as Still, we first consider individual particles without any entanglement and then discuss the cases of spin cat states. For spin coherent state |Ψ SCS , the final state before the half-population difference measurement can be written as In an explicit form, the final state becomes where C m J = (2J)! (J+m)!(J−m)! is the binomial coefficient. After some algebra, the expectations of half-population difference and the square of half-population difference on the final state can also be explicitly written as x . These results indicates that the expectation of half-population difference is symmetry respective detuning ω − ωe and the symmetry point located at ω − ωe = 0, i.e., ω = ωe. Here, T = 2π, ω = 20π, γB = 2π, N = 6 and k = 0.
From Eq. (68), it is found that the information of the estimated two parameters ω and B can be inferred from the bi-sinusoidal oscillation of the half-population difference. In our calculation, we find the function of Eq. (68) with respect to detuning ω − ω e is symmetry under fixed B and the symmetry point located at ω − ω e = 0, i.e., ω = ω e , as shown in Fig. 8 (green dot line). Thus, one can obtain the value of ω, and further extract the value of B according to the analytic form of Eq. (68). This imply that the values of ω and B can be simultaneously obtained only by the half-population difference measurement. According to the quantum estimation theory [65][66][67][68], the measurement precisions of the estimated parameters can be given according to the error propagation formula. The measurement precisions for ω and B are and where Substituting Eq. (68) and Eq. (69) into Eq. (70) and Eq. (71), one can analytically obtain the measurement precisions ∆ω and ∆B. They read .
Next, we try to use the spin cat states to perform the measurement. We choose an interaction-based operation U I =Û = e i π 2Ĵ x e i π 2Ĵ 2 z e i π 2Ĵ x in the readout stage. Therefore, the final state before the half-population difference can be written as 2 z e i π 2Ĵ x e −iφ1Ĵz |Ψ(θ) CAT .
The final state |Ψ final has analytical form when N is an even number and can be written as .
At last, we also consider employing the GHZ state as the input state, i.e., θ = 0 in the spin cat state. According to Eq. (76) and Eq.
The expectation of the half-population difference is Clearly, the main frequencies of the bi-sinusoidal oscillation of J z f becomes proportional to N = 2J. Similarly, we find the function of Eq. (86) with respect to detuning ω − ω e is symmetry under fixed B and the symmetry point located at ω − ω e = 0, i.e., ω = ω e , as shown in Fig. 8(blue lines). Moreover, the square of half-population difference is independent on the two parameters, which becomes J 2 z f = J 2 = N 2 /4. According to Eq. (70) and Eq. (71), the measurement precisions for ω and B has analytical form and they read, .