High Frequency Magnetometry with an Ensemble of Spin Qubits in Hexagonal Boron Nitride

Sensors based on spin qubits in 2D crystals offer the prospect of nanoscale sensing volumes, where the close proximity of the sensor and source could provide access to otherwise inaccessible signals. For AC magnetometry, the sensitivity and frequency range is typically limited by the noise spectrum, which determines the qubit coherence time. This poses a problem for III-V materials, as the non-zero spin of the host nuclei introduces a considerable source of magnetic noise. Here, we overcome this with a sensing protocol based on phase modulated continuous concatenated dynamic decoupling, which extends the coherence time towards the $T_1$ limit at room temperature and enables tuneable narrowband AC magnetometry. We demonstrate the protocol with an ensemble of negatively charged boron vacancies in hexagonal boron nitride, detecting in-plane AC fields within $\pm 150~\mathrm{MHz}$ of the electron spin resonance, and out-of-plane fields in the range of $\sim10-150~\mathrm{MHz}$. We measure an AC magnetic field sensitivity of $\sim1~\mathrm{\mu T/\sqrt{Hz}}$ at $\sim2.5~\mathrm{GHz}$, for a sensor volume of $\sim0.1~\mathrm{\mu m^3}$, and demonstrate that the sensor can reconstruct the AC magnetic field from a wire loop antenna. This work establishes the viability of spin defects in 2D materials for high frequency magnetometry, demonstrating sensitivities that are comparable to nitrogen vacancy centres in diamond for microscopic sensing volumes, and with wide-ranging applications across science and technology.


Introduction
Solid-state spin systems are a promising platform for the development of novel magnetic field sensors, with applications ranging from the the pursuit of quantum technologies to reaction monitoring in cells [1][2][3][4][5].Particular progress has been made with the nitrogen vacancy in diamond, thanks to long spin coherence times under ambient conditions.This has enabled significant progress, with notable highlights such as, single NV scanning magnetometers with nanoscale resolution [6][7][8][9][10], sub-millihertz resolution magnetic resonance spectroscopy [11][12][13] and ensemble based devices with sensitivities in the pT/ √ Hz range for signal frequencies ranging from DC [14] and low frequency [15,16] to GHz [17,18].
As the sensitivity depends on the spin coherence time, dynamical decoupling is often employed to shield the qubit from sources of noise, extending coherence times towards the T 1 limit.Pulsed variations have achieved sensitivities in the nT/ √ Hz range [19,20], however these are susceptible to errors arising from imperfect pulses [3,21].Continuous dynamical decoupling [22][23][24][25][26][27], on the other hand, avoids these issues and can also benefit from reduced power requirements [3].
Recently explored spin defects in hexagonal Boron Nitride offer an interesting alternative.To date, the most well-studied spin system in hBN is the negatively charged boron vacancy [28] (V − B ), which has been investigated as a sensor of temperature [29], strain [30,31] and magnetic field [29,[32][33][34][35].A potential limitation is the relatively short spin echo time [36,37].However, this can be mitigated with dynamic decoupling schemes [35,36,38] and the 2D nature of the host material provides a unique opportunity for the sensor to be in close proximity to, or even embedded within, the system of interest [32][33][34].
In this work, we implement a continuous concatenated dynamic decoupling (CCDD) scheme [24] with an ensemble of boron vacancies, to simultaneously provide robust protection against dephasing, whilst also enabling high frequency magnetometry.This approach uses the CCDD drive field to manipulate spin state transitions into resonance with a signal field.We characterise the sensors performance, demonstrating the detection of magnetic fields in the tens of MHz to several GHz range.For a fixed static magnetic field, the sensor has a bandwidth > 200 MHz and a sensitivity of ∼ 1 µT/ √ Hz.We use the sensor to spatially map the magnetic field from a loop antenna and find good agreement between measurement, simulation and analytical solutions.

Theoretical Background
The AC magnetic field sensor uses an ensemble of spin-1 negatively charged Boron vacancies in an hBN flake.The spin has a highly nonlinear response to an ac-magnetic field.This is used to mix the frequency of a signal field with the electron spin resonance, and an additional drive field.Optimising the drive field then produces a DC component of the signal field that can be detected as a change in fluorescence, known as optically detected magnetic resonance, thereby sensing the signal.The benefit of using this scheme for AC magnetometry is twofold.Firstly, the stabilising drive fields improve coherence times, increasing the sensitivity.Secondly, the resonant frequencies of the sensor can be tuned using a static magnetic field and the parameters of the drive field.As we shall see in the following sections, this results in a narrow sensor bandwidth, capable of determining the amplitude and frequency of an unknown signal in the MHz to GHz range.

Structure of the Boron Vacancy
The energy level diagram of the negatively charged boron vacancy is shown in Fig. 1(a).Two unpaired electrons form a radiative spin triplet system (total spin quantum number, S = 1), with optical ground state zero-field splitting (ZFS) of D GS ≈ +3.5 GHz [28].The intersystem crossing rate, from triplet to singlet, is spin dependent (γ 1 ≈ 2γ 0 ) [39], which enables initialisation of the ground state spin in m s = 0 via optical pumping, and spin readout via the photoluminescence (PL) intensity.
The electron Hamiltonian, H e can be described by; where D = 3.45 GHz and E = 59 MHz describe the ZFS terms in our sample [36], γ e ≈ 28 MHz/mT is the electron gyromagnetic ratio and S i are the electron spin-1 operators.We apply a static magnetic field, B z , parallel to the hBN c-axis.This separates the |m s = 0⟩ ↔ |m s = ±1⟩ transitions.For a narrowband external ac magnetic field H c (t) near resonance with the energy gap ω 0 between the ground |m s = 0⟩ and |m s = −1⟩ states, the |m s = +1⟩ state can be neglected, reducing the system to a spin-half or qubit, with Hamiltonian H e → ω0 2 σ z .The final term, δH(t) describes low frequency magnetic noise dominated by the electron-nuclear interaction.This limits the spin-echo times to under 100 ns [36,37], and therefore dictates the sensitivity to external magnetic fields.

Phase-modulated Dynamic Decoupling
In our previous work, we showed that decoherence arising from magnetic noise can be mitigated in V − B ensembles with CCDD [36].Here, we choose phase, rather than amplitude, modulated CCDD as it requires less power and has shown superior performance in extending the coherence time [36].The scheme is illustrated in Fig. 1(c), where a linearly polarised MW field of amplitude Ω is applied along the x axis to drive a Rabi oscillation between |0⟩ and |1⟩.A second drive is applied as an additional phase term, ϕ(t) = 2ϵm ωm sin (ω m t − θ m ).With this, we arrive at a MW control Hamiltonian of the form [24,26,40]: Insight can be gained by viewing the system in a frame of reference rotating at the drive frequency ω.Here, we find where ′ refers to axes in the first rotating frame, we have applied the RWA and take the limit ϵ m ≪ Ω.In the case of a single drive (ϵ m = 0), resonant with the electron spin resonance (ω = ω 0 ), we find a static energy gap of Ωσ ′ x -the eigenvalues of the first dressed state.By selecting ω m = Ω, in the case of a double drive (ϵ m ̸ = 0) the phase modulation term, ϕ(t), drives transitions between the first dressed states, shown in the middle panel of Fig. 1(c).
Moving to a second frame of reference rotating around the x ′ -axis at the ϕ(t) frequency ω m , we find where we have again applied the RWA, taken ϕ = 0 for simplicity and the limit ϵ m ≪ Ω.We refer to this second rotating frame of reference, shown in the right hand panel of Fig. 1(c), as the protected frame.This space is robust against the dominant sources of noise, as demonstrated in the following section.Setting ω m = Ω results in a static energy gap of amplitude ϵ m in the protected frame, with an axis that can be selected using the phase of the second drive term, θ m .Here, an ideal Rabi oscillation is represented by the spin-vector σ ′′ = (0, 0, −1).
Overall, this frame describes a pair of spin states, separated by an energy gap of ϵ m that rotate around both the z and x ′ axes, at frequencies ω, and ω m .This results in states that are dynamically decoupled from both bit and phase-flip errors, extending the coherence times towards the T 1 limit.

AC Magnetometry
In the lab frame, an AC signal of frequency ω s is described by an additional drive term, H AC , in the Hamiltonian. where Transforming to the protected frame, the signal term becomes: In the protected frame, the signal term can drive a Rabi oscillation when one of the shifted frequencies is resonant with the ϵ m splitting of the protected spin, and can be detected via spin dependent PL.This yields eight resonances at frequencies of and ω s = ω m ± ϵ m for out of plane signals (see ω 1 to ω 8 in Fig. 1(c)).The signal frequency can be determined by tuning the resonances via the CCDD drive parameters.Moreover, because the resonance conditions hold for any value of the signal phase ϕ s , phase locking between the signal and microwave control waveform is not necessary.
The magnetic noise can be described as δH(t) = ωγ ,α σ α B N,α (ω γ ) cos(ω γ t).This takes the same form as H AC and transforms to the protected frame in the same way.By optimising the CCDD scheme, the noise spectrum can be frequency shifted away from resonance with the qubit, reducing decoherence.The primary source of noise is low frequency electron-nuclear interactions along the z-axis.In the protected frame, decoupling from nuclear noise requires ω γ ± ω m ̸ = ϵ m , which holds for low frequencies of ω γ associated with electron-nuclear coupling.The second largest source of noise comes from slow fluctuations in drive amplitude, Ω, where the requirements are

Experimental Implementation Sample and Experimental Setup
In our experiments we use an ensemble of Boron vacancies in an hBN flake, transferred to a co-planar waveguide on a sapphire substrate [36,39] (see Fig. 1(a)).The MW control fields are applied to the CPW using an arbitrary waveform generator (AWG).To demonstrate that the scheme does not require phase locking between signal and control fields, we use a separate signal generator to drive the signal, which we apply to either the CPW or, in later experiments, to a 40 µm diameter wire mounted on an XYZ translation stage (Fig. 1(b)).PL (> 750 nm) is excited using a 488 nm laser and detected with a single photon avalanche diode (see methods for further experimental details).

AC Field Sensing Protocol
The pulse sequence used for AC-field sensing is illustrated in Fig. 2(a) and consists of two repeating sequences of qubit initialisation, spin manipulation, and readout.The first laser pulse initialises the ensemble into the |0⟩ state.Next, the spin is manipulated with a MW control sequence, before a second laser pulse excites PL, which is recorded as P 0 .This laser pulse also reinitialises the spin for the second MW manipulation, which is again followed by a measurement of the PL, P + .In the two sequences, the waveform ω M W = Ω cos[ω 0 t − 2ϵm Ω sin(ω m t)] is applied with Ω = ω m = (2π)100 MHz, but for total times, T = T M W and T = T M W + ∆T , respectively.We use the contrast, C = (P 0 − P + )/P + , as the sensor readout parameter.A typical measurement of the contrast is plotted in blue in 2(b), where ∆T = 1/(2Ω) = 5 ns is fixed and T M W is swept, effectively measuring the derivative of the CCDD stabilised Rabi-oscillation.This has the advantage of cancelling the effect of T 1 relaxation [36] and maximizes the contrast, and therefore sensitivity to an external signal.
In the presence of an in-plane continuous external signal applied via the CPW with ω s = ω 0 + ϵ m = (2π)2.557GHz the sensor undergoes two Rabi cycles at two different Rabi frequencies, simultaneously.The first is the CCDD stabilized lab frame Rabi oscillation with frequency Ω.The second is driven by the signal field in the protected frame, with a Rabi frequency proportional to the signal amplitude g ⊥ .The difference in Rabi frequencies produces a beating effect, as shown in orange in Fig. 2(b).In the Fourier domain, this manifests as a Mollow triplet centered on the lab frame Rabi frequency Ω, with two sidebands offset by the Rabi frequency of the signal in the protected frame, g/2 (Fig. 2(d)).This provides a method to determine the signal amplitude, which is used to calibrate the sensor (see Supplementary Information section 2).

Sensor Performance
To evaluate the sensing protocol, in Fig. 3 we quantify the sensor performance in response to an in plane signal, g ⊥ , delivered through the CPW.Whilst the signaldriven Rabi-oscillation measurement in Fig. 2(b) can determine the signal amplitude and provides a means to calibrate the sensor, it is inconvenient to make such a measurement repeatedly, for example when determining the frequency or spatial extent of a signal.Instead, we employ a type of variance detection [41], where we specifically select T M W = N/Ω, where N is an integer, and ∆T = 1/2Ω in order to compare adjacent peaks and troughs of the lab frame Rabi oscillation, thereby maximising the readout contrast, and hence the sensitivity.
We begin by measuring the contrast as a function of signal frequency, with fixed CCDD parameters Ω = ω m = (2π)100 MHz, ϵ m = (2π)30 MHz, T M W = 300 ns and ∆T = 5 ns (Fig. 3(a)).Sweeping the signal frequency in a 300 MHz range around the electron spin resonance at ω 0 , the sensor detects six resonances, as predicted in Eq. 7. Using a Lorentzian fit the average linewidth is 3.9 MHz, which determines the frequency resolution of the sensor.In Fig. 3(b) we show how an unknown signal frequency can be determined.Whilst recording the contrast, the CCDD drive is used to tune the sensor into resonance with the signal by sweeping ϵ m .The six resonances shift as expected, and we achieve a detectable frequency range ±150 MHz with respect to ω 0 .In principle, a similar measurement can be made by sweeping Ω and the frequency range can also be extended by changing the static magnetic field that determines ω 0 .The lower frequency limit on a detectable signal is expected to be around 200 MHz, due to increased decoherence close to the ground state level anti-crossing [39,42,43].The upper limit is bound by the frequency limit of the microwave electronics and the strength of the static magnetic field.However, it is realistic to expect that the sensor could operate in a similar manner for signals up to tens of GHz.
Next, with the signal tuned to the ω s = ω 0 + ϵ m ≈ (2π)2.557GHz resonance, we quantify the amplitude sensitivity to an in-plane AC B-field.In Fig. 3(c) the change in contrast, ∆C = |C 0 − C s |, where C s (C 0 ) is contrast with (without) the signal applied, is plotted as a function of the signal amplitude, for three different T M W (see Supplementary Information section 2 for signal calibration).The sensor is most sensitive, where the gradient, ∂(∆C) ∂B is maximum, which is shown for T M W = 300 ns as the green dashed line in Fig 3(c).From this, we calculate the minimum resolvable change in magnetic field [44], where σ(t m ) is the standard deviation of ∆C as a function of the measurement time t m .To measure σ(t m ), ∆C is repeatedly sampled at 1 ms time intervals and the resulting values of δB min,⊥ (t m ) are plotted in Fig. 3(d).δB min,⊥ follows the expected square root dependence for Shot noise limited detection, up to total measurement times of tens of seconds, when drifting laser power becomes significant.For t m < 10 s, the sensitivity, η ⊥ = δB min,⊥ (t m ) √ t m is ∼ 1 µT/ √ Hz, which is currently limited by the data rate of our time-tagging electronics (see methods).
The measured sensitivity is smaller than reported figures for DC magnetic field sensing using ensembles of boron vacancies, where values of ∼ 85 µT/ √ Hz have been achieved [29], but considerably larger than state-of-the-art NV-center based GHz frequency sensors, where sensitivities can reach the pT/ √ Hz range [17,18].This difference in performance is largely due to a difference in sensor volume, V , with the diamond devices having volumes of V ∼ 0.04 mm 3 [17] and 0.63 mm 3 [18], compared to ∼ 0.1 µm 3 in our case.Some applications preclude the use of large sensing volumes, for example when measuring signals from individual or small numbers of spins [45], in which case scaling the sensitivity by the volume provides a more representative metric of performance.Assuming a uniform defect density, the scaled sensitivity, η = η √ V , gives figures of η ∼ 2 pT Hz −1/2 mm 3/2 for the diamond sensors compared to η ∼ 10 pT Hz −1/2 mm 3/2 in this case, implying that significant gains in sensitivity can be made by increasing the sensor volume (and/or defect density).However, there is an inherent trade-off between spatial resolution and the sensor volume, with the requirements driven by the particular application.
Fig. 3(c) also illustrates how T M W can be selected according to the required dynamic range.For small amplitude signals the sensitivity is improved with a longer T M W , whereas for larger signal amplitudes, the monotonic range of the sensor can be increased by selecting a shorter T M W .This is a direct consequence of the fact that we are measuring a signal driven Rabi oscillation; the larger the signal field, the faster the protected frame Rabi oscillation and the earlier we can detect a change in contrast, thereby affording a shorter T M W .

External AC Magnetic Field
Thus far, the experiments have been focused on signals applied from an independent source via the CPW, which is designed to achieve a large in-plane magnetic field.This simulates the case of a signal collected by an antenna and directed to the sensor.To simulate the direct detection of a signal, we instead use a nearby loop of 40µm diameter wire mounted on an XYZ translation stage (Fig. 1(b)), driven by an independent signal generator.This is first used to characterise the sensor's response to out-of-plane fields, g ∥ .We begin by positioning the wire adjacent to our device and for CCDD parameters of Ω = (2π)100 MHz, ϵ m = (2π)30 MHz, T M W = 300 ns, we measure the contrast as a function of signal frequency (Fig. 4(a)).Three resonances are observed; ω s = Ω−ϵ m ≈ (2π)71 MHz and ω s = Ω+ϵ m ≈ (2π)129 MHz are predicted for g ∥ signal components in eq. 8, whereas ω s = ϵ m ≈ (2π)29 MHz originates from a resonance in a third rotating frame with respect to ω m σ ′′ z (see Supplementary Information section 2).As with an in-plane signal, we are able to tune the frequency of these resonances with ϵ m , and therefore determine a signal's frequency.In Fig. 4(b), the contrast is plotted as a function of ϵ m and ω s , revealing the expected linear dependence of the resonances.For out-of-plane magnetic fields, the upper limit of the frequency range is limited by Ω, and therefore the available microwave power and the conversion efficiency of the CPW.The lower limit is currently determined by the CCDD protocol, which requires Ω > ϵ m and ϵ m >∼ (2π)10 MHz [36].This could be extended by concatenating a third drive term [46], by including quantum frequency mixing [47] or continuous heterodyne detection [17].Fig. 4(c) plots the amplitude response of the sensor, which again shows similarities to in-plane field sensing (Fig. 4(c)), where the monotonic range and sensitivity (slope) are dependent on the T M W sensing time.

Magnetic Field Mapping
Finally, we provide a proof of principle demonstration of our hBN based sensor by mapping the magnetic field from the wire loop antenna.The sensor and readout laser spot are at fixed positions, whilst the antenna is positioned ∼ 50 µm above the sample and scanned in the XY-plane.For a resonant signal frequency, ω s = Ω − ϵ m = (2π)71 MHz the magnetic field map is shown in Fig. 5(a).Missing data in grey corresponds to positions where the wire obscures the collection pathway.We compare this result to a Comsol simulation of the out-of-plane magnetic field, shown in Fig. 5(b), and find good qualitative agreement.In particular, at the inner-side of the apex of the loop, the signal amplitude can be seen to reach a maximum then dip before reaching the wire, which is specific to the out-of-plane magnetic field component.
Away from the apex, the wire loop approximates two parallel wires, which allows us to demonstrate the sensors capacity to differentiate between the in plane and out of plane components of the magnetic field.With the X-position fixed, as indicated by the dashed line in Fig. 5(a), the two parallel sections of wire are scanned along x, for signal frequencies ω s = Ω − ϵ m = (2π)71 MHz and ω s = ω 0 + ϵ m = (2π)2.58GHz, corresponding to g ⊥ and g ∥ , respectively.The experimental results are shown in Fig. 5(c), alongside a fit to the analytical solution of the Biot-Savart law for two parallel conductors.We find good agreement to the experiment for sensor to source distances of 87 ± 2µm and 73 ± 2µm for each section of parallel wire.Note, the magnetic field amplitude for g ⊥ is small relative to g ∥ .This is due to a reduced power output of the signal generator at higher frequencies, which is reflected in the current fit parameters I ⊥ = 16.2 mA and I ∥ = 81.7 mA.The close agreement between experiment and model shows the hBN sensors capability to map the spatial variation of high frequency magnetic fields, which is relevant for a host of applications, for example in imaging microwave circuitry and probing the near-field of antennas [48].

Conclusions
In this work, we have implemented a phase modulated CCDD sensing scheme with an ensemble of negatively charged boron vacancies in hBN, which is sensitive to both signal frequency and amplitude.The scheme avoids the timing errors associated with pulsed techniques, requires no phase matching of the signal field and benefits from sensitivities supported by coherence times approaching the T 1 limit, even at room temperature operation.In proof of principle experiments we have demonstrated a detectable frequency range of ±150 MHz of the ESR for in plane fields and ∼ 10 − 150 MHz for out of plane fields.We achieve a sensitivity of ∼ 1 µT/ √ Hz at ∼ 2.5 GHz for in-plane fields, for an estimated sensor volume of only ∼ 0.1 µm 3 .The large Rabifrequency, enabled by directly integrating the hBN layer with the CPW, means that the sensor can be tuned over a range > 250 MHz for a fixed DC magnetic field.
In future work, the sensitivity could be enhanced by increasing the intensity of the read-out signal.For example, by improving the excitation and collection efficiencies, increasing the sensor volume and/or defect density, or by using brighter defect species [49,50].The spatial resolution of the mapping setup used for Fig. 5, which is currently limited to ∼ 0.5 µm by the diffraction limited laser spot size, could also be improved to ∼ 10 nm with super resolution techniques [51], or by using Fourier magnetic imaging [52].
Overall, this technique presents a competitive solution to the problem of sensing GHz magnetic fields, and with further development could utilise the twodimensionality of the host material to dramatically enhance sensitivity, or even gain access to otherwise undetectable signals.This capability could open the door to sensing across diverse application areas, from utilising the materials low cytotoxicity [53] to probe biomolecular dynamics [54,55] to collective excitations in magnetic thin films for novel computing architectures [56,57].

Methods
The sample consists of a chromium/gold (5/170 nm thick) coplanar waveguide (CPW), with a 10 µm wide central conductor, on a sapphire substrate and designed to be matched to 50 Ω at 4 GHz.An hBN flake, approximately 100 nm thick, is placed on top of the CPW using the PDMS transfer method.Boron vacancies are generated/activated using C ion irradiation with an energy of 10 keV and dose of 1 × 10 14 cm −2 .Further details can be found in Baber et al. [39].
PL is excited using a 488 nm diode laser, modulated by an acousto-optic modulator.The laser is coupled to a long working distance objective lens (N.A.=0.8) which focuses the light to a diffraction-limited spot ∼ 0.5 µm in diameter.The wavelength is selected to be close to the maximum absorption efficiency [39].Photoluminescence is collected with the same objective, separated from the excitation laser with a dichroic beamsplitter and further filtered by a 750 nm long pass filter.A fiber-splitter couples the light to a pair of single photon avalanche diodes (SPAD), which effectively doubles the count rate before saturation.The PL intensity is recorded using a time-correlated single photon counting module (Swabian Time Tagger 20), which has a data transfer limit of 8.5 Mtags/s that ultimately limits the signal-to-noise ratio that is achieved.The microwave control waveforms are generated using an arbitrary waveform generator (Keysight M8195A) and amplifier (30 dB amplification, maximum output power 30 dBm) and are applied via a circulator to one end of the CPW.The signal source (Agilent 8648C) is connected to the other end of the CPW, via a second circulator.There is no clock synchronization between the control and signal sources.The optical and microwave excitation, APD gating and photon collection are synchronised using a digital pattern generator (Swabian Pulse Streamer).All measurements are performed with a DC magnetic field along the z-axis of ∼ 40 mT generated by a permanent magnet.
The results presented are from two similar devices.Device A is used to collect the data in Figures 2 to 4, with device B used to collect the magnetic field mapping data in Fig 5 .Due to a small difference in the sample heights relative to the permanent magnet, ω 0 = (2π)2.52GHz for device A and ω 0 = (2π)2.55GHz for device B.

Rotating Frame Transformations of an AC Signal
In the presence of an AC signal, the Hamiltonian gains an additional term, H AC .The sensor response is different for in-plane and out-of-plane magnetic fields and so we treat the two cases separately: To define the signal field in the protected frame, we apply the same rotating frame transformations with respect to the control field drive frequencies.Starting with the electron spin resonance along the x axis, σ x ω, we find where ′ denotes the first rotating frame and we have applied the RWA.H AC∥ commutes with the transformation and so is unaffected.This produces a difference of ω in the resonant frequencies of the in-plane and out-of-plane signal fields.Applying the second transformation with respect to ω m σ ′ x , we find where ′′ denotes the protected frame.To arrive at a more concise form, we apply a counter clockwise rotation around the y ′′ axis for H ′′ AC⊥ (σ ′′ x → σ ′′ z , −σ ′′ z → σ ′′ x , σ ′′ y → σ ′′ y ) and a clockwise rotation around the y ′′ axis for H ′′ AC∥ (σ ′′ z → σ ′′ x , σ ′′ y → σ ′′ y ).

Additional sensor resonance at the drive frequency
An additional resonance is observed in Fig. 4a when ω s = ϵ m .This condition does not appear in Eq. 7 or 8, but can be observed after an additional frame transformation.Combining the protected frame control and out-of-plane signal Hamiltonians, H ′′ = H ′′ C + H ′′ AC , we find:  Choosing the condition f = ω m /2 yields the signal terms, 1  4 g z σ ′′′ y (sin((ω s − 1 2 ω m )t+ ϕ s ) − cos((ω s − 1 2 ω m )t + ϕ s ).When ω s = ϵ m , these terms are resonant with the eigenenergies of the frame, 1  2 σ ′′′ z (ϵ m − 1 2 ω m ), and therefore drive a transition between spin states, producing the resonance observed in Fig. 4(a).

Biot-Savart Law for Two Parallel Conductors
The plot in Figure 5(c) uses an analytical solution to the Biot-Savart law for two parallel conductors, which we include below: where µ 0 is the vacuum permeability, I is the current, x and z denote the positions of the sensor relative to the wire, x 0 , x 1 , z 0 and z 1 denote the absolute positions of the wire.

Fig. 1 (
Fig. 1 (a) Simplified energy level diagram of the V − B defect in hexagonal boron nitride.(b) Illustration of the sensor and experimental setup with an inset depicting the Boron vacancy.(c)Energy levels of the triplet ground state spin system under phase modulated concatenated dynamic decoupling.The concept of CCDD can be understood by viewing the system in frames of reference that rotate at the same frequency as the resonant MW drive fields; the first frame rotates at ω 0 σz, the second rotates at Ωσ ′x .Here we find static fields proportional to the amplitudes of the drive terms; Ω in the first frame, ϵm in the second.The sensing protocol relies on selection of the drive fields such that the signal field is resonant with one of the eight resonances ω 1 -ω 8 , thereby driving that transition, resulting in a detectable change in spin state (see equations 7 and 8).

Fig. 2
Fig. 2 AC Field Sensing Protocol using signal driven Rabi-oscillations of the CCDD protected qubit.(a) Optimised pulse-sequence for AC field sensing.Alternating microwave pulses of length T M W and T M W + ∆T are interlaced with laser pulses for preparation and readout of the spin.We define contrast as (P 0 − P + )/P + ; P 0 (P + ) is the measured PL following a microwave pulse of length T M W (T M W + ∆T .).For AC sensing we choose ∆T = 1/(2Ω).(b) Measurement using the pulse sequence described in (a), highlighting the CCDD stabilised Rabi-oscillation (Ω = (2π)100 MHz and ϵm = (2π)30 MHz).Shown with and without signal, H AC⊥ , with ωs = (2π)2.577GHz.(c) Close up of (b) around T M W = 500 ns.(d) Fourier transforms of (b).The signal driven Rabi oscillation in the protected frame manifests as the sidebands of a Mollow triplet.

Fig. 5
Fig. 5 Magnetic field mapping of a resonant AC signal.(a) Measured and (b) simulated XYmaps of the out of plane magnetic field component, g ∥ , from a 40µm diameter wire loop.The wire was driven with a signal frequency ωs = Ω − ϵm = (2π)71 MHz to meet the resonance condition of the CCDD scheme.The sensor readout was integrated over 4 s for each 10 µm 2 pixel in (a).The scale markers in (a) and (b) are 250 µm.Greyed-out areas correspond to sections where the wire obscures the photoluminescence collection path.(c) Scanning across the two parallel sections of wire described by the linecut in (a), the in plane, g ⊥ , and out of plane, g ∥ , magnetic field components of the signal are mapped using the g ⊥ and g ∥ -specific frequencies ωs = ω 0 + ϵm = (2π)2580 MHz and ωs = Ω − ϵm = (2π)71 MHz, respectively.The solid lines show fits to the data using an analytical solution of the Biot-Savart law for two infinitely long parallel conductors.
)− sin((ω s −ω m +f )t+ϕ s )−sin((ω s −ω m −f )t+ϕ s )−cos((ω s −ω m −f )t+ϕ s )+cos((ω s +ω m +f )t+ϕ s ))) . This work was supported by the Engineering and Physical Sciences Research Council [Grant numbers EP/S001557/1 and EP/L015331/1], Partnership Resource Funding from the Quantum Computing and Simulation Hub [EP/T001062/1] and an Engineering and Physical Sciences Research Council iCASE in partnership with Oxford Instruments Plasma Technology.Ion implantation was performed by Keith Heasman and Julian Fletcher at the University of Surrey Ion Beam Centre.