Introduction

Optically addressable spin defects in semiconductors are promising systems for various applications in quantum science and technology, including sensing and metrology1,2,3,4. In contrast to other defects typically hosted in 3D crystals5, the recently discovered boron vacancy center (\({V}_{B}^{-}\)) in hexagonal boron nitride (hBN)6,7 is embedded in a van der Waals material which can be exfoliated down to the limit of a single monolayer8,9(Fig. 1a). Such a unique feature would be advantageous for a wide range of applications where a minimal spatial separation of the spin defect to a specific target is highly desired. For example, in nanoscale quantum sensing, spatial resolution is determined by the proximity of the defect to the test object10,11,12, or for integrated quantum photonic devices van der Waals materials can be readily exfoliated onto different substrates and used as spin-photon interfaces4. Furthermore, the \({V}_{B}^{-}\) center, incorporated in ultra-thin hBN foils, allows for easier integration of manipulable qubits in 2D heterostructures. This possibility opens up unexplored paths for investigating novel composite materials and phenomena in nanoelectronics, nanophotonics, and spintronics8,9,13,14,15. The first protocols for generating \({V}_{B}^{-}\) centers in hBN have been recently presented16,17, and their spectroscopic characterization has been accomplished in several studies7,18,19,20,21. Importantly, by detecting the changes in their optically detected magnetic resonance (ODMR) spectra, the \({V}_{B}^{-}\) centers demonstrated to work as sensors for temperature, pressure, and static magnetic fields, in some cases being competitive with more mature spin-defect-based sensors22. Based on these results, first applications have been demonstrated for the magnetic and temperature nanoscale imaging of low-dimensional materials23,24. Coherent control of ensembles of \({V}_{B}^{-}\) centers has recently been shown18,19,25,26,27, although coherence times 100 nanoseconds have been reported27,28,29. These short timescales significantly restrict the utility of such spin qubits and discourage the development of applications based on coherent spin manipulation.

Fig. 1: Characterization of the \({V}_{B}^{-}\) defect’s spin properties.
figure 1

a Idealized structure of \({V}_{B}^{-}\) spin defects (red arrows) in hBN layers. Nitrogen atoms are displayed in blue, boron in gray. The number of spin defects is only for illustrative purpose and does not reflect the actual density. b Simplified energy levels displaying the ground and excited triplet states, the optical excitation transitions (green arrows), the fluorescence pathways (red arrows), and the non-radiative pathways through intersystem crossing (ISC) to the S = 0 singlet state (yellow arrows) which allows for spin-state dependent optical readout. c Microscope image of the hBN flake positioned on the gold microwave (MW) stripline. d Image of the sample from the optically detected magnetic resonance (ODMR) setup with the laser spot (blue, false color) for the initialization/interrogation of the spin ensembles. In the inset, the Gaussian profile of the laser spot is shown. e ODMR spectrum of the \(\left|0\right\rangle \to \left|-1\right\rangle\) transition at ~8 mT. The data points are fitted with single Gaussian functions (dotted lines) that are summed up to give the overall spectral lineshape (solid-blue line). f Rabi oscillations for four different MW powers. The MW frequency was set at the center of the ODMR spectrum in e. Inset, left: pulse sequence for the Rabi experiment. Right: dependence of the Rabi frequency νR versus the square root of the microwave power P. g Semi-log plot of the spin-lattice relaxation time decay (T1) measured by the recovery pulse sequence (inset). A T1 time of ~6 μs is extracted from the mono-exponential fit. h Semi-log plot of the coherence time T2 measured with the depicted spin-echo sequence. T2 = 60 ns is obtained from a stretched exponential fit. A strong signal modulation is superimposed to the same T2 decay curve with a frequency of ~45 MHz.

In this work, we combine efficient microwave (MW) delivery and precise MW control to perform dynamical decoupling schemes, such as Carr-Purcell-Meiboom-Gill30 (CPMG) to efficiently suppress magnetic noise from the spin bath and increase the \({V}_{B}^{-}\) coherence. We extend the room-temperature T2 coherence time of \({V}_{B}^{-}\) ensembles in hBN by nearly two orders of magnitude. Furthermore, we generate \({V}_{B}^{-}\) dressed-states (DS) by applying spinlock pulses and show that spin coherence can be preserved for a time (T1ρ), which is on the same order as the spin-lattice relaxation time T1. These results show consistency with the recent findings by Ramsay et al.29, who were able to increase the coherence time to a similar extent using an alternative approach based on a continuous concatenated dynamic decoupling (CCD) method31,32,33. In addition, our results offer further evidence that enhanced coherence enables the detection of radiofrequency (RF) signals, even with a frequency resolution that is far beyond the intrinsic coherence time of the spin defect. Furthermore, we investigate the potential of these systems by experimentally assessing their sensitivity to RF fields. With a particular focus on exploring their possible applications in nanoscale spin sensing, we compare their performance to that of typical spin-defect-based sensors relying on NV centers in diamond. This work broadens the applicability of \({V}_{B}^{-}\) defects in hBN, opening up new opportunities for nanoscale quantum sensing and technology.

Results and discussion

Characterization of \({V}_{B}^{-}\) spin properties

The negatively charged boron vacancy center (\({{V}_{B}}^{-}\)) consists of a missing boron atom in the hBN lattice surrounded by three equivalent nitrogen atoms (Fig. 1a). Ten electrons occupying six defect orbitals result in a triplet S = 1 ground state consisting of the \(\left|{m}_{s}=0\right\rangle\) (\(\left|0\right\rangle\)) and \(\left|{m}_{s}=\pm 1\right\rangle\) (\(\left|\pm 1\right\rangle\)) spin states6,34. At zero magnetic field, the \(\left|\pm 1\right\rangle\) states are degenerate but separated in energy from the \(\left|0\right\rangle\) state due to a zero-field splitting (ZFS) of D ~ 3.47 GHz. The transition from the ground state to the excited state by green laser illumination (e.g., λ = 532 nm) is followed by a phonon-assisted radiative decay with broad photoluminescence (PL) peaking at ~850 nm35,36. A spin-state-dependent relaxation path through inter-system crossing (ISC) leads to two important consequences: (1) the \({{V}_{B}}^{-}\) defects can be optically initialized into the \(\left|0\right\rangle\) state under ambient conditions; (2) the \(\left|0\right\rangle\) and \(\left|\pm 1\right\rangle\) states can be distinguished by their spin-state dependent PL (Fig. 1b)7,19,34,37.

All experiments presented in this work were conducted under ambient conditions on \({V}_{B}^{-}\) ensembles obtained by He+ implantation of hBN flakes (~100 nm-thick, details in the Methods section). As depicted schematically in Fig. 1c, the flakes are directly transferred onto a gold MW microstripline that is used for \({V}_{B}^{-}\) spin manipulation. A microscope for spatially resolved ODMR measurements has been built that can address defined areas of the sample with a laser spot size of ~20 μm diameter (see Fig. 1d and Experimental setup in Methods).

As a first characterization experiment, we measured the electron-spin resonance (ESR) spectrum by performing ODMR at a bias magnetic field B0 ~ 8 mT. The spectrum shows a broad resonance corresponding to the \(\left|0\right\rangle \to \left|-1\right\rangle\) transition (Fig. 1e), revealing characteristic features due to the strong hyperfine (HF) coupling of the \({V}_{B}^{-}\) electronic spin with the three equivalent 14N nuclei. The HF lines can be fitted with seven Gaussian functions, separated by ~ 44 MHz7,18,26,27. Their lineshape indicates the inhomogeneously broadened nature of the spectrum, where the electronic spins experience a broad distribution of local magnetic fields due to the intricate HF structure. Based on this initial observation, we anticipate that the coherence properties of the \({V}_{B}^{-}\) electronic spins will be significantly impacted by hyperfine interactions with nearby nuclear spins. To perform coherent control of the \({{V}_{B}}^{-}\) centers, we run Rabi experiments with the MW frequency at the central peak of the ODMR spectrum and monitor the fluorescence contrast while sweeping the MW-pulse duration tp. Figure 1f shows Rabi oscillations for different MW amplitudes. We observe a 6−7% fluorescence contrast at maximum amplitude with a π-pulse duration of \({t}_{p}^{(\pi )}=7.5\,{{{{{{{\rm{ns}}}}}}}}\), corresponding to a Rabi frequency νR ~67 MHz. Maximizing the Rabi frequency is crucial for two reasons: (1) it allows for short pulses that are necessary for an efficient spin manipulation, especially in the presence of fast spin-dephasing, (2) it allows us to drive a large bandwidth of the ODMR spectrum. Fourier transformation of our rectangular π/2-pulses gives an excitation bandwidth of approximately \(1/{t}_{p}^{(\pi /2)}=250\,{{{{{{{\rm{MHz}}}}}}}}\) for a ~ 4 ns duration. This has the positive effect of increasing the observable contrast whilst reducing detrimental spectral diffusion effects.

To characterize the \({V}_{B}^{-}\) relaxation properties, we measure the spin-lattice relaxation time T1 using a protocol consisting of two 5 μs-long laser pulses for initialization and readout separated by the sweep time τ. A time constant T1 ~ 6 μs is extracted from a mono-exponential fit of the resulting contrast decay (see Fig. 1g). This value is in agreement with a previous work38, where the same conditions for defects generation in hBN were utilized (refer to Sample preparation in the Methods section). However, other groups have reported 2–3 times longer T1 values18,19 which is likely due to differences in the sample preparation.

Furthermore, we measure the native coherence time T2 using the spin-echo sequence depicted in Fig. 1h. Here, the fluorescence contrast is detected while sweeping the free precession time τ. Fitting the resulting signal decay with a stretched exponential function39,40 (see pulse sequences, normalizations and fittings in Methods), gives a time constant T2 ~60 ns, which is similar to reported values27,28. Such a coherence time is short, especially compared to other ensembles of spin defects in 3D-host materials, where typical T2 times lie in the vicinity of microsecond timescales at room-temperature11. Interestingly, a clear oscillation appears superimposed on the spin-echo decay. This modulation is tentatively assigned to the interaction of the \({V}_{B}^{-}\) electronic spin with the three 14N nuclei since the frequency of ~ 45 MHz, fit by a cosine function (see Methods and Supplementary Note 1), matches the HF coupling7. An improvement of the coherence time is a critical step for utilizing \({V}_{B}^{-}\) in hBN in advanced quantum technologies, where qubit coherent manipulation and quantum information storage/retrieval are each essential preconditions.

Extension of the \({V}_{B}^{-}\) coherence

Dynamical decoupling (DD) techniques are traditional tools of nuclear magnetic resonance spectroscopy (NMR)30,41 and have been extensively applied in the past years to prolong the coherence of spin defects in solid-state materials11,42,43,44,45,46,47. Here, we apply this approach to \({V}_{B}^{-}\) ensembles in hBN to improve their short coherence times and unlock possibilities based on advanced spin manipulation.

A significant source of \({V}_{B}^{-}\) decoherence is likely to be found in spin ‘flip-flops’ from the bath spins (nuclei or paramagnetic impurities) surrounding the defects27,28. These processes cause random magnetic field fluctuations felt by the electronic spin on a time scale set by the average interactions involved39,45,48,49. We show that the CPMG DD protocol41 can be applied to decouple the \({V}_{B}^{-}\) spins from magnetic noise. This is done by applying resonant MW π-pulses, following the scheme \({(\pi /2)}_{y}{[-\tau -{(\pi )}_{x}-\tau ]}_{N}\) (see bottom-left inset in Fig. 2a), that have the effect to periodically re-phase the \({V}_{B}^{-}\) superpositions and sustain their coherence over longer timescales. Then, the coherence is mapped to the spin populations via a last (π/2)y-pulse for the final optical readout. If τ is shorter than the spin bath fluctuation correlation time tc, the magnetic noise appears to be time-independent39,48, and the train of π-pulses can effectively cancel it out.

Fig. 2: Extension of coherence for \({V}_{B}^{-}\) in hBN.
figure 2

a Measured decoherence curves (semi-log plot) for the \({V}_{B}^{-}\) spins under the effect of different CPMG decoupling pulse sequences with an increasing number of π-pulses N. Colored dots and solid lines are data points and fits, respectively. In black, the T1 measurement of Fig. 1g is shown with the corresponding fit as dotted line. Bottom, left: dynamical decoupling (CPMG) pulse sequence. Bottom, right: the data enclosed in the dotted box are shown in Supplementary Fig. 2. Inset: plot of the coherence times vs the number of π-pulses N utilized in each CPMG experiment. The data points fit a power function f(N) = a × N s where s ~ 0.71. b Rotating-frame spin-lattice relaxation time (T1ρ) measured with the depicted spinlock sequence (blue), in comparison with the T1 measurement (black).

In Fig. 2a, we show the signal intensity of the spin-echo obtained after N MW π-pulses upon increasing the delay τ between them. We plot the decays against the total pulse sequence time ts = 2Nτ. This results in multiple decay curves, showing how fast decoherence occurs depending on the number of π-pulses utilized for noise suppression. Then, we extract the characteristic \({T}_{2}^{(N)}\) times by fitting every curve (see Methods). We observe a factor ~ 70 increase in the coherence time (\({T}_{2}^{(1000)} \sim 4.2\,\mu {{{{{{{\rm{s}}}}}}}}\)) by applying up to 1000 π-pulses, with respect to the spin-echo with a single π-pulse (T2 ~ 60 ns). The enhanced coherence times closely approach the spin-lattice relaxation time, which is the theoretical limit50. We observe that DD has no impact on the strong modulation observed in the spin-echo T2 measurement. This modulation remains unchanged in both amplitude and frequency as N increases. We also note that the finite duration of the MW pulses sets the shortest pulse sequence time ts. Moreover, particularly for large N, we expect contributions from pulse errors and T1 relaxation44,45. Please refer to Supplementary Fig. 2 for a better visualization of the data related to the experiments with N = 300, 600, 800, and 1000 π-pulses.

In the upper-right inset of Fig. 2a, we show the increase of the coherence times versus the number of π-pulses N. The plot depicts a sub-linear dependence that can be fit with a simple power function f(N) = a × N s where s ~ 0.71, which is in good agreement with the theoretical dependence of T2N 2/3 expected for a Lorentzian spin bath, in the limit of long spin bath correlation times tcτ39,48. These results demonstrate that dynamical decoupling works effectively for our sample, similar to the situation encountered for nitrogen-vacancy (NV) ensembles in diamond in the presence of high-density paramagnetic impurities (50-100 ppm) and natural abundance 13C nuclear spins39,45 or for VSi in 4H-SiC51.

We also note that a factor of two increase in coherence time by a CPMG protocol was shown by conventional electron paramagnetic resonance (EPR) spectroscopy, although under very different experimental conditions (magnetic field of ~3 T and cryogenic temperature of ~50 K)20.

An alternative approach that preserves coherence relies on generating \({V}_{B}^{-}\) dressed spin states using spinlock pulse sequences52,53. After optical initialization of the defects in the \(\left|0\right\rangle\) state, a (π/2)x-pulse generates their coherent superposition which is then locked along the y-axis of the Bloch sphere by a spinlock pulse. We measure the spin-lattice relaxation time in the electron-spin rotating-frame (T1ρ) with the experiment depicted in Fig. 2b. Here, the \({V}_{B}^{-}\) fluorescence contrast is monitored while increasing the spinlock pulse duration. We demonstrate that the \({V}_{B}^{-}\) dressed-states and, therefore, the electronic spin coherence can survive ~130× longer than in the case of the spin-echo T2 (Fig. 1h). The decay of the spinlocked coherence can be fit by a bi-exponential function (see Methods) and reaches the ~T1 relaxation time.

Sensing RF signals with \({V}_{B}^{-}\) defects in hBN

With the improved coherence time, the application of advanced quantum sensing protocols is now possible. In particular, we explore RF sensing by alternatively using pulsed dynamical decoupling (pDD) techniques, or continuous dynamical decoupling (cDD) schemes. In both cases, we test the response of the \({V}_{B}^{-}\)-based sensor to an RF magnetic field of the form BRF(t) = bRFcos(2πνRFt + ϕRF). Here, bRF, νRF and ϕRF are the RF amplitude, frequency and phase, respectively. The RF field is aligned perpendicular to the hBN flake’s plane (i.e., quantization z-axis of the spin defects) and its phase is unlocked with respect to the control pulse sequence. A more detailed explanation on quantum sensing of RF fields with hBN is provided in the Supplementary Note 3.

In pDD sequences, the \({V}_{B}^{-}\) spins are brought into a superpostion state through a π/2-pulse and the RF field induces a relative phase θpDD to the \({V}_{B}^{-}\) electronic spin’s superposition, such as: \(\left|\psi \right\rangle=(\left|0\right\rangle \pm {e}^{i{\theta }_{{{{{{{{\rm{pDD}}}}}}}}}({t}_{s})}\left|1\right\rangle )/\sqrt{2}\). For detection, the signal is rectified by applying a train of N equidistant π-pulses at times τ = 1/(4νRF). This allows the phase to be accumulated over an interrogation time of ts = 2Nτ, reaching a maximum value of θpDD(ts) = (2/π)γbRFts, where γ is the electron gyromagnetic ratio. This accumulated phase is then converted to a spin population difference by a final π/2-pulse and read out optically. This scheme acts as a pass-band filter with center frequency \({f}_{c}=\frac{1}{4\tau }\) and bandwidth \({{\Delta }}f=\frac{1}{{t}_{s}}\). This means that the protocol enhances the effect of RF fields oscillating within the bandwidth Δf while suppressing all other field fluctuations. Supplementary Note 3 presents experimental evidence that the \({V}_{B}^{-}\) spin ensembles are subject to the sensing mechanism described above. As a first example, we use the pulsed dynamical decoupling sequence (XY8-N), depicted in Fig. 3a, to sense the RF frequency νRF. The XY8-N protocol is similar to the CPMG sequence described earlier, but it employs a distinct pattern of MW-pulse phases that alters the spin rotation axis at each π-pulse. This variation is designed to minimize the impact of pulse errors. We have chosen to utilize the XY8-N sequence instead of CPMG as it typically exhibits superior performance in detecting RF fields54,55,56 (see Supplementary Note 4). In Fig. 3b, we employ a sequence with 16 π-pulses (XY8-2) and test the sensor’s response by sweeping τ while keeping νRF at a defined value. Fluorescence contrast dips appear at the expected τ for two different values of νRF and their lineshapes can be fitted by the expected sinc-squared function3, as detailed in the Methods part. In Supplementary Note 6, we explore the frequency range that can be probed using the XY8-N protocols on our sample, which spans from ~10 MHz to 40 MHz. In addition, we provide an analysis of the criteria for optimizing the pDD sequence and determining the optimal number of pulses for a specific sensing frequency. These experiments directly demonstrate the sensor’s ability to detect an unknown RF signal. In Fig. 3c, we show the dependence of the detected signal on the number of π-pulses. As anticipated, the XY8-2 dip narrows down with respect to the one obtained with the XY8-1 sequence, however, simultaneously, the signal-to-noise ratio (SNR) decreases due to decoherence. More details about the experimentally probed spectral bandwidth can be found in Section 4 of Supplementary Note 3.

Fig. 3: RF-sensing with \({V}_{B}^{-}\) in hBN.
figure 3

a Pulsed-DD protocol used for sensing RF signals. An XY8-2 pulse sequence was utilized for the experiments in b, c setting a test RF field at a constant frequency νRF and sweeping τ. b Response of the \({V}_{B}^{-}\) sensor as fluorescence contrast dips occurring at matching of the interpulse delay τ with the RF signal period according to: τ = 1/(4νRF). The data points (dots) are best fitted with a (sinc)2 function. c Dependence of the lineshape on the number of pulses for XY8-1,2,3,4 sequences setting νRF = 16 MHz. d Spinlock-based protocol for RF-sensing. A test RF field was set at a constant frequency νRF and the spinlock pulse duration was kept fixed (tSL = 0.5 μs) while its amplitude Ω was swept. e Spectral response as fluorescence contrast dips occurring at matching of the spinlock amplitude with the RF frequency according to νR = νRF. f Dependence of the lineshape on the spinlock duration. g Coherently Averaged Synchronized Readout (CASR) protocol. XY8-2 subsequences are synchronized to the sensing frequency for 2 seconds. h Time domain CASR signal. Each detected point corresponds to an optical readout represented by the red circles in g. In the inset, a zoom-in of the signal in the first 4ms shows the oscillations at Δν = 1000 Hz. i Fourier transformation of the signal in h yields a sharp peak at the relative frequency Δν. A Lorentzian linefit of the peak (red line) results in a 0.9 Hz linewidth.

An alternative approach for sensing RF signals are cDD pulse sequences which are based on rotating-frame magnetometry57,58,59 (Fig. 3d). They exploit the \({V}_{B}^{-}\) coherence locked on the transversal plane by a spinlock pulse of duration tSL and variable amplitude Ω. Matching the \({V}_{B}^{-}\) Rabi frequency νR with the sensing frequency νRF, such that: Ω/(2π) = νR = νRF drives transitions between \({V}_{B}^{-}\) dressed-states \(\left|\pm \right\rangle=(\left|\,0\right\rangle \pm i{e}^{i{\theta }_{{{{{{{{\rm{SL}}}}}}}}}({t}_{{{{{{{{\rm{SL}}}}}}}}})}\left|\,1\right\rangle )/\sqrt{2}\) and induces a relative phase \({\theta }_{{{{{{{{\rm{SL}}}}}}}}}({t}_{{{{{{{{\rm{SL}}}}}}}}})=\frac{1}{2}\gamma {b}_{{{{{{{{\rm{RF}}}}}}}}}{t}_{{{{{{{{\rm{SL}}}}}}}}}\). As in the previous pDD method, this accumulated phase is translated to a spin population difference by a final π/2-pulse and optically read out, providing direct information about the strength of the RF magnetic field. The spinlock method can also be seen as a pass-band filter whose center frequency is given by the spinlock amplitude fc = νR, and whose bandwidth Δf is set by the spinlock time tSL (see Section 7 of Supplementary Notes 3 for a more detailed description of the spinlock experiment). Figure 3e illustrates RF sensing using the spinlock pulse sequence. We apply a sample RF field to the \({V}_{B}^{-}\) sensor and sweep the spinlock MW amplitude Ω/(2π) in a range of a few tens of MHz around the RF frequency νRF. Similar to what was obtained with the XY8-2 protocol in Fig. 3b, we observe dips at the matching conditions: νRF = Ω/(2π). Moreover, we explore the possible range of detectable RF frequencies which, in this case, is limited by the spinlock amplitude Ω. As shown in Supplementary Fig. 16, the spinlock sequence gives us access to RF frequencies in the range of 2 MHz νRF 25 MHz. In Fig. 3f, we investigate the sensor’s response by probing it with various spinlock durations tSL. We observe an increase in SNR and a reduction in linewidth until reaching an optimal duration of approximately 0.5 μs. Beyond this point, we notice a gradual degradation of the signal and broadening of the dips, approaching the limits imposed by the T1ρ and T1 relaxation times. A discussion of these aspects can be found in Section 7 of Supplementary Note 3.

Additionally, in Supplementary Note 7, we demonstrate coherent control of the \({V}_{B}^{-}\) dressed-states and probe their evolution during the spinlock pulse57,59,60. The detection of such states can be particularly useful in scenarios where pseudo-Zeeman spin states are preferred over bare-states due to the convenience of modulating their energy splitting through the microwave amplitude. Applications that benefit from these states include nuclear-spin hyperpolarization, which can enhance the sensitivity of magnetic resonance spectroscopy, enable the use of nuclear spins as quantum registers, or improve the accuracy of quantum simulators12,61,62. A system like the \({V}_{B}^{-}\) in hBN has the potential to benefit all of these areas. As evident from the experimental results, advanced quantum sensing protocols can be applied using spin defects in 2D materials and for qubit-control in 2D quantum technologies26,46,63,64,65.

Sensing of RF signals with arbitrary frequency resolution

The frequency resolution in dynamical decoupling sequences is typically restricted by the duration of the pulse sequence and thus by the coherence time. This is a particular limitation for \({V}_{B}^{-}\) defects in hBN, but it can be overcome by applying sensing schemes that integrate classical heterodyne detection with quantum sensing, which allow spectral resolutions that are independent on the properties of the qubit66,67,68. In particular, we demonstrate a sensing scheme called coherently averaged synchronized readout (CASR)66. As explained in detail in Section 8 of Supplementary Note 3, the fundamental idea of the CASR protocol is the synchronization of a series of pDD sequences (e.g., XY8-N) with the sensing RF magnetic field which is kept phase-locked to the control sequence. For a slight detuning of the RF frequency νRF from the pulse sequence synchronization frequency νpDD = 1/(4τ), the fluorescence oscillates in time domain at the difference frequency Δν = νpDDνRF. This synchronization technique enables arbitrary frequency resolution since it is no longer limited by the intrinsic coherence time of the solid-state spin system, but rather by the clock stability of the experimental setup responsible for the reiteration of the pulse sequences for an arbitrarily long time.

Figure 3g illustrates the pulse scheme utilized for our experiments, which consists of a train of XY8-2 sequences, which are synchronized with an RF signal of frequency νRF = 18 MHz. We run the sequence for a total measurement time tm = 2s (Fig. 3h), resulting in a time-dependent measurement that can be Fourier transformed to give a peak with sub-Hertz linewidth (Fig. 3i). Importantly, this method can render our ultra-thin quantum sensor capable of sensing oscillatory magnetic fields with a high frequency resolution, with possible applications in nanoscale magnetic resonance spectroscopy67,68. Finally, we used the CASR protocol to experimentally determine the sensitivity of our \({V}_{B}^{-}\) detector which resulted to be ~2–3 μT Hz−1/2. Details about the sensitivity measurement can be found in Section 8 of Supplementary Note 3.

Comparison with state-of-the-art NV-diamond sensors

To draw a parallel with other competing systems, we examined and compared the RF sensing capabilities of our \({V}_{B}^{-}\) sensor with other state-of-the-art quantum sensors based on ensembles of NV centers in diamond11,69,70. We explain the details of this comparison in the Supplementary Note 5. In a simplified picture, the sensitivity of optically-active spin-based sensors depends on the number of detected photons (n) and on the spin coherence times (T2) according to: \({\eta }_{{{{{{{{\rm{}}}}}}}}}\propto \frac{1}{\sqrt{n}}\frac{1}{\sqrt{{T}_{2}}}\)11,69,71. Considering the shorter coherence times (on the order of nanoseconds for our \({V}_{B}^{-}\) sample versus microseconds timescales for NV-sensors) and the lower quantum efficiency (~0.03% vs. ~70%)72, we anticipate that our \({V}_{B}^{-}\) sensor will exhibit lower sensitivity compared to the NV-diamond sensors. Indeed, assuming similar experimental conditions, such as the same light collection efficiency, our hBN sample is expected to give a sensitivity on the order of a few μT Hz−1/2, consistent with the experimental findings. In contrast, ensembles of NV centers in diamond typically provide sensitivities on the order of nT Hz−1/2 69,73. While this may initially be perceived as a limitation, it is important to acknowledge the significant signal enhancements that \({V}_{B}^{-}\) sensors can provide in various applications, particularly in nanoscale spin sensing. These enhancements arise from the 2D properties of the host material, which enable an ideal interface with target materials, reduced presence of dangling bonds and surface imperfections, and optimal proximity between the sensors and the target spins for effective interaction. Initial experiments, such as those shown in the recent work of Durand et al.74 investigating \({V}_{B}^{-}\) functionality in few-layer hBN substrates, are crucial steps towards revealing the full potential of these systems.

In conclusion, this work addresses the short spin coherence of the hBN spin defects, a severe limitation for their application in quantum technology. Utilizing pDD protocols, we achieve a ~70 times extension of the coherence with respect to the single spin-echo T2, approaching the limit of the longitudinal relaxation time T1. Furthermore, by generating \({V}_{B}^{-}\) dressed-states with spinlock pulses, we demonstrate an extension of the coherence up to ~7.5 μs, overcoming the spin-echo T2 by more than two orders of magnitude. The improved coherence times enable us to demonstrate RF signal detection in several complementary experiments. In particular, we demonstrate that dynamical decoupling protocols, such as XY8-N or spinlock pulse sequences, are functional for sensing RF signals. Furthermore, we show that despite the intrinsically short \({V}_{B}^{-}\) coherence, sensing RF frequencies with high (sub-Hz) frequency resolution is also possible using quantum heterodyne detection approaches, such as CASR or Qdyne schemes66,67,68,75. While the experiments indicate that our \({V}_{B}^{-}\) sensor is less sensitive to RF fields compared to state-of-the-art NV-diamond quantum sensors, the distinctive potential of hBN as a Van der Waals material to form intimate interfaces with target samples can possibly mitigate this limitation. Additionally, the experiments reported, along with the possible miniaturization and integration of these sensors into 2D heterostructures, set the stage for the establishment of nanoscale spin sensing for the exploration of emergent phenomena in low-dimensional quantum materials and devices. Finally, the improved spin control and the intriguing nuclear-spin environment surrounding the defects open a promising path to the realization of multi-qubit registers for quantum sensors and quantum networks integrated into ultra-thin structures.

Methods

Experimental setup

Initialization of the \({V}_{B}^{-}\) ensemble is realized with a 532 nm laser (Opus 532, Novanta photonics) at a power of ~100 mW (CW). Laser pulses are timed by an acousto-optic modulator (3250-220, Gooch and Housego) with typical pulse durations of 5 μs. The laser light is reflected by a dichroic mirror (DMLP650, Thorlabs) after which it is focused on the hBN flake by an objective (CFI Plan Apochromat VC 20×, NIKON) with a numerical aperture of NA = 0.75. Photoluminescence (PL) is collected by the same objective and alternatively focused by a tube lens on: (1) an avalanche photodiode (APD) (A-Cube-S3000-10, Laser Components) for the spectroscopic path; (2) a camera (a2A3840-45ucBAS, Basler) for imaging the sample. The excitation green light and possible unwanted fluorescence from other defects are filtered out using a long-pass filter with a cut-on wavelength of 736 nm (Brightline 736/128, Semrock). The output voltage of the APD is digitized with a data acquisition unit (USB-6221 DAQ, National Instruments). An arbitrary waveform generator (AWG) up to 2.5 GS/s (AT-AWG-GS2500, Active Technology) is used to synchronize the experiment and generate rectangular arbitrary-phased RF pulses for \({V}_{B}^{-}\) spin control. For up-conversion of the AWG RF frequency (typically 250 MHz) to the MW frequency required for \({V}_{B}^{-}\) driving, mixing with a local oscillator generator (SG384, Stanford Research Systems) is realized by means of an IQ mixer (MMIQ0218LXPC 2030, Marki). The amplified microwave pulses (ZHL-16W-43-S+, Mini-Circuits) are delivered by a gold stripline to the hBN sample. A permanent magnet underneath the sample holder is utilized for applying the magnetic field of ~8 mT. The ODMR frequency is used to determine the magnetic field strength B0 as well as the \({V}_{B}^{-}\)[0,−1] resonance frequency \({f}_{{V}_{B}^{-}}\). The radio wave signals used to demonstrate RF magnetometry are produced by an RF waveform generator (DG1022z, Rigol) connected to a 30 W amplifier (LZY-22+, Mini-Circuits). A small wire loop placed in the proximity of the sample was used for the RF delivery.

Sample preparation

The hexagonal boron nitride van der Waals flakes were cleaved and tape-exfoliated starting from hBN seed crystals (2D semiconductors) on a silicon wafer with a 70 nm top oxide layer. We then implanted the exfoliated samples at the ion beam facility (Helmholtz-Zentrum Dresden-Rossendorf, HZDR) with a helium ion fluence of 3 × 1014 ions/cm2 at an energy of 3 keV. Once the photoluminescence spectrum of the boron vacancies was verified, we transferred the boron vacancy containing hexagonal boron nitride with a standard dry transfer method on top of a gold stripline evaporated on a sapphire substrate. The gold stripline was connected to a printed circuit board using several bond-wires in parallel to improve impedance matching and enabling high power MW delivery for short Rabi pulses.

ODMR measurement

For all experiments throughout this work, 5 μs-long laser pulses were used for initialization/readout. The ODMR measurement displayed in Fig. 1e) was performed using a 1 μs-long MW pulse at ~1mW power for the driving of the \({V}_{B}^{-}\) spin populations. The fluorescence contrast was monitored while increasing the MW frequency. For normalization and noise cancellation purposes, a second reference sequence was applied right after the first one, differing only from the MW being off76. The single data points result from dividing the fluorescence readouts of the two sequences. 10,000 averages for each data point and further 600 averages of the full frequency sweep were recorded. After baseline subtraction, the lineshape was fitted with seven Gaussian functions of the form \(a[\exp (-\ln (2){(f-{f}_{0})}^{2}/{{{{{{{{\rm{LW}}}}}}}}}^{2})]\) whose amplitude a and frequency f0 were used as fitting parameters whereas the half-width-half-maximum LW was kept at a constant value of 22 MHz. The relevant fit parameters are reported in Supplementary Table 4.

Rabi experiment

Rabi oscillations were recorded by setting the MW frequency in the center of the ODMR spectrum and sweeping the MW-pulse duration tp in stepwise increments. Different MW power (37, 33, 28 and 23 dBm) were used corresponding to the different datasets in Fig. 1f). For each point, 10,000 averages were acquired following the same normalization and noise cancellation procedure used for the ODMR experiments. In Fig. 1f, the Rabi oscillations were fitted using the following function: \(1-c/2+c/2(\cos (2\pi {\nu }_{R}t+{{\Phi }}))[a\times \exp (-t/{T}_{a})+b\times \exp (-t/{T}_{b})]\), where c is a term for coherence normalization, νR the Rabi frequency, Φ a phase term and the bi-exponential factor accounts for the damping of the oscillation. Likely due to the dephasing processes causing damping and out-of-step effects of the Rabi oscillation, we observed a significant discrepancy (  20%) between the Rabi frequencies obtained directly from the fits and the expected frequencies based on the first minimum of the Rabi oscillation curve that corresponds to the actual spin population inversion, as determined by θflip = 2πνRtp, where tp represents the duration of the pulse. To address this issue, we calculated the first derivatives of the Rabi curves, fitted them using a polynomial spline, and identified the x-intercept as the precise minimum position, indicative of the π-pulse duration. Consequently, for each Rabi experiment, we measured π-pulse durations of (7.5 ± 0.1), (10.1 ± 0.2), (15.3 ± 0.3), and (28 ± 1) ns. Subsequently, we calculated the corresponding Rabi frequencies νR using the aforementioned flip-angle formula: νR = 1/(2tπ). To illustrate the relationship between the Rabi frequencies and the microwave power, we plotted the νR values against the square root of the microwave power. Performing a linear fit (y = ax), we obtained a slope of a = (32 ± 2) \({{{{{{{\rm{MHz}}}}}}}}/\sqrt{{{\mbox{W}}}}\) (Fig. 1f, inset).

T1 measurement

The T1 time (see Fig. 1g) was measured by sweeping the time τ between initialization and readout pulses in a range from 10 ns to ~ 30 μs. For noise cancellation purposes, a second reference sequence was applied right after the first one, differing only for a MW π-pulse inserted after the first laser pulse. The data points were then obtained by dividing the readouts of the two consecutive sequences. Every point was averaged 100,000 times and the whole time sweep was averaged four times. The T1 decay curve was fitted with a simple mono-exponential function of the form \(a(\exp (-\tau /{T}_{1}))\) where T1 = (5.84 ± 0.05) μs.

T2 measurement

The spin-echo sequence was set up following the scheme [(π/2)yτ−(π)xτ−(π/2)y] where τ is swept from 10 ns to ~200 ns. Referencing for noise cancellation was achieved by alternating the last MW-pulse of the spin-echo sequence from π/2 to (3/2)π76. Every point was averaged 100,000 times and the whole time sweep was averaged five times. The decay was fitted with the function: \(a\times {e}^{-{(2\tau /{T}_{2})}^{c}}+b\times \cos(2\pi f\tau )\times {e}^{-(\tau /{T}_{f})}\) where the first stretched exponential yields the time constant T2 = (58.5 ± 0.4) ns with c = 1.03 ± 0.01. To guide the eye in the figures, we fitted the oscillation superimposed on the decay with a cosine function with f = 44.5 MHz, multiplied by an exponential term which reproduces the damping of the observed oscillation with Tf = 71 ns. The relevant fit parameters are reported in Supplementary Table 5.

CPMG experiments

We applied the same scheme utilized for the T2 measurement, that is monitoring the spin-echo signal while increasing the free evolution time τ. Multiple decoherence curves were acquired for pulse sequences with growing number N of π-pulses, up to N = 1000. The data were normalized according to the following procedure. First, for all datasets, the time axis was multiplied by a scaling factor S = 2N accounting for the real time elapsed between the first and the last π/2-pulse. Then, the decay curve corresponding to the single π-pulse experiment (spin-echo) was fitted by the function: \(a\times {e}^{-{({t}_{s}/{T}_{2})}^{c}}+b\times \cos(2\pi f{t}_{s}/S)\times {e}^{-({t}_{s}/{T}_{f})}\). The point of maximum contrast, namely maximum intensity of the spin-echo, when no decoherence has occurred yet, has been extrapolated from the fit in correspondence to the time t = 0 of the decay. Then, the contrast of all datasets has been normalized to this value and then fitted with the same function, keeping the amplitudes a and b locked. The modulation frequency f has been used as a fitting parameter only for the datasets with N = 1, 4, and 16, yielding f = (44.1 ± 0.5), (44.7 ± 0.6), (45.9 ± 0.8) MHz, respectively. For the other datsets, f was kept locked to 44.5 MHz. The fitted T2 values and relative exponents c are reported in Supplementary Table 6. The dependence of the coherence times on the number of pulses shown in the inset of Fig. 2a was fitted with a simple power function f(N) = a × N s where a = (29 ± 1) ns and s = 0.71 ± 0.05.

T1ρ measurement

T1ρ was measured using a pulse sequence \([{(\pi /2)}_{x}-d-{\left({{{{{{{\rm{spinlock}}}}}}}}\right)}_{y}-d-{\left(\pi /2\right)}_{x}]\) and monitoring the resulting fluorescence contrast while applying step-by-step increments of the spinlock pulse duration tSL. 3.5 ns-long π/2-pulses were used and the delay times d kept to a value as short as possible (~1−2 ns), in order to avoid significant dephasing during this time. The spinlock amplitude was kept at 10% of the MW amplitude utilized for the π/2-pulses. 100,000 averages were taken for each data point. The resulting curve fits a bi-exponential decay of the form: \(a(\exp (-{t}_{{{{{{{{\rm{SL}}}}}}}}}/{T}_{1a}))+b(\exp (-{t}_{{{{{{{{\rm{SL}}}}}}}}}/{T}_{1b}))\), with a = 0.48 ± 0.02, T1a = (1.38 ± 0.09) μs, b = 0.52 ± 0.02, T1b = (7.52 ± 0.21) μs.

XY8-N experiments

RF sensing was performed by means of a XY8-2 sequence following the scheme: \({(\pi /2)}_{y}{[{[-\tau -{(\pi )}_{\phi }-\tau ]}_{8}]}_{2}\), with the following π-pulses phase-scheme: ϕ = [xyxyyxyx]2. π/2 and π-pulse durations of respectively 4 ns and 8 ns have been used. An RF field was applied by a wire loop in the vicinity of the sample and the RF frequency, νRF, was held at a constant value. The interpulse duration, τ, was varied between 10 and 20 nanoseconds, which is in a range where the sensing frequency was expected to match the condition \({\nu }_{{{{{{{{\rm{RF}}}}}}}}}=\frac{1}{4\tau }\). The RF phase was left unlocked with respect to the pulse sequence, resulting in random phase variations for each repetition of the pulse sequence. Referencing for noise cancellation was achieved by alternating the last MW-pulse of the spin-echo sequence from π/2 to (3/2)π. Every point was averaged 100,000 times and the whole sweep averaged 49 times. The observed dips were first baseline-corrected by subtracting a dataset of the same experiment performed with no RF signal and then fitted with the following function: \(a/2{\left[\sin (2\pi {\nu }_{{{{{{{{\rm{RF}}}}}}}}}N(\tau -{\tau }_{0}))/(2\pi {\nu }_{{{{{{{{\rm{RF}}}}}}}}}N(\tau -{\tau }_{0}))\right]}^{2}\). In the fittings, we set νRF at a constant sample frequency and leave a, τ and N as free parameters. The raw data before baseline subtraction are shown in Supplementary Note 9. The same procedure has been applied for the data in Fig. 3c. All relevant fit parameters are reported in Supplementary Tables 7 and 8.

Spinlock protocol

For sensing, the same spinlock sequence described above for the measurement of the T1ρ was utilized. A π/2-pulse of 4 ns and a spinlock duration tSL = 0.5 μs were used. The RF phase was left unlocked to the pulse sequence, resulting in random phase variations for each repetition of the pulse sequence. The RF frequency, νRF, was held at a constant value and the spinlock amplitude Ω was swept, corresponding to sweeping the Rabi frequency νR until matching the condition νR = νRF. The observed dips were first baseline-corrected by subtracting a dataset of the same experiment performed with no RF signal and then fitted with Lorentzian functions of the type: \(a/(1+{(\nu -{\nu }_{{{{{{{{\rm{RF}}}}}}}}})}^{2}/{{{{{{{{\rm{LW}}}}}}}}}^{2})\). The raw data before baseline subtraction are shown in Supplementary Note 9. The same procedure was applied for the data in Fig. 3f. All relevant fit parameters are reported in Supplementary Tables 9 and 10. Since the spinlock amplitude is swept by varying the peak-to-peak voltage (V.p.p.) of our AWG, a calibration procedure was applied to report the spinlock amplitude in frequency units (MHz) (See inset of Supplementary Fig. 16).

CASR protocol

We applied a pulse sequence which was synchronized with the sensing RF signal and consisted of concatenated XY8-2 subsequences repeated so that the timing between them was an integer number of the RF period. For each XY8 sequence, we used 5 μs-long laser pulses and π-pulses of 8 ns for initialization/readout and MW manipulation, respectively. We sensed an RF frequency νRF ~ 18 MHz by setting the interpulse delay τ = 14 ns. To get a relative frequency Δν = 1000 Hz, the RF was shifted to νRF = 18.001 MHz. A total measurement time tm of 2 seconds was utilized. The detected time trace was then Fourier transformed and the magnitude plotted in Fig. 3i. The resulting peak in the frequency domain was fitted with a modified Lorentzian function to determine the full width half-maximum. The signal was the result of 1000 averages.