Efficient and robust signal sensing by sequences of adiabatic chirped pulses

We propose a scheme for sensing of an oscillating field in systems with large inhomogeneous broadening and driving field variation by applying sequences of phased, adiabatic, chirped pulses. The latter act as a double filter for dynamical decoupling, where the adiabatic changes of the mixing angle during the pulses rectify the signal and partially remove frequency noise. The sudden changes between the pulses act as instantaneous $\pi$ pulses in the adiabatic basis and additionally compensate frequency and amplitude noise. We also use the pulses' phases as control parameters to correct for other errors, e.g., due to non-adiabatic couplings. Our technique improves the coherence time by more than two orders of magnitude in comparison to standard XY8 dynamical decoupling in realistic simulations in NV centers with large inhomogeneous broadening and is suitable for experimental implementations with substantial driving field inhomogeneity, thus allowing for improved sensing in a wide range of experimental applications.

We propose a scheme for sensing of an oscillating field in systems with large inhomogeneous broadening and driving field variation by applying sequences of phased, adiabatic, chirped pulses. The latter act as a double filter for dynamical decoupling, where the adiabatic changes of the mixing angle during the pulses rectify the signal and partially removes frequency noise. The sudden changes between the pulses act as instantaneous π pulses in the adiabatic basis and additionally compensate frequency and amplitude noise. We also use the pulses' phases as control parameters to correct for other errors, e.g., due to non-adiabatic couplings. Our technique improves the coherence time by more than two orders of magnitude in comparison to standard XY8 dynamical decoupling in realistic simulations in NV centers with large inhomogeneous broadening and is suitable for experimental implementations with substantial driving field inhomogeneity, thus allowing for improved sensing in a wide range of experimental applications.
Introduction.-Magnetometry experiments require the measurement of a signal whose characteristics are related to a magnetic field to be sensed. Pulsed and continuous dynamical decoupling have already been applied for quantum memories and for sensing of oscillating (AC) fields in various systems, e.g., trapped ions, nitrogen-vacancy (NV) centers in diamond, rare-earth doped-solids . However, the magnitude of the sensed signal is small in systems with large inhomogeneous broadening and field inhomogeneities can also limit the efficiency of the technique. Then, only a small fraction of the sensor atoms participate effectively in the process due to the limited bandwidth of the control field.
In this letter we propose sequences of phased RAP pulses for dynamical decoupling (DD) and sensing of an AC field. The signal has a frequency of half the pulses' repetition rate and can be sensed in systems with large field inhomogeneity and varying transition frequencies, e.g., due to inhomogeneous broadening or different atom orientations with respect to the quantization axis as with NV containing nanodiamonds in cells. The RAP sequences act as a double filter for DD, where the population transfer during a pulse rectifies the signal and partially removes frequency noise. The sudden changes in the mixing angle between the pulses act as fast π pulses in the adiabatic basis and additionally compensate frequency and amplitude noise. Finally, we use the pulses' phases as control parameters to correct for other errors, e.g., due to non-adiabatic couplings. We demonstrate the superior performance of the RAP protocol with the XY8 sequence (RAP-XY8) in comparison to the widely used XY8 sequence [5] with rectangular pulses with the same peak Rabi frequency for realistic experimental con- The example follows the Allen-Eberly (AE) model [41] with Ω(t) = Ω0sech[(t − t c,k )/T ], where t c,k is the k-th pulse center, ∆(t) = (R/2) tanh [(t − t c,k )/T ], R is the chirp range, T pulse = 12T . The pulses can be phase-shifted for improved performance. Our goal is to sense the amplitude g of an oscillating signal with ωs = π/(T pulse + τ ). The RAP pulses perform population transfer and modulate the signal. Usually, it is advantageous to take τ = 0 and increase T pulse to match ωs, keeping T constant, as this improves adiabaticity without affecting the modulation function. The transition time Ttr = 1/|ν ′ (t c,k )| = 4T Ω0/R characterizes the time scale of population transfer. When Ttr ≪ T + τ , its effect can be neglected and the rectified signal takes the bottom shape.
ditions in an ensemble of NV centers with inhomogeneous broadening.
Theory of RAP sensing.-Our goal is to sense the amplitude of an oscillating (AC) field. We consider the evolution of a two-state system, described by the Hamiltonian in the rotating-wave approximation H s (t) = − ∆(t) 2 σ z + Ω(t) 2 σ x + gσ z cos (ω s t + ξ), (1) where ∆(t) ≡ ∆(t)−∆ ǫ (t) is the detuning, which depends on the target detuning ∆(t) and an error ∆ ǫ (t). The Rabi frequency is Ω(t) = Ω(t)[1 + ǫ Ω (t)] = µ B(t), where ǫ Ω (t) is also an error term. The amplitude, angular frequency, and initial phase of the sensed AC field are g, ω s , and ξ, respectively. We move to the adiabatic basis and obtain [27,28] H ad,s (t) = − Ω eff (t) 2 σ z + g cos (ω s t + ξ) (2) × [cos (2 ν(t))σ z + sin (2 ν(t))σ x ] , where the mixing angle can be expressed by ν(t) = (1/2) arctan [ Ω(t)/ ∆(t)] (see Supplemental Material at [42] for details), Ω eff (t) = Ω(t) 2 + ∆(t) 2 , and we applied the adiabatic approximation (| ν ′ (t)| ≪ Ω eff (t)). The mixing angle depends on the sign of the detuning, which can change almost instantaneously between RAP pulses. We incorporate such changes in the definition of a new basis, which we term "adiabatic, toggling". The Hamiltonian during the k-th RAP pulse becomes H ad,tog,s (t) = R ad,tog (t)H ad,s (t)R ad,tog (t) † , where R ad,tog,s (t) = exp [i(k − 1)∆ νσ y ], ∆ ν is the sudden change in the mixing angle between the pulses and First, we consider the case of continuous adiabatic evolution without sudden changes in ν(t). Then, the "adiabatic, toggling" basis is the same as the adiabatic basis and f (t) = −1. We can rectify the signal and partially compensate frequency noise ∆ ǫ (t) by population inversion with RAP. One can obtain intuition about RAP by considering the evolution in the adiabatic and bare basis (see Fig. 2 and Supplemental Material at [42] for details). However, the effective Rabi frequency Ω eff (t) remains susceptible to amplitude fluctuations and higher order errors due to frequency noise, so this is not optimal.
Next, we consider sequences of RAP pulses where the detuning shifts between the pulses, e.g., from very large positive to very large negative values, leading to fast changes in the mixing angle by ∆ν ≈ π/2. These are equivalent to applying instantaneous π pulses in the adiabatic basis, which compensate the noise in Ω eff (t). Thus, f (t) = −1 during the odd pulses and f (t) = 1 during the even ones. Finally, we move to the interaction basis with respect to f (t) Ω eff (t)σ z /2 and obtain We assume ω s ≪ Ω eff (t) and | ν ′ (t)| ≪ Ω eff (t), so we neglect the fast oscillating second term where the modulation function f (t) = f (t) cos (2 ν(t)).
We note that f (t) stays the same if ∆ν = ±π/2 between Time t (in µs) two RAP pulses because f (t) and cos (2 ν(t)) change their signs simultaneously. Thus, the modulation function f (t) is affected only by adiabatic changes in the mixing angle during the pulses (see Fig. 1). As these changes do not affect the modulation function f (t) (only f (t)), the pulses can be truncated and separated by free evolution time τ (see Fig. 1), and we can sense the signal if T pulse + τ = π/ω s . However, it is usually preferable to use long pulses and τ = 0 as this improves adiabaticity. If the RAP transition time is short, i.e., T tr ≪ π/ω s , where T tr = 2 Ω(t c )/ ∆ ′ (t c )) is defined in analogy to the transition time in stimulated Raman adiabatic passage [43], and t c is the time of level crossing in the bare basis, the modulation function can be approximated by a step function (see Fig. 1 and Supplemental Material at [42]). Then, the Hamiltonian in Eq. (C6) becomes H int,tog,s (t) ≈ −g| cos (ω s t)|σ z where we assumed that ξ = 0 for maximum contrast and ν(t 0 ) = π/2 without loss of generality. Similarly to standard pulsed DD, the sensor qubit performs Ramsey oscillations and accumulates a phase 2η(t), which takes the form (g ≪ ω s ) We can observe the signal stroboscopically directly in the bare basis after every second RAP pulse. Then, the dynamic phase due to Ω eff (t) (and its noise) is compensated by the instantaneous changes in the mixing angle, which   [41], with Ω0 = 2π 10 MHz, a target chirp range R = 2π 95 MHz, characteristic time T = 0.2 µs, pulse duration T pulse = 1 µs, and pulse separation τ = 0. The sensed field has an amplitude of g = 2π 4.34 kHz, initial phase ξ = 0 and angular frequency ωs = 2π 0.5 MHz. The peak Rabi frequency is the same in both protocols while the durations and pulse separation and chosen to match the T pulse + τ = π/ωs. The simulation assumes an inhomogeneous broadening with a Gaussian distribution with a full width at half-maximum of 2π 26.5 MHz (T ⋆ 2 = 20 ns) and takes into account frequency and amplitude noise (see text). The light gray curve shows the theoretical evolution in an ideal system. The red curve shows the evolution with inhomogeneous broadening, frequency and amplitude noise. The coherence time is estimated T2 ≈ 1.7 ms and is more than two orders of magnitude higher with RAP pulses. The slight delay in the ideal, theoretical curve with RAP from p = cos(η(t)) 2 is mainly to the non-instantaneous transition time, which is taken into account in the simulation.
act as π pulses in the adiabatic basis.
We note that these fast changes do not compensate non-adiabatic couplings. The latter are usually ∼ ν ′ (t)σ y and commute with the Hamiltonian during the sudden change of the mixing angle. Additionally, ∆ν might differ from π/2. We use the relative phases of the RAP pulses as control parameters to compensate for such errors (see Supplemental Material at [42] for details). For example, they can correspond to the popular XY, KDD, or UR sequences [22,23,37,39]. These are based on composite pulses and were shown to improve population transfer and rephasing with imperfect RAP pulses [22,37,38,40].
Comparison of RAP sensing and sensing with rectangular pulses.-RAP sensing improves performance in comparison to standard pulsed sensing due to the greater bandwidth and robustness of RAP. Specifically, the contrast in sensing experiments with a Hahn echo is proportional to the transition probability p of the imperfect refocusing π pulse [5]. A rectangular pulse requires a peak Rabi frequency of Ω 0 ≫ ∆ inh to cover the full width of the inhomogeneous broadening. Specifically, its transi-tion probability error is ǫ rect ∼ ∆ 2 inh /Ω 2 0 (see Supplemental Material at [42] for details), where Ω 0 is the Rabi frequency, and ∆ inh is the detuning of the sensor qubit. The respective error for RAP depends on the particular pulse shape [28] but we can obtain an approximate estimate from the probability for non-adiabatic transitions (see Supplemental Material at [42] for details) where we used the sensing condition with chirped pulses T pulse ∼ π/ω s and R ∼ ∆ inh . Thus, the error in the transition probability is lowered by ∼ ω 2 s /Ω 2 0 in comparison to a rectangular pulse. As a result, the RAP sensing protocol would improve performance significantly when Ω 0 < ∆ inh and ω s ≪ Ω 0 . It is also less sensitive to variation in the effective pulse area, e.g., in case of Rabi frequency inhomogeneity.
We compare the performance of rectangular and RAP pulses by a numerical simulation for DD in a two-state system, subject to magnetic noise and power fluctuation of the driving field (see Supplemental Material at [42] for details). We use an Ornstein-Uhlenbeck process [44,45], where the parameters of the noise have the characteristics for typical experiments in NV centers, as described in [24,46]. We also assume an additional inhomogeneous broadening, leading to dephasing time of T * 2 ≈ 20 ns and a Hahn echo (with perfect instantaneous pulses) T 2 ≈ 13 µs (see Supplemental Material at [42]). We choose the RAP amplitude and detuning shapes as in the Allen-Eberly model [41,47,48] because of its preferable adiabaticity in comparison to the widely used Landau-Zener-Stckelberg-Majorana (LZSM) model for a pulse with a constant drive and a linear chirp [49] (see Supplemental Material at [42]). Figure 3 shows a simulation of evolution of the population in the |1 y state in the bare basis for sensing with sequences of rectangular and RAP pulses with the same peak Rabi frequency of Ω 0 = 2π 10 MHz. Both pulse types use the phases of the widely used XY8 sequence for additional error compensation. The simulation shows the population in the bare basis at times 2m(τ + T pulse ), m ∈ N when noise is (ideally) refocused and the effect of the dynamic phase is nullified with RAP-XY8. Due to the inhomogeneous broadening the contrast is lost quickly with the standard XY8, which has a T 2 ≈ 14 µs and is increased by more than two orders of magnitude to T 2 ≈ 1.7 ms with RAP-XY8. We use the standard definition of coherence time as the time when the population drops to P ≈ 0.68, which is 1/e the difference from 1 to the decoherence limit of equal population distribution. The remaining decay for RAP-XY8 is mainly due to high frequency components of the noise and imperfect adiabaticity. We note that the coherence time with RAP-XY8 approaches the population lifetime of an NV center, which can reach up to 6 ms [50] and is not taken into account in the simulation.
Discussion.-RAP sensing can be particularly useful in systems with large inhomogeneous broadening and driving field variation. Then, the robust RAP pulses improve the contrast as many more atoms are efficiently used as sensors. The frequency range of RAP sensing can be estimated as (see Supplemental Material at [42]) where the lower limit depends on the noise spectrum due to homogeneous broadening, described in this example by the Lorentzian S(ω) where τ is the correlation time of the environment and b is the bath coupling strength. The upper limit is limited by adiabaticity, which requires long pulses that cover the inhomogeneous broadening and is given here for the LZSM model. We note that the upper limit can increase significantly by using other pulse shapes or phased sequences of chirped pulses that improve the fidelity of the process, e.g., the XY8 sequence.
Conclusion.-We introduced theoretically the idea for sensing an AC field by sequences of phased RAP pulses. The signal has a frequency at half the repetition rate of the pulses and can be applied to sensor qubits with large variation in field amplitudes and transition frequencies, e.g., due to inhomogeneous broadening. The RAP sequences act as a double filter for DD, where the population transfer due to the change of the mixing angle during a pulse rectifies the signal and partially removes frequency noise. The sudden changes in the mixing angle between the pulses act as fast π pulses in the adiabatic basis and compensate frequency and amplitude noise as long as they are faster than the noise correlation time. We also combined RAP pulses with phased DD sequences, e.g., XY8, which increase robustness to other systematic errors, e.g., due to non-adiabatic couplings. We showed that RAP-XY8 significantly outperforms the standard XY8 sequence with rectangular pulses in a realistic simulation for NV centers with large inhomogeneous broadening. It increased the coherence time by more than two orders of magnitude and improved contrast in comparison to standard XY8, allowing for improved sensing. The robustness and flexibility of the technique make it applicable for a wide range of experimental platforms, e.g. NV ensembles, NVs in nanodiamonds in living cells, rare-earth doped solids, trapped ions. We provide a description of rapid adiabatic passage (RAP) in this section. A detailed review can be found in [28]. We consider a two-state quantum system with an (angular) transition frequency ω 0 (t) subject to a control field with a time-dependent carrier frequency ω(t), where we have assumed that the transition frequency ω 0 (t) = ω 0 + ∆ ǫ (t) might vary by ∆ ǫ (t) from its expected value ω 0 , e.g., due to inhomogeneous broadening or magnetic field fluctuations. The evolution of the system without a sensed field is governed by the Hamiltonian ( = 1) where Ω(t) = µ B(t) is the Rabi frequency, which depends on the dipole moment µ and the envelope of the applied control field B(t). The actual Rabi frequency can also be presented as where Ω(t) is the target Rabi frequency we want to apply and ǫ Ω (t) is an error term, e.g., due to amplitude fluctuations and/or inhomogeneity. Additionally, φ is the initial phase of the control field at the time t 0 at the beginning of the interaction, σ x and σ z are the respective Pauli matrices. Usually only the relative changes of φ are important. The angular frequency of the control field can also be presented in terms of its detuning ∆(t) from the expected transition frequency of the atom as ω(t) ≡ ω 0 + ∆(t), so the Hamiltonian takes the form where δ(t) ≡ t t0 ∆(t ′ )dt ′ is an accumulated phase due to the detuning ∆(t), Ω(t) ≡ Ω(t)(1 + ǫ Ω (t)) is the actual Rabi frequency of the driving field, and we took φ = 0 without loss of generality.
It is advantageous to move to the rotating frame with respect to ω(t)σ z /2 and apply the rotating-wave approximation (| Ω(t)| ≪ ω(t)) to obtain the Hamiltonian is the actual detuning, experienced by a sensor atom, which depends on the detuning ∆(t) of the driving field from ω 0 and the variation of the actual transition frequency of the atom ∆ ǫ (t) from ω 0 . We will use this Hamiltonian further on in the analysis and will call the quantum states in this basis the bare states.

The adiabatic basis
It proves useful to consider the evolution of the system in the adiabatic (dressed) basis by making an- T are the probability amplitudes of the adiabatic states and c(t) = [c 1 (t), c 2 (t)] T are the probability amplitudes of the bare states [27] One can show the mixing angle can also be expressed by the standard ν(t) = (1/2) arctan [ Ω(t)/ ∆(t)] but the definition in Eq. (A4) is more direct. Then, the Hamiltonian in the adiabatic basis becomes 2 are the eigenenergies of the adiabatic states and ν ′ (t) is the non-adiabatic coupling. When ν(t) changes very slowly, i.e., where the effective Rabi frequency Ω eff (t) ≡ Ω(t) 2 + ∆(t) 2 , we can neglect the effect of the non-adiabatic couplings, so the evolution becomes adiabatic and the Hamiltonian takes the form As the adiabatic Hamiltonian is diagonal, there will be no population changes in the adiabatic basis, i.e., the populations will stay constant with time and the quantum state will only accumulate a phase. We note that the effective Rabi frequency includes noisy terms which would in general cause dephasing in the adiabatic basis. However, we will show later that these can be compensated when we apply sequences of chirped adiabatic pulses.

Mechanism of Rapid Adiabatic Passage
Usually, our quantum system is initially prepared (e.g., by optical pumping) with all the population in the bare state |1 , i.e., P 1 (t 0 ) = 1, P 2 (t 0 ) = 0 at the initial time t 0 . for the respective values of ∆ǫ(t). The population transfer efficiency is very robust to detuning errors even though they are greater than the peak Rabi frequency but the flip of the quantum state happens at different times for each value of ∆ǫ(t), i.e., the transfer process is centered at the time when the respective mixing angle is ν(t) = π/4. If our goal is to transfer all the population from state |1 to state |2 , i.e., P 1 (t 1 ) = 0, P 2 (t 1 ) = 1 at time t 1 at the end of the interaction. We note that the relation between the populations of the two states and the probability amplitudes in the bare basis are given by P n (t) = |c n (t)| 2 .
In order to demonstrate the mechanism for rapid adiabatic passage, we consider the composition of the probability amplitudes of the adiabatic states in terms of the ones of the bare states: We apply an adiabatic chirped pulse from time t 0 to time t 1 where the detuning changes adiabatically from a very large negative to a very large positive value, such that It is evident that initially all the population is in state |+ in the dressed basis as it is aligned with state |1 , i.e., P 1 (t 0 ) = P + (t 0 ) = 1. As the evolution is adiabatic, the adiabatic Hamiltonian H ad (t) is diagonal, so there will be no transitions between the dressed states and their populations stay constant, so P + (t 1 ) = P + (t 0 ). However, the mixing angle ν changes from π/2 to 0 (see Fig. 4). As a result, the dressed state |+ is aligned with the state |2 at the final time t 1 . Thus, P 2 (t 1 ) = P + (t 1 ) = P + (t 0 ) = P 1 (t 0 ) = 1 and all the population is transferred adiabatically from state |1 to state |2 . We note that the chirp direction is not important for the population transfer, i.e., the mixing angle can also change from 0 to π/2 -then the population transfer will take place via the dressed state |− instead of |+ if the system is initially in state |1 . It is evident that as the evolution is adiabatic, the population transfer efficiency will depend only on the initial and final values of the mixing angle and will be quite robust to amplitude and frequency fluctuations. Figure 4 shows an example for adiabatic passage with a chirped pulse for three different detuning errors ∆ ǫ (t). It is evident that the population transfer efficiency is very robust to such errors even though they are greater than the peak Rabi frequency. However, the times when the flip of the quantum state takes place differ for each value of ∆ ǫ (t). Specifically, the transfer process is centered at the time when the respective mixing angle is ν(t) = π/4.
One can obtain additional intuition about RAP by considering the time evolution of the energies of the adiabatic and bare states. The time evolution in the adiabatic basis leads to an avoided crossing, where the adiabatic eigenen- with the minimum separation at the point when ∆( t) = 0 but cannot cross due to the interaction ( Ω( t) = 0, see Fig.  2 in the main text). Meanwhile, the bare basis energies ± ∆(t) cross at a particular time t = t, which leads to the population transfer as the mixing angle ν(t) changes from π/2 to 0. We note that adiabatic evolution is not a sufficient condition for population transfer. For example, if no crossing of the bare energies occur, the mixing angle will start at π/2 and make a return to π/2 at the end of the interaction, so we will observe a complete population return instead of complete population transfer [28].

Propagator of a RAP pulse
When our goal is not simply to flip the population of the bare states, it proves useful to derive explicitly the propagator or a chirped adiabatic pulse. We consider the evolution of the system from a starting time t 0 to a later time t. In the approximation of perfect adiabaticity it is described by the propagator in the adiabatic basis The propagator in the bare basis then takes the form where ν r ≡ ν(t) − ν(t 0 ) and ν s ≡ ν(t) + ν(t 0 ). For example, when the evolution is perfectly adiabatic the transition probability, i.e., the probability that the qubit will be transferred to state |2 if it was initially in state |1 in the bare basis, takes the form Assuming that we apply an adiabatic chirped pulse from time t 0 to time t where the detuning changes from a very large negative ( ν(t 0 ) = π/2) to a very large positive value ( ν(t) = 0), the propagator in the bare basis becomes and the transition probability is p = 1. In comparison, the propagator of a perfect resonant π pulse around the x axis of the Bloch sphere is U π = −iσ x . It is evident that the propagator of the perfect RAP pulse performs perfect population inversion of the bare states like a perfect π resonant pulse but adds an additional phase rotation by the generally unknown (varying) dynamic phase Φ + π in the xy plane of the Bloch sphere of the qubit.

Conditions for Rapid Adiabatic Passage
There are two main conditions for RAP and we will discuss them separately. First, the evolution should be adiabatic, so no transitions take place in the adiabatic basis. Second, the mixing angle ν(t) should change from π/2 to 0 (or vice versa).

a. Adiabatic condition
The first requirement is that the non-adiabatic coupling is much smaller than the energy separation between the adiabatic states, so no transitions occur which can be simplified to [28] ˙ The exact formula for this condition depends on the specific time-dependence of Ω(t) and ∆(t). Usually, adiabaticity is worst at the moment of level crossing of the bare energies, i.e., when ∆(t c ) = 0, so it is determined by the element Ω(t)˙ ∆(t) in the numerator in Eq. (A16). We note that when the chirp range is small (but nonzero), e.g., of the order of the peak Rabi frequency, the element˙ Ω(t) ∆(t) can become significant for certain pulse shapes. However, we are usually be interested in the case of smooth pulses when peak Rabi frequency is too weak to cover the inhomogeneous broadening, which requires a large chirp range. Then, Ω(t)˙ ∆(t) is dominant and the condition simplifies to or equivalently to the so called lower boundary adiabatic condition where˙ ∆(t c ) is the chirp rate at the time t c of the crossing of the bare states energies (∆(t c ) = 0). Figure 5 includes an example for the lower boundary condition, which shows that even moderate levels of the order of 3.3 are enough to reach transition probabilities of the order of 0.9. As the chirp rate is usually bounded by the chirp range, given a fixed pulse duration, this requirement imposes a condition for a maximum chirp range.

b. Condition for mixing angle evolution
The second condition for population transfer requires that the mixing angle ν(t) changes from π/2 to 0 (or vice versa), which in turn imposes a condition on a minimum chirp range. In case of perfect adiabaticity, it can be shown that the transition probability in Eq. (A13) can also be presented as [28] This expression can be simplified further if we assume that the magnitude of the Rabi frequency at the beginning and the end of the interaction is much smaller than the detuning and thus than the effective Rabi frequency, i.e., Ω(t k ) ≪ Ω eff (t k ), k = 0, 1. Then, we can neglect the fast-oscillating last term and obtain where we assumed in the last equality that the Rabi frequency is a symmetric function with respect to the center of the pulse, i.e. Ω(t 1 ) ≈ ∆(t 0 ), and the detuning is an anti-symmetric function, so ∆(t 1 ) ≈ − ∆(t 0 ). This is a feasible assumption if the magnitude of target detuning |∆(t)| ≫ |∆ ǫ | at the beginning and the end of the interaction. Thus, we obtain where R ≈ ∆(t 1 ) − ∆(t 0 ) ≈ 2| ∆(t 1 )| is the magnitude of the target chirp range. It is evident that perfect population transfer requres that the ratio R/ Ω(t 1 ) ≫ 1. If we require the error in the population transfer efficiency ǫ ≡ 1 − p ≤ ǫ max , the condition becomes where ǫ max is the maximum error in the transfer efficiency, which we assumed to be ǫ ≤ 1/2 by requiring that the initial and final detunings have opposite signs. For example, an error in the population transfer efficiency of ǫ ≤ 0.1 requires R/ Ω(t 1 ) ≥ 4, while ǫ ≤ 0.01 implies R/ Ω(t 1 ) ≥ 14.
We note that the condition ∆(t 1 ) ≈ − ∆(t 0 ) might not be satisfied in systems with large inhomogeneous broadening and the chirp range requirement needs to be modified to cover the shift in the initial and final detuning. If ∆(t 0 ) = −(R/2) + ∆ ǫ and ∆(t 1 ) = (R/2) + ∆ ǫ , we obtain where x ≡ 2∆ ǫ /R and y ≡ 2 Ω(t 1 )/R and we assumed that Ω(t 0 ) = Ω(t 1 ). We require ∆ ǫ < R/2 in order for the detuning ∆ ǫ to lie within the chirp range, which implies x < 1. Usually, the Rabi frequency is much smaller than the detuning at the beginning and the end or the pulse, so in the approximation y → 0 the error in the transition probability becomes This implies that for ǫ ≤ ǫ max , we require R The formula converges to the one in Eq. (A22) when x = 0 and in the limit ǫ max → 0. For example, when ∆ ǫ /R = 0.25, i.e., x = 0.5, the error ǫ ≤ 0.01 implies R/ Ω(t 1 ) ≥ 21.1, which is higher than the value of 14 in the noiseless case. Thus, in the presence of detuning errors, we require a larger ratio of R/ Ω(t 1 ) to reach the same transfer efficiency. In summary, the adiabatic condition requires a small chirp rate (and thus a small chirp range) while the condition that the mixing angle ν(t) changes from π/2 to 0 (or vice versa) requires a large chirp range. Next, we show an example for RAP conditions for the pulse shape of the Allen-Eberly model [41,47], which we use in the manuscript.

Example: Allen-Eberly model
We describe the conditions for RAP for the Allen-Eberly (AE) model [41,47], which is characterised by a Rabi frequency and a detuning with the following shapes (see Fig. 2 (top) in the main text) where T is a characteristic time of the RAP pulse and T pulse is the RAP pulse duration and we dropped the noisy terms for simplicity of presentation and assumed that the pulse is centered at time t c = 0.
The lower boundary adiabatic condition for this model simplifies to where t c is the moment of level crossing (∆(t c ) = 0). Equivalently, this criterion can be given in terms of the target chirp range R = 2∆ 0 : We note that when the RAP pulse duration T pulse → ∞, the pulse area A = T pulse /2 −T pulse /2 Ω(t)dt = πΩ 0 T , so the ratio between the maximum chirp range and the peak Rabi frequency is simplified to R/Ω 0 ≪ 2A/π. Another important advantage of the AE model in comparison to the standard Landau-Zener-Stckelberg-Majorana model with a constant drive and a linear chirp [49] is that the pulse area (and thus the energy input into the system) is limited, no matter how long is the pulse duration T pulse .
Next, we consider the condition for mixing angle evolution for this model. First, we note that the actual chirp range is given by ∆(T pulse /2) − ∆(−T pulse /2) = R tanh (T pulse /2T ) and approaches the target chirp range only when (T pulse /T → ∞). We note that this is not very restrictive but one needs an interaction time of several times T to ensure that the actual chirp range is similar to the maximum one and there is negligible truncation of the Rabi frequency function. For example, the truncation is quite small for T pulse /T = 10 when Ω(T pulse /2) ≈ 0.013Ω 0 and the actual chirp range is ≈ 0.9999R. The condition for mixing angle evolution is then given in Eq. (A22) and takes the form An example of the relevance of the mixing angle condition as a lower boundary of the chirp range is given in Fig.  5(a). Then, both conditions can be summarized to obtain the following double inequality for the ratio between the target chirp range and the peak Rabi frequency Thus, RAP requires a minimum ratio of the chirp range and the peak Rabi frequency (R/Ω 0 ) to ensure sufficient change in the mixing angle to ensure a transition probability error no greater than ǫ max (left inequality). Additionally, the ratio (R/Ω 0 ) should be much smaller than the pulse area A to ensure adiabaticity (right inequality). The relevance of both conditions is demonstrated in Fig.  5(a), where the region of high transition probability lies between the white solid lines that describe them. We note that this model requires a smaller ratio between the maximum chirp range and the peak Rabi frequency than the standard Landau-Zener-Stckelberg-Majorana model with a constant drive. This, in turn, leads to lower requirements for pulse area (and energy input) although the interaction time T can be kept the same.
Next, we note that this particular model can be solved analytically in the limit when T pulse /T → ∞ even without assuming adiabaticity, giving the transfer efficiency [48] p Finally, we discuss briefly the case when an additional detuning error is present, e.g., due to inhomogeneous broadening. Then, ∆(t) = ∆ ǫ + ∆(t) and the dynamics are more complex. Then, the time of the level crossing is shifted by T arctan (−2∆ ǫ /R) in comparison to the noiseless case due to the detuning error (see Fig. 4). The lower boundary adiabaticity condition and, thus, the right inequality in Eq. (A31), is not affected by this shift for the AE model since the ratio Ω(t) 2 /∆(t) = 2Ω 2 0 T /R is independent of t, i.e., the moment of the level crossing (see Fig. 5). We note that this would usually not the case for other pulse shapes.
However, we need to modify the requred chirp range in accordance to Eq. (A25) and obtain (A33) where x = 2∆ ǫ /(R tanh (T pulse /2T )). In other words, one has to apply a slightly longer pulse or increase the chirp range to reach the same transfer efficiency as in the noiseless case.
We note that the particular model with additional static detuning, such that ∆(t) = ∆ ǫ + ∆ 0 tanh (t/T ) can be solved analytically in the limit when T pulse /T → ∞ even without assuming adiabaticity. It is then termed Demkov-Kunike model and the transfer efficiency is [48] p

RAP transition time
We discuss now the transition time in RAP, i.e., this is the characteristic time, which describes the duration of the population transfer from state |1 to state |2 in RAP. We use a definition of transition time, which was proposed previously by Boradjiev et. al. [43] in the context of stimulated Raman adiabatic passage. The transition time is defined as where t c is the time when the detuning ∆(t) crosses resonance and the mixing angle becomes ν(t c ) = π/4. The transition time is inversely proportional to the nonadiabatic coupling at the moment of level-crossing in the bare basis and depends on the specific model for RAP. In case of the Allen-Eberly model [41] in Eq. (F2), the transition time takes the form where Ω 0 is the peak Rabi frequency, reached at time t c of the level-crossing in the bare basis, R is the maximum chirp range, and we assumed no noise. In the presence of noise, e.g., due to inhomogeneous broadening, we observe a shift in the detuning to ∆(t) = ∆ ǫ + ∆(t), which changes the moment when the ∆(t) crosses resonance. Then, the Rabi frequency can be lower than its peak value and the derivative of ∆(t) can also differ, which modifies the transition time. For the example model in Eq. (F2), which we use in our work, the moment of resonance crossing is shifted by T arctan (−2∆ ǫ /R) in comparison to the noiseless case and the modified transition time becomes The transition probabilities at times t c ± mT tr /2 can be calculated exactly for this model and are given by where m ≥ 0. The lower bound of the transition probability is achieved for k → 0, i.e., infinitely large chirp range with respect to the peak Rabi frequency, and takes the form Thus, the lower bound of the transition probability for m = 1, i.e., at time t c + T tr /2, is p min = (2 + √ 2)/4 ≈ 0.854, while for m = 2: p min = 1/2 + 1/ √ 5 ≈ 0.947.
We consider sequences of RAP pulses in this section. First, we note that the dynamic phase Φ of a RAP pulse can be compensated completely when we apply two RAP pulses, as long as it is the same during the first and the second pulses and they perform perfect population inversion. Then, the propagator in the bare basis is U RAP U RAP = −σ 0 , where σ 0 is the identity matrix, which is independent from Φ.
It proves useful to consider the compensation mechanism by analyzing the evolution in the adiabatic basis when we apply two RAP pulses. During the first RAP pulse from time t 0 to time t 1 the Hamiltonian in the adiabatic basis is given by Eq. (A5). We then assume for simplicity that there is no pulse separation between the RAP pulses. Then, at the start of the second RAP pulse, we need to apply a very fast, (approximately) instantaneous change in the sign of the target detuning from ∆(t) → −∆(t). This leads to a sudden change in the mixing angle from 0 to π/2, i.e., ∆ ν = π/2. The Hamiltonian in the adiabatic basis during this change is dominated by the non-adiabatic coupling and is given by H ad (t) ≈ ν ′ (t)σ y , where ν ′ (t) has an (approximately) delta function behavior and its integral is the change in the mixing angle ∆ ν = π/2. Thus, the evolution in the adiabatic basis in the infinitesimal time between the two RAP pulses is given by the propagator exp (−i∆ νσ y ) = −iσ y . Thus, the adiabatic states are interchanged. It is evident that the sudden change in the mixing angle plays the role of a π pulse around the y axis in the adiabatic basis. As a result, the phase evolution during the second RAP pulse compensates the one during the first RAP pulse, as long as the accumulated dynamic phase is the same during both RAP pulses.
We can incorporate the transitions due to the sudden changes of the mixing angle in the basis itself. Thus, we can define a new basis, which we term "adiabatic, toggling" basis. The transformation matrix from the adiabatic to the "adiabatic, toggling" basis for times during the k-th RAP pulse is given by where t k−1 is the beginning and t k is the end of the k-th RAP pulse. The Hamiltonian in the "adiabatic, toggling" basis in the adiabatic approximation then takes the form where f (t) = −1 during the odd-numbered RAP pulses and f (t) = 1 during the even-numbered ones, and we assumed that ∆ ν = π/2 between two RAP pulses. Thus, the accumulated dynamic phase, including the effect of the frequency and amplitude noise, is compensated during every second RAP pulse as long as it is the same as in the previous pulse, i.e., the correlation time of the noise is long in comparison to the duration of two RAP pulses.

Phased sequences of RAP pulses
Perfect RAP pulses are difficult to achieve in real experimental realizations because the adiabaticity condition is hard to fulfill and/or the mixing angle might take a very long time to change from ν(t 0 ) = π/2 to ν(t 1 ) = 0 during a single RAP pulse. In order to compensate these errors we will use the relative phases of the RAP pulses φ k as additional control parameters and apply robust sequences of pulses. For example, we can choose the phases of the individual RAP pulses to correspond to the popular XY, KDD, or UR sequences [22,23,37,39]. These are based on composite pulses, which have been shown to improve the efficiency of population transfer and rephasing with imperfect RAP pulses [22,37,38,40].
The propagator of a pulse (not necessarily RAP) in the bare basis can be parameterized by [22,39,40] where p ≡ 1 − ǫ is the transition probability, i.e., the probability that the qubit will be transferred to state |2 if it was initially in state |1 , ǫ ∈ [0, 1] is the unknown error in the transition probability, α and β are unknown phases. For example, when the evolution is perfectly adiabatic the transition probability is given by Eq. (A13). In case of a perfect RAP pulse, the transition probability becomes p = 1 and ǫ = 0. However, this is often not the case, e.g., due to imperfect adiabaticity or insufficient change in the mixing angle during a RAP pulse. If the pulses are time separated, the propagator of the whole cycle [ free evolution for time τ /2−pulse− free evolution for time τ /2 ] changes by taking α → α = α+∆ ǫ τ , where we assumed that the detuning variation ∆ ǫ is constant during one [τ /2 − pulse − τ /2] period. Additionally, a shift in the phase φ k at the beginning of a pulse (see Eq. (A1)) causes β → β + φ k [22,39]. Thus, the propagator of the k-th pulse in the bare basis takes the form Assuming coherent evolution during a sequence of n pulses with different initial phases φ k , the propagator of the composite sequence then becomes and the phases φ k of the individual pulses can be used as control parameters to achieve a robust performance. We can evaluate the latter by considering the fidelity [22,23] where U (n) 0 is the propagator of the respective pulse sequence when ǫ = 0, i.e., when the pulse performs a perfect population inversion. For example, the fidelity of a single pulse is given by F = √ 1 − ǫ. We note that this measure of fidelity does not take into account variation in the phase β, which is important when we apply an odd number of pulses. However, the latter is fully compensated when we apply an even number of pulses with perfect transition probability. Thus, we use the fidelity measure in Eq. (B6) as it usually provides a simple and sufficient measure of performance when we apply an even number of pulses. We can obtain the fidelity of a sequence of eight pulses with zero phases, i.e., φ k = 0, which is given by Additionally, the fidelity of the widely used XY8 sequence [23] with phases (0, 1, 0, 1, 1, 0, 1, 0) π/2 is Usually the transition probability error is quite small, i.e., ǫ → 0, so the error in the fidelity (1 − F ) of the XY8 sequence (∼ ǫ 3 ) will be much smaller than the one of the sequence with constant zero phases (∼ ǫ). Similarly, one can show that we can obtain a robust performance and even better fidelity with other sequences of phased pulses, e.g., by using the KDD or UR sequences [22,23,39] We note that we made no assumption of the pulse shape and detuning time dependence during this analysis, except for the RWA to obtain the Hamiltonian in Eq. (F1), coherent evolution, and the assumption that effect of the pulse and free evolution before and after the pulse on the qubit is the same during each pulse (except for the effect of the phase φ k ). Thus, the analysis is applicable for sequences of RAP pulses [40]. We note that when the detuning ∆(t) is an antisymmetric function of time with respect to the center of a RAP pulse (e.g., when ∆ ǫ = 0), the phase α = 0, which allows for additional simplification, as used in [37].
f (t) = −1 during the whole interaction and the modulation function will be given by f (t) = − cos (2 ν(t)). Then, the Hamiltonian in the interaction, toggling basis takes the form H int,tog,s (t) = cos (2 ν(t))g cos (ω s t + ξ)σ z , If the mixing angle ν(t) stays constant, e.g., if we apply a driving field with a constant Rabi frequency and detuning, the effect of the sensed signal will be cancelled. We note that one can do AC sensing with a simple continuous drive but this requires ω s = Ω eff (t) [24][25][26] and we consider the case when ω s ≪ Ω eff (t) in this work. However, if the mixing angle 2 ν(t) changes with a rate, which corresponds to π/ω s , we will be able to sense the signal. For example, a maximum contrast is achieved when the modulation function cos (2 ν(t)) changes its sign at the time when cos (ω s t + ξ) does this (see Fig. 1 in the main text). If the RAP transition time is very short, i.e., T tr ≪ π/ω s , where T tr = 2 Ω(t c )/ ∆ ′ (t c ) (see Appendix, sec. A 7) and t c is the time of level crossing in the bare basis, the modulation function can be considered approximately equal to a step function. Then, the Hamiltonian in Eq. (C8) can be approximated by where we assumed that ξ = 0 for maximum contrast and ν(t 0 ) = π/2 without loss of generality. As a result of the signal, the sensing qubit will accumulate a phase 2η(t) in the interaction, toggling basis similarly to standard pulsed DD with instantaneous resonant π pulses. The phase is proportional to g and takes the form (we assume g ≪ ω s ) and the effective propagator in this basis is Thus, the sensing qubit accumulates a phase and performs Ramsey oscillations in this basis, similarly to standard pulsed DD. However, we note that this method for adiabatic sensing is not optimally robust. For example, if we apply a field with a constant drive and change the target detuning ∆(t) adiabatically from positive to negative and vice versa at a rate π/ω s , the method will suffer from noise in the effective Rabi frequency Ω eff (t), which defines the basis of the Hamiltonian in Eq. (C8). This can be seen directly if one considers the effective propagator in the adiabatic basis, which takes the form where the phase Φ(t) = t t0 Ω eff (t ′ )dt ′ depends on noise terms, which will cause the dephasing. We note that the change of the mixing angle reduces the effect of this noise partially. Specifically, if assume that the frequency noise is characterized by ∆ ǫ (t) = ∆ ǫ > 0 and the target detuning ∆(t) changes from a very low negative value to a very high positive one, we can obtain ∆(t) = ∆(t)− ∆ ǫ (t) and the effective Rabi frequency Ω eff (t) = ∆(t) 2 + Ω(t) 2 during a RAP pulse by Thus, the detuning noise due to ∆ ǫ can be compensated if the time period when ν(t) → π/2 is equal to the one when ν(t) → 0. However, the accumulated phase Φ(t) remains susceptible to amplitude noise and higher order frequency noise terms when the mixing angle is changing. Additionally, even in the noiseless case, the dynamic phase due to ∆(t) and Ω(t) is not zero and should be taken into account when performing measurements in the bare basis.

Sensing by sequences of RAP pulses
We consider now an improved protocol when we apply sequences of RAP pulses for sensing. Then, the sudden changes in the mixing angle between RAP pulses cause flips of the states in the adiabatic basis, which nullify the dynamic phase and its noise as long as the they occur frequently enough. We consider again the Hamiltonian in the interaction, toggling basis, as defined in Eq. (C6).
where the modulation function f (t) = f (t) cos (2 ν(t)). We note that we assume that ν(t)) changes adiabatically from π/2 to 0 during every RAP pulse and then instantaneously from 0 to π/2 between the pulses (or vice versa for both changes). We already noted that f (t) is not affected by sudden changes in the mixing angle when ∆ν = ±π/2. Thus, the modulation function of the sensed field will be the same as in the case of adiabatic evolution without such changes. Then, if a RAP pulse duration corresponds to π/ω s , we will again be able to sense the signal. Similarly to the case of adiabatic evolution sensing, a maximum contrast is achieved when the modulation function f (t) changes its sign at the time when cos (ω s t + ξ) does this (see Fig. 1 in the main text). The main difference from continuous RAP sensing is that the interaction, toggling basis itself is much more robust to frequency and amplitude noise as it is defined with respect to f (t)Ω eff (t) and f (t) changes its sign during every subsequent RAP pulse. Explicitly, the effective propagator in the adiabatic basis takes the form It is evident that Φ c (t) = 0 and the accumulated dynamic phase, including the effect of the frequency and amplitude noise, is compensated after every second RAP pulse as long as the correlation time of the noise is long in comparison to the duration of two RAP pulses. Furthermore, the phase evolution in the adiabatic, toggling basis can then be observed stroboscopically directly in the bare basis after every second RAP pulse. We note that as the instantaneous changes in the mixing angle do not affect the modulation function f (t) (but only f (t)), the RAP pulses can also be truncated and separated by free evolution time τ (see Fig. 1 in the main text). Then, the sensing condition becomes T pulse + τ = π/ω s . However, unless experimental limitations require such truncation, it is usually beneficial to use longer RAP pulses and τ = 0 as this improves adiabaticity.
Finally, we note that while the instantaneous changes in the mixing angle play the role of instantaneous π pulses around the y axis in the adiabatic basis, they do not compensate errors due to non-adiabatic couplings. The reason is that the Hamiltonian term due to the latter is proportional to ∼ ν ′ (t)σ y and commutes with the Hamiltonian during the sudden change of the mixing angle. Additionally, the changes in the mixing angle during/between RAP pulses might differ from π/2. In order to compensate for these imperfections, we apply phased sequences of RAP pulses and use their relative phases additional control parameters to improve the fidelity of the process, as discussed in sec. B 2.
Appendix D: Detailed comparison of RAP sensing and sensing with rectangular pulses Sensing by sequences of RAP pulses allows to obtain an improved contrast in comparison to sensing with rectangular π pulses. This is due to the greater bandwidth and robustness to amplitude errors of the RAP, e.g., for systems with large inhomogeneous broadening. Specifically, it can be shown that the obtained contrast in sensing experiments with a Hahn echo with an imperfect pulse is proportional to the transition probability ∼ p of the latter [5]. The relation is more complicated with longer phased sequences, e.g., XY8 (see Appendix, sec. B), but higher p in general leads to improved contrast and coherence times.
Standard rectangular π pulses require a peak Rabi frequency of Ω 0 ≫ ∆ inh in order to have sufficient bandwidth to cover the full width of the inhomogeneous broadening. Specifically, the error in the transition probability is given by where Ω 0 is the Rabi frequency, T pulse is the pulse duration, ∆ inh is the detuning of the applied field from the frequency of the sensor qubit, e.g., due to inhomogeneous broadening. Finally, Ω eff = Ω 2 0 + ∆ 2 inh is the effective Rabi frequency, with the last approximations valid for small detunings. One can see that the error in the transition probability with rectangular pulses can be significant when ∆ inh is large in comparison to Ω 0 or in case of variation of the Rabi frequency, so that the effective pulse area Ω eff T pulse = π.
RAP pulses are robust to frequency and amplitude variation and their transition probability depends on the particular pulse shape and time dependence of the detuning [28]. One can obtain an approximate estimate of the transition probability error by considering the probability for non-adiabatic transitions if we assume that the mixing angle changes from π/2 to 0 during a pulse. The transition probability in the adiabatic basis is determined from the Hamiltonian in Eq. (A5) and can be approximated by where t c is the time of the level crossing, and the second equality is valid for the Allen-Eberly (AE) model (see below) with R -the target chirp range, T ∼ T pulsethe characteristic time of the chirped pulse. As another example, in the case of widely used pulse with a constant Rabi frequency and a linear chirp i.e., the standard Landau-Zener-Stckelberg-Majorana (LZSM) [49], the error in the transition probability in the limit of very long pulse duration is given by ǫ RAP = exp − πΩ 2 0 T pulse 2R [48] and we again obtain a dependence on the parameter R/(Ω 2 0 T pulse ). The sensing condition with chirped pulses requires T pulse ∼ π/ω s and R ∼ ∆ inh in order for the chirp range to cover the inhomogeneous broadening, so one can obtain Thus, the error in the transition probability is lowered by ∼ ω 2 s /Ω 2 0 . As a result, the RAP sensing protocol would improve performance significantly in comparison to rectangular pulses when Ω 0 < ∆ inh and ω s ≪ Ω 0 . It is also less sensitive to variation in the effective pulse area in comparison to the rectangular pulses, so it would also be applicable in the case of Rabi frequency inhomogeneity.
Next, we discuss the AC signal frequency range, which can be sensed with RAP pulses. The latter are typically longer than the standard rectangular pulses, so they are preferable for sensing of low frequency AC signals. The upper limit of the sensed frequency can be determined from the estimated error in the transition probability, e.g., of the LZSM model ǫ RAP = exp − πΩ 2 0 T pulse 2R ≪ 1 [48], which requires where we used that ω s = π/T pulse . We note that this limit can increase significantly by using other pulse shapes or phased sequences of chirped pulses that improve the fidelity of the process, e.g.,the fidelity error of the XY8 sequence with chirped pulses is ∼ ǫ 3 RAP ≪ ǫ RAP (see Appendix, sec. B).
The lower limit of the sensed frequency is determined by the T 2 time of DD with ideal, instantaneous π pulses with a pulse separation π/ω s , e.g., due to homogeneous broadening. For example, if we assume that the homogeneous broadening noise spectrum is given by the Lorentzian S(ω) = b 2 π 1/ τ (1/ τ ) 2 +ω 2 , where τ is the correlation time of the environment and b is the bath coupling strength (see Appendix, sec. F), the decay of the signal after a single pulse can be approximated by Thus, the sensing frequency range of RAP sequences is determined by the repetition rate of the RAP pulses. As they are typically long to ensure adiabaticity, the resulting slower repetition rate (in comparison to rectangular pulses) makes the protocol sensitive to high frequency noise. Additionally, when the condition that the RAP transition time T tr ≪ ω s /π is not fulfilled, there can be a slight shift in the amplitude of the detected AC field but it is straightforward to be taken into account. Finally, when the inhomogeneous broadening is large, the transitions of the different sensor atoms happen at different times, i.e., not at the moment when the sensed field is zero, which can lead to a slightly lower contrast.
We also note that in some cases the amplitude and frequency inhomogeneities can also affect the preparation and readout efficiency of the sensing protocol, e.g., leading to a lower contrast. For example, π/2 rectangular pulses are typically applied to prepare the system in the |1 x,y state and read it out after the sensing experiment. However, one cannot prepare efficiently all atoms when the inhomogeneous broadening is much greater than the bandwidth of the simple π/2 pulse. One way to address this problem is to use adiabatic half passage pulses for preparation and readout (see Appendix, section E for details). Various other techniques can also be applied to improve the preparation and readout efficiency even further, e.g., robust composite π/2 pulses [34], adiabatic robust pulses [29,30], single-shot shaped pulses [51,52], pulses designed by optimal control [53][54][55][56][57][58].
Adiabaticity requirements can be relaxed by the application of phased RAP pulses, similarly to the ones used in this work. Furthermore, the pulse repetition rate is usually determined by the sensed (Larmor) frequency, which cannot be increased in some cases. Finally, the variation in transition times for the different sensor atoms can be used to design more complex filter functions for sensing and dynamical decoupling. Thus, sensing with phased RAP pulses can provide significant advantages in a broad range of applications.
Appendix E: Robust preparation and readout As noted in the main text, applying RAP pulses for sensing increases significantly the contrast and coherence time in systems with large driving field variation and inhomogeneous broadening. In some cases, these inhomogeneities can also affect the preparation and readout efficiency of the sensing protocol. For example, a simple π/2 pulse cannot prepare efficiently all atoms in an ensemble when the inhomogeneous broadening is much greater than the pulse bandwidth.
Various techniques can be applied to improve the efficiency and robustness of preparation and readout, e.g., one can apply robust composite π/2 pulses [34], adiabatic robust pulses [30], single-shot shaped pulses [51,52], pulses designed by optimal control [53][54][55][56][57][58]. Figure 7 shows an example for sensing with RAP pulses with a robust preparation and readout where we replace the simple π/2 pulses in the standard sensing scheme with adiabatic half passage pulses (half-RAP) pulses. We note that although the preparation and readout efficiency is better with half-RAP than with rectangular pulses, it still reduces contrast slightly in comparison to the case with perfect preparation and readout in Fig. 3 in the main text. This is expected from theory as the inhomogeneous broadening is much larger than the Rabi frequency, so not all atoms are prepared in equal coherent superposition states. Nevertheless, the RAP-XY8 scheme has both better contrast and longer coherence times than the standard XY-8 sensing with rectangular pulses. We note that the preparation and readout protocol can be improved further, e.g., by some of the techniques mentioned above, but this goes beyond the scope of this work.

Appendix F: Numerical Simulation
In order to compare sensing with rectangular and RAP pulses, we perform a numerical simulation. The results from the latter are shown in Fig. 3 in the main text and compare the performance of the XY8 and RAP-XY8 protocols in a realistic conditions for sensing in NV centers with large inhomogeneous broadening. Specifically, we apply dynamical decoupling by sequences of phased RAP pulses in a two-state system with a Hamiltonian in standard Landau-Zener-Stckelberg-Majorana model with a constant drive and a linear chirp [49]. We choose the AE model due to its excellent adiabaticity with respect to peak Rabi frequency and chirp range (see Appendix, sec. A 6), allowing for high flexibility of applications.
Then, we calculate numerically the propagator for the particular noise realisation of ∆ ǫ (t)and ǫ Ω (t) and the chosen DD sequence. We use a time-discretization with a time step of 0.1 ns, which is comparable to the resolution of available arbitrary wave-form generators. We note that the OU noise characteristics are not affected by this choice of ∆t, as Eq. (F3) is exact. We then make use of the calculated U s (t, t 0 ) and obtain the time evolution of the density matrix where ρ(t 0 ) = ρ y ≡ (σ 0 + σ y )/2 is the initial density matrix. We assume in the simulation in Fig. 3 in the main text that ρ(t 0 ) = ρ y ≡ (σ 0 + σ y )/2, which corresponds to perfect preparation of the system in the state |1 y . We note that the initial state can also be |1 x or any other state, which has components that do not commute with a ∼ σ z Hamiltonian in order to sense the signal. The expected density matrix ρ(t) is calculated by performing the simulation 2500 times for different noise realizations and averaging the result. The simulation results in Fig.  3 in the main text show the average population in state |1 y , which is calculated as P 1y (t) = (1/2) + Im(ρ 21 (t)). The simulation in Fig. 7 assumes ρ(t 0 ) = ρ y ≡ (σ 0 + σ z )/2 and takes into account imperfect preparation and readout. We calculate the expected density matrix ρ(t) and show the average population in state |1 −z , which is determined by P 1−z (t) = ρ 22 (t).