Introduction

Lock-in detection can be used to efficiently extract weak alternating signals with a high signal-to-noise ratio from the extremely noisy environment, which is widely used in precision measurement1. Typical lock-in detection involves two key processes: mixing and filtering. Analog to classical lock-in detection that performs mixing via multipliers and filtering via integrators, the recently developed quantum lock-in detection (QLID) implements mixing through noncommutative modulations and filtering through time evolution. This quantum approach enables coherent phase accumulation while suppressing stochastic noises2,3. Using a single two-level quantum probe under dynamical decoupling, QLID has been demonstrated in several experiments4,5,6. In many-body scenarios, QLID can be realized through many-body quantum interferometry with collective periodic multipulse sequences7. In this context, quantum entanglement8 plays a crucial role in improving measurement precision9,10,11,12,13,14,15.

In this work, we report an experimental implementation of entanglement-enhanced QLID using two trapped ions initialized in a Greenberger–Horne–Zeilinger (GHZ) state. GHZ states serve as a benchmark in quantum metrology, allowing measurement precision to surpass the standard quantum limit (SQL)16,17,18 and reach the Heisenberg limit (HL)9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25. To the best of our knowledge, all existing experimental studies on QLID have focused exclusively on single-particle systems. As the first QLID experiment to incorporate entanglement, here we employ two trapped ions as the working medium and make a comparison of the QLID with and without entanglement. We employ periodic Carr-Purcell sequences as the reference signal to synchronize with the target signals. These multipulse modulation sequences, originally developed to protect qubits from decoherence26,27,28,29, have been widely used in quantum sensors for detecting alternating signals30,31,32,33,34,35. By tuning the pulse repetition period τm, we determine the target signal frequency via identifying the lock-in point with pattern symmetry analysis, achieving the Heisenberg scaling ( N−1) with the particle number N. Furthermore, we demonstrate experimentally the temporal precision of the QLID that approaches an inverse-quadratic temporal scaling ( T−2)—a fundamental feature of QLID that surpasses the conventional inverse-linear temporal scaling T−1. For more practical applications, we also consider optimized multipulse sequences for QLID execution, designed to be robust against rotation angle errors and detuning errors, thereby maintaining high measurement precision under real-world conditions.

Results

Theoretical framework

Before presenting our experimental implementation, we provide a brief overview of the theory of entanglement-enhanced QLID. We consider N identical trapped ions with each encoding a qubit in two electronic levels as \(\left\vert \uparrow \right\rangle\) and \(\left\vert \downarrow \right\rangle\). The system can be well characterized by the collective spin operators \({\hat{J}}_{x}=\frac{1}{2}\mathop{\sum }_{i=1}^{N}{\sigma }_{x}^{i},{\hat{J}}_{y}=\frac{1}{2}\mathop{\sum }_{i=1}^{N}{\sigma }_{y}^{i}\), and \({\hat{J}}_{z}=\frac{1}{2}\mathop{\sum }_{i=1}^{N}{\sigma }_{z}^{i}\), where \({\sigma }_{x,y,z}^{i}\) are Pauli matrices for the ith spin. Given the probe as trapped ions, the coupling between the probe and the external signal is described by the Hamiltonian \({\hat{H}}_{c}(t)=\gamma {{{\bf{B}}}}(t)\cdot {{{\bf{J}}}}+{{{{\bf{N}}}}}_{o}(t)\cdot {{{\bf{J}}}}=\gamma B\sin (\omega t){\hat{J}}_{z}+{N}_{o}(t){\hat{J}}_{z}\), where the AC magnetic field \({{{\bf{B}}}}(t)=B\sin (\omega t)\hat{{{{\bf{z}}}}}\) is the target signal to be detected with the magnetic field amplitude B and the oscillation frequency ω, and γ is the gyromagnetic ratio. The signal noise No(t) commonly exists in precision measurement experiments, including stochastic noise36,37,38,39,40 and magnetic noise41,42, which can be suppressed in QLID (Supplementary Note 1). Thus, the overall Hamiltonian can be simply written as

$$\hat{H}(t)=\gamma B\sin (\omega t){\hat{J}}_{z}+\Omega (t){\hat{J}}_{x},$$
(1)

with Ω(t) denoting the periodic Carr-Purcell pulse sequences, i.e.,

$$\Omega (t)=\left\{\begin{array}{rl}\Omega,&(\frac{1}{2}+n){\tau }_{m}-\frac{{\tau }_{\pi }}{2}\le t\le (\frac{1}{2}+n){\tau }_{{m}}+\frac{{\tau }_{\pi }}{2}\\ 0,&{{{\rm{others}}}}.\hfill\end{array}\right.$$
(2)

Here Ω is the Rabi frequency, n denotes the pulse number, τπ describes the pulse length (π = Ωτπ), τm represents the repetition period of the π pulses, and ωm is the carrier frequency defined by π/τm.

The system is prepared in a GHZ state, i.e., \(\left\vert GHZ\right\rangle= \frac{1}{\sqrt{2}}({\left\vert \uparrow \right\rangle }^{\otimes N}+{\left\vert \downarrow \right\rangle }^{\otimes N})\), and then undergoes mixing and filtering to accumulate the signals. At this stage, the system state interacts with the external AC magnetic field, along with application of a train of π-pulses with equidistant period. The next stage is the readout procedure, where a unitary operation \(\hat{U}={e}^{-i\frac{\pi }{2} \, {\hat{J}}_{x}}\) is applied for recombination. In general, the final state after nπ—pulses with time tn = nτm is \({\left\vert \Psi ({t}_{n})\right\rangle }_{{{{\rm{f}}}}}={e}^{-i\frac{\pi }{2} \, {\hat{J}}_{x}}\hat{{{{\mathcal{T}}}}}{e}^{-i\hat{H}(t)dt}\left\vert GHZ\right\rangle\), where \(\hat{{{{\mathcal{T}}}}}\) denotes the time-ordering operator (Supplementary Note 1).

Since the durations of pulses are negligible under our experimental condition (e.g., τπ ≤ 0.1τm), the state at time tn is given by

$${\left\vert \Psi ({t}_{n})\right\rangle }_{{{{\rm{f}}}}}={e}^{-i\frac{\pi }{2} \, {\hat{J}}_{x}}({\left\vert \uparrow \right\rangle }^{\otimes N}+{e}^{i{(-1)}^{n}N{\phi }_{n}}{\left\vert \downarrow \right\rangle }^{\otimes N})/\sqrt{2},$$
(3)

with the total accumulation phase

$${\phi }_{n}=\frac{2\gamma B}{\omega }\sin \left[\frac{n\omega ({\tau }_{m}-{\tau }_{e})}{2}\right]\frac{\sin [n\omega ({\tau }_{m}-{\tau }_{e})/2]}{\sin [\omega ({\tau }_{m}-{\tau }_{e})/2]}.$$
(4)

Here τe = π/ω is the half-period of the target signal and close to τm. Obviously, ϕn is the antisymmetric phase with respect to the lock-in point τm = τe. For interferometry-based quantum metrology with GHZ states, parity measurement is efficient for estimating the accumulated phase ϕn. The expectation value of the parity measurement on the final state is \(\langle \hat{\Pi }\rangle=\left\langle \Psi ({t}_{n})\right\vert {e}^{i\pi {\hat{N}}_{\uparrow }}{\left\vert \Psi ({t}_{n})\right\rangle }_{{{{\rm{f}}}}}\) with \({\hat{N}}_{\uparrow }\) denoting the population of the state \(\left\vert \uparrow \right\rangle\). After some algebra, we have \(\langle \hat{\Pi }\rangle={(-1)}^{N/2}\cos (N{\phi }_{n})\) for N being even, which is symmetric with respect to the lock-in point τm = τe. Thus, we can determine the lock-in point experimentally from the pattern symmetry by modulating the pulse repetition period τm.

The measurement precision via the error propagation formula is given by

$$\Delta \omega=\frac{\Delta \hat{\Pi }}{| \partial \langle \hat{\Pi }\rangle /\partial {\omega }_{m}| }$$
(5)

with \(\Delta \hat{\Pi }\) denoting the standard deviation of \(\hat{\Pi }\). Experimentally, when τm is close to τe, the measurement precision of the GHZ state can be written as

$$\Delta {\omega }_{{{{\rm{HL}}}}}\approx \frac{1}{N}\frac{1}{{T}^{2}}\frac{\pi }{| \gamma B(1+3a)| }$$
(6)

with phase accumulation time T = tn and a = ω(τm − τe)/2 (see details in “Methods”). Clearly, when employing entangled states, we may achieve the measurement precision with Heisenberg scaling ΔωHL 1/N in the particle number domain. In contrast, for non-entangled states (e.g., product states) as input states, the precision is given by \(\Delta {\omega }_{{{{\rm{SQL}}}}}=\frac{1}{\sqrt{N}}\frac{1}{{T}^{2}}\frac{\pi }{| \gamma B(1+3a)| }\), which is limited to the SQL \(\propto 1/\sqrt{N}\) (Supplementary Note 1). Moreover, our scheme witnesses experimentally an inverse-quadratic temporal scaling T−2 with respect to the phase accumulation time T. This scaling originates from the QLID itself, representing a quadratic improvement over the methods without QLID, and would be very useful in quantum metrology. Moreover, once ω is determined, B can be extracted from \(\langle \hat{\Pi }\rangle\) via a fitting procedure. Therefore, its sensitivity follows a Heisenberg scaling ΔBHL 1/N and it also achieves am inverse-quadratic temporal scaling T−2 with respect to the signal accumulation time T, see Supplementary Note 1.

For more practical implementation, we incorporate optimal pulse sequences into the QLID protocol, demonstrating robustness against imperfections and noises while maintaining the Heisenberg scaling. Through analytical analysis, we find that even an imperfectly prepared GHZ state does not introduce any frequency shift in the lock-in signals, but only scales the ideal measurement precision by a multiplicative factor. This indicates that, although the imperfection degrades both the amplitude and linewidth of the observed spectral peaks, the Heisenberg scaling Δωimp N−1 with respect to the particle number N is preserved (see details in “Methods”). Moreover, our QLID scheme is robust to noises. Although GHZ states are susceptible to external magnetic noise, we find that GHZ-state-based QLID maintains signal profiles consistent with their ideal counterparts, provided the noise strength is modest (e.g., the stochastic signal noise NR = 4γB and 50-Hz noise N50 = 0.1γB) (see more detailed discussion in Supplementary Note 1).

Experimental scheme

The working medium of our QLID consists of two 40Ca+ ions confined in a linear Paul trap with the vibrational center-of-mass mode frequency ωc/2π = 0.735 MHz and the breathing mode frequency ωb/2π = 1.273 MHz along the z-axial direction, see Fig. 1a. A magnetic field of approximately 4.12 Gauss, produced by permanent magnets, is applied at the trap center, in parallel with the axial direction, to create the quantization axis. Both 40Ca+ ions are manipulated by a global 729-nm laser beam along the axial direction. Prior to the experiment, we have completed both the Doppler and sideband cooling, which reduces the thermal phonons to the average phonon number nb ≈ 0.03 (nc ≈ 0.13) of the breathing mode (the center-of-mass mode) along the axial direction. This ensures to keep thermal phonons from disrupting Rabi oscillations. The qubits are encoded in pseudospin states, that is, \(\left\vert S\right\rangle=\left\vert {4}^{2}{S}_{1/2},{m}_{J}=1/2\right\rangle\) and \(\left\vert D\right\rangle=\left\vert {3}^{2}{D}_{5/2},{m}_{J}=3/2\right\rangle\) with the magnetic quantum number mJ, as shown in Fig. 1b. The GHZ state is prepared via Mϕlmer–Sϕrensen gate with the fidelity F ≈ 99%43,44, where the two ions are driven globally by a red-detuned and a blue-detuned 729-nm laser beams with the symmetric detuning δ from the breathing mode. To fully illustrate the entanglement-enhanced effects, we focus on the measurement of target signal frequency by experimentally initializing either a product state or a GHZ state in the QLID process, as shown in Fig. 1c.

Fig. 1: The schematic diagram of our two-ion QLID scheme.
Fig. 1: The schematic diagram of our two-ion QLID scheme.
Full size image

a Experimental setup with the Cartesian coordinates, where black spheres denote 40Ca+ ions, and the 729-nm laser is directed along the z-axial direction. The target signal, an AC magnetic field, is generated by passing an alternating current through the nearby compensation electrode. b Level scheme of two 40 Ca+ ions entangled via the breathing mode state \(\left\vert n\right\rangle\) of the axial direction. The red and blue arrows represent the red- and blue-detuned irradiation of 729-nm laser, used to implement the Mϕlmer–Sϕrensen gate, where δ represents the symmetric detuning. For global manipulation, the 729-nm laser is employed for the carrier transition, as indicated by the double-sided purple arrow. c Experimental steps from initialization (probe) to the final readout, where τm represents the period of the lock-in sequences.

Experimentally, the target signal is an AC magnetic field with the frequency (strength) of ω/2π = 10 (γB/2π = 0.7) kHz, i.e., τe = 50 μs. The Rabi frequency of π pulses is ω/2π = 100 kHz, corresponding to τπ = 5 μs. We choose the pulse number n = 30 in our experimental execution in terms of the impact of the noise of the 729-nm laser in our setup. This noise leads to a decrease in the accuracy of the π pulses as the sequence time increases (Supplementary Note 2). The lock-in multipulse sequences are produced by the arbitrary waveform generator, where the 729-nm laser is modulated by acousto-optic modulators. The experimental procedure includes the following steps: (i) initialize the system to the GHZ state \(\frac{1}{\sqrt{2}}({\left\vert \uparrow \right\rangle }^{\otimes 2}+{\left\vert \downarrow \right\rangle }^{\otimes 2})\) (or product state \(\frac{1}{\sqrt{2}}{(i\left\vert \uparrow \right\rangle+\left\vert \downarrow \right\rangle )}^{\otimes 2}\)) by applying a π/2 Mϕlmer–Sϕrensen gate pulse with an initial phase ϕ0 = 7π/4 (or a π/2 pulse) to the ground state \(\left\vert SS\right\rangle\); (ii) globally apply periodic pulse sequences to realize the QLID; and (iii) globally implement a π/2 pulse for readout. By employing electronic shelving and setting different threshold values of the scattering photons, we can acquire the populations of \(\left\vert SS\right\rangle\), \(\left\vert SD\right\rangle\) + \(\left\vert DS\right\rangle\) and \(\left\vert DD\right\rangle\) denoted by PSS, PSD+DS, and PDD, respectively.

Experimental execution

By varying the pulse period τm [0.99, 1.01]τe, we show in Fig. 2a, c the expectation values of pulse-period-dependent parities (i.e., PDD + PSS − PSD+DS) for n = 20 and 30. The experimental observation is consistent with the analytic result \(\langle \hat{\Pi }\rangle\) (solid line), indicating that the QLID can suppress the main noises that exist experimentally. The corresponding experimental measurements of PDDPSS, and PSD+DS are elucidated in Supplementary Note 2.

Fig. 2: Experimental implementation in the case of initially prepared non-entangled and entangled states.
Fig. 2: Experimental implementation in the case of initially prepared non-entangled and entangled states.
Full size image

a and c The pulse-period-dependent parity of the product state (non-entangled state) and the GHZ state (entangled state) with n = 20 and n = 30. For convenience of comparison, we consider the region with (τm − τe)/τe [−0.01, 0.01], as shaded in orange. b and d Dimensionless measurement precision Δω/τe of the non-entangled and entangled states with n = 20 and n = 30, where the red (blue) solid line corresponds to the theoretical result ΔωHL/ τe (ΔωSQL/τe), approaching the HL (SQL). The experimental results fit well with the theoretical results, i.e., the solid line. Here, FWHW denotes the full width at half maxima represented by the dashed lines, and τe and τm represent the periods of external signal and Carr-Purcell sequences, respectively. The purple rectangles present the areas where FWHWs are located. Error bars represent the statistical standard deviation of the experimental data, calculated from 10,000 measurements for each data point.

It is clear that pulse-period-dependent parities are symmetric about the lock-in point (τm = τe), and thus the frequency ω can be obtained from the pattern symmetry. Also, the patterns of PSS, PSD+DS, PDD are used to acquire this signal. Notably, the contrast (amplitude-to-full width at half maximum ratio) of \(\langle \hat{\Pi }\rangle\) for the entanglement case doubles that of non-entanglement case (i.e., a product state) due to the twice-larger amplitude of parities, demonstrating a notable improvement in lock-in precision. Moreover, the n = 30 case exhibits larger value of contrast than the n = 20 case due to more phase accumulation in the former. This result suggests the precision improvement through increased pulse number n, which is consistent with Eq. (6).

Heisenberg-limited measurement precision

To further illustrate the advantage of entanglement, we investigate the dimensionless measurement precision of the parameter ω via the error propagation formula divided by the period of target signal, i.e., Δω/τe. Similar to atomic frequency standards45, the symmetry of \(\langle \hat{\Pi }\rangle\) about the lock-in point (τm = τe) allows us to strategically set the operational lock-in point at the bilateral half-maximum positions of the pattern. The corresponding measurement precisions agree well with the analytic result of Eq. (5), see Fig. 2b, d. This approach circumvents significant measurement errors that occur at the peak of the pattern, where the vanishing signal slope - an inherent experimental limitation—would otherwise dominate the uncertainty (Supplementary Note 3). Clearly, the measurement precision at the pattern’s half-maximum positions shows significant enhancement when increasing the pulse number n from 20 to 30. Ideally, the measurement precision can be improved via increasing n. However, in our setup, the maximum number of pulses is limited to n = 30 due to noise effects from the 729-nm laser (Supplementary Note 2). Our experimental results demonstrate that entangled states enable significantly higher measurement precision compared to non-entangled states, approaching the Heisenberg scaling N−1 with respect to the particle number N. Meanwhile, the good agreement between experimental observations and theoretical predictions (both ΔωHL and ΔωSQL) confirms the successful observation of the inverse-quadratic temporal scaling T−2 with respect to the phase accumulation time T.

Robustness

In our experimental implementation, imperfections always exist and affect the lock-in signals. To effectively suppress these detrimental effects, we employ optimized Carr-Purcell pulse sequences for carrying out QLID. In our system, the dominant noise sources are laser intensity fluctuations and frequency instability, which cause rotation angle errors and detuning errors, respectively. Moreover, magnetic field noise exists, which primarily couples along the \(\hat{{{{\bf{z}}}}}\) direction, i.e., the quantization axis, see Supplementary Note 1. To simultaneously suppress these noises, we engineer robust quantum dynamics by designing periodic global control pulse sequences46,47,48. This approach makes use of the transformations of the signal terms in the interaction picture by executing periodic pulse sequences under the noise, where the effect of the noise is encoded into the time-dependent coefficients Fμ(t), yielding the evolution term \(\int_{(k-1)\tau }^{k\tau }{F}_{\mu }(t) \, {\hat{J}}_{\mu }dt\) (with μ xyz), see Supplementary Note 4. With this representation, we have derived a concise set of algebraic conditions for robust dynamic engineering. First, to suppress detuning errors, we impose the condition \(\int_{0}^{{t}_{{{{\rm{total}}}}}}{F}_{\mu }(t)\,{{{\rm{d}}}}t=0\) for eliminating the detrimental influence from the noise relevant to the signal term \({\hat{J}}_{z}\), where ttotal denotes the total evolution time. This condition ensures that the evolution times along the positive and negative directions of μ-axis are equal, that is, making use of symmetry to eliminate the imperfection, analogous to the principle of the spin-echo technique. Second, to resist rotation angle errors, we impose the condition \(\int_{0}^{{t}_{{{{\rm{total}}}}}}\left[{{{\bf{F(t)}}}}\times {{{\bf{F(t)}}}}\right]{{{\rm{d}}}}t=\overrightarrow{0}\), where \({{{\bf{F(t)}}}}={\sum }_{\mu }{F}_{\mu }(t){\hat{e}}_{\mu }\) is the vector including the rotating noise with \({\hat{e}}_{\mu }\) being the unit vector along μ-axis. This condition guarantees that systematic rotations about the \(+\hat{\mu }\)-axis are exactly compensated by the corresponding rotations about the \(-\hat{\mu }\)-axis, making use of the chiral symmetry to eliminate the rotational errors.

Based on the conditions above, we have optimized the Carr-Purcell pulse sequences by setting Ω(t) = Ω when \({{{\rm{mod}}}}[n,4]=1,2\), and setting Ω(t) = −Ω when \({{{\rm{mod}}}}[n,4]=3,4\), see Fig. 3a. Figure 3b (with Fy as an example) shows the above two conditions satisfied since Fμ occupies the equal areas with respect to the zero point of the vertical axis. As a result, the improved Carr-Purcell pulse sequences can resist the rotation angle and the detuning errors. However, for the Carr-Purcell pulse sequences without optimization, we find the coefficients Fx and Fz occupying equal areas with respect to the zero point of the vertical axis, while the coefficient Fy occupies unequal areas with respect to Fy = 0, see Fig. 3c. In this case, it is impossible to simultaneously resist the rotation angle and detuning errors (Supplementary Note 4).

Fig. 3: Experimental implementation in the case of initially prepared entangled state with the optimized Carr-Purcell sequences.
Fig. 3: Experimental implementation in the case of initially prepared entangled state with the optimized Carr-Purcell sequences.
Full size image

a The optimized Carr-Purcell sequences. b, c Variation of the corresponding coefficient Fy versus time for Carr-Purcell sequence with Ω = 200π, τ = 0.05 \({t}_{total}=(\frac{1}{2}+n)\tau+(1+n){\tau }_{\pi }\), where (b) with optimization and c without optimization. d, e The pulse-period-dependent parity with respect to deviation of rotation (detuning) with n = 32. Color patches are experimental data obtained by 10,000 measurements.

Figure 3d presents the pulse-period-dependent parities versus (τm − τe)/τe under different rotation angle errors, in which the optimized Carr-Purcell sequence is employed and the GHZ state is initially prepared. Experimentally, the rotation angle errors dθ are mainly resulted from the inaccurate gating time, that is, dθ = Ωdτ, where dτ = τ − τπ. We see from the experimental results that the rotation angle errors have little influence on the frequency shifts in the lock-in signal, especially when (τ − τπ)/τπ ≤ 10%. The pattern is still symmetric with respect to the lock-in point τm = τe with the minimum at the point. However, as the rotation angle error dθ increases, both the height and the sharpness of the peak decrease, thus reducing the precision of QLID. Figure 3e presents the pulse-period-dependent parities versus (τm − τe)/τe under different detuning errors. From the experimental observation, we find that the large detuning error could change the symmetry of the pattern with respect to the lock-in point, leading to difficulty of determining the lock-in point from the curve and extracting the frequency information ω. However, if Δ 10 kHz, we see that the detuning error hardly induces any frequency shift on the lock-in signal and the pattern is always symmetric. Since 10 kHz is much larger than the strength of the external field (i.e., γB/2π = 0.7 kHz) in our consideration, we deem the optimized multipulse sequences to be practically robust against the detuning errors.

Discussion

We have experimentally executed the QLID with two trapped 40Ca+ ions and witnessed the entanglement-enhanced measurement of target signal frequency with precision approaching the Heisenberg scaling (Δω N−1). Notably, using the optimized multipulse sequences, our QLID has shown robustness against rotation angle errors and detuning errors, significantly reducing the difficulty of experiment realization. To have a more comprehensive understanding about the detectable frequency range of oscillating magnetic fields via QLID, we have considered three cases (Supplementary Note 5). In practical situation of the periodic pulse sequences with finite-width pulse (i.e., π = Ωτπ), the detectable frequency range is 1/(2T) ≤ ω/2π < Ω. In addition to the Heisenberg scaling (ΔωHL N−1) with respect to the particle number N, we have also experimentally demonstrated the inverse-quadratic temporal scaling (Δω T−2) with respect to the phase accumulation time T. While this scaling does not originate from entanglement, it may offer practical advantages for quantum metrological applications.

These findings highlight the potential of quantum entanglement in QLID, which would stimulate more investigation of many-body devices that involve entanglement. However, practical applications of many-body QLID require single-particle-resolved detection for parity measurements, which remains a significant challenge experimentally. Fortunately, interaction-based readout protocols, which employ engineered nonlinear processes, provide an effective approach for achieving Heisenberg-limited measurements with GHZ states by population difference measurements49,50,51. For many-body QLID, the population difference measurement can approach a higher measurement precision (Supplementary Note 5). Therefore, integrating these interaction-based readout techniques with many-body QLID holds great promise for demonstrating entanglement-enhanced effects in future experiments.

Moreover, one may employ composite pulse techniques52 to resist experimental imperfections in QLID. However, the use of composite pulses may introduce additional noise sources, as they require decomposing each original π-pulse into multiple constituent pulses. In this sense, the optimized Carr-Purcell sequences used in our work offer both experimental simplicity and robust performance against typical experimental imperfections.

At the end, it is instructive to compare our work with an early experiment which also uses modulation pulse sequences and entangled states to measure a static magnetic interaction53. Firstly, while both two works utilize modulation pulse sequences to achieve the desired measurements, their measurement mechanisms are fundamentally distinct. The work of Kotler et al.53 aims to measure a static magnetic interaction between two bound electrons under strong noise and demonstrates “an adaptation of the quantum lock-in method" of DC signal, but not a rigorous QLID. Since its signal is time-independent, there is no concept of synchronization between reference and target signals. In this context, the modulation pulse sequence serves primarily for dynamical decoupling to suppress noise. While our work aims to detect an AC signal within strong noises and employ modulation pulse sequence as a reference signal to synchronize the target AC signal. Therefore, our work presents a rigorous QLID. Secondly, while both two works utilize entanglement, the roles of entanglement are fundamentally distinct. The work of Kotler et al.53 use specific entanglement states to construct a decoherence-free subspace for isolating the signal from noise. In particular, the measurement can only be achieved with the entangled states in such a specific decoherence-free subspace. Thus, it is not an entanglement-enhanced quantum metrology which aims to surpass the SQL via using entanglement, but an entanglement-enabled scheme. In contrast, our work employs GHZ states for phase amplification within a QLID framework. More differently, our scheme can be implemented with both product and entangled states. In particular, our measurement precision can be improved from the SQL to the HL by employing entanglement. Thus, our work presents an entanglement-enhanced quantum metrology.

Methods

Robustness against the imperfect GHZ state

Experimentally, the Mølmer–Sørensen gate is a standard method for generating entangled states via global bichromatic laser driving. In such a generation process, the system dynamics obeys an effective Hamiltonian

$${\hat{H}}_{GHZ}=\Omega {({\hat{\sigma }}_{\alpha }^{i})}^{\otimes N},$$
(7)

where \({\hat{\sigma }}_{\alpha }=\cos (\alpha ){\hat{\sigma }}_{x}+\sin (\alpha ){\hat{\sigma }}_{y}\), α denotes the initial phase, and Ω is the strength of bichromatic laser. For the system initially with all particles in state \(\left\vert \downarrow \right\rangle\), the time-evolution under the Hamiltonian \({\hat{H}}_{GHZ}\) can be given as \(\left\vert \Psi (t)\right\rangle={e}^{-i{\hat{H}}_{GHZ}t}{\left\vert \downarrow \right\rangle }^{\otimes N}\). After some algebra, we have

$$\left\vert \Psi (t)\right\rangle=\cos (\Omega t){\left\vert \downarrow \right\rangle }^{\otimes N}-i\sin (\Omega t){(\cos (\alpha )-i\sin (\alpha )\left\vert \uparrow \right\rangle )}^{\otimes N}.$$
(8)

When α = 7π/4 and the interaction time te = π/(4Ω), the system evolves to the GHZ state

$$\left\vert \Psi ({t}_{e})\right\rangle=[{\left\vert \downarrow \right\rangle }^{\otimes N}-i{e}^{iN\pi /4}{\left\vert \uparrow \right\rangle }^{\otimes N}]/\sqrt{2}.$$
(9)

Experimentally, the parameters α and Ω can be precisely modulated via acousto-optic modulators. Therefore, the observed imperfections in GHZ state preparation are primarily caused by deviations in the interaction time ti from its theoretically value te. Thus the corresponding imperfect GHZ state can be rewritten as

$$\left\vert \Psi ({t}_{i})\right\rangle=[\cos (\frac{\pi {t}_{e}}{4{t}_{i}}){\left\vert \downarrow \right\rangle }^{\otimes N}-i\sin (\frac{\pi {t}_{i}}{4{t}_{e}}){e}^{iN\pi /4}{\left\vert \uparrow \right\rangle }^{\otimes N}],$$
(10)

whose fidelity with respect to the GHZ state is

$$F=| \langle GHZ| \Psi ({t}_{i})\rangle {| }^{2}=[\sin (\frac{\pi {t}_{i}}{2{t}_{e}})\sin (\frac{N\pi }{4})+1]/2.$$
(11)

When using this state as the input for the QLID protocol, the expectation value of the parity measurement at the output becomes

$$\langle {\hat{\Pi }}_{{{{\rm{imp}}}}}\rangle=\sin \left(\frac{\pi {t}_{i}}{2{t}_{e}}\right)\langle \hat{\Pi }\rangle,$$
(12)

where \(\frac{\pi {t}_{i}}{4{t}_{e}}\notin \left\{\frac{\pi }{2}+k\pi,k\pi | k\in {\mathbb{Z}}\right\}\), and \(\langle \hat{\Pi }\rangle=-\cos (N{\phi }_{n})\) (Supplementary Note 1). Our analysis shows that imperfect initial state preparation does not introduce any frequency shift in the lock-in signals, as the parity expectation value \(\langle \hat{\Pi }\rangle\) is preserved. Although increasing imperfections degrade both the spectral peak amplitude and linewidth, the fundamental N-scaling of the parity oscillation frequency remains robust. Furthermore, in this regime, we can still determine the measurement precision of the target signal as

$$\Delta {\omega }_{{{{\rm{imp}}}}}=\sqrt{\frac{1-\sin {(\frac{\pi {t}_{i}}{2{t}_{e}})}^{2}{\langle \hat{\Pi }\rangle }^{2}}{\sin {(\frac{\pi {t}_{i}}{2{t}_{e}})}^{2}(1-{\langle \hat{\Pi }\rangle }^{2})}}\Delta {\omega }_{{{{\rm{HL}}}}},$$
(13)

where ΔωHL has been defined in Eq. (6). The numerical results for the expectation of the parity measurement at different initial times are shown in Supplementary Note 6. Compared to ideal GHZ states, the imperfect interaction time ti during state preparation introduces only a constant prefactor to the measurement precision while preserving the Heisenberg scaling Δωimp N−1.