Introduction

Hexagonal boron nitride (hBN) has come to prominence as a host material for optically addressable spin defects for quantum technology applications1,2,3,4. The layered van der Waals structure of hBN makes it particularly appealing for nanoscale quantum sensing and imaging, as the spin defects can in principle be confined within hBN flakes just a few atoms thick5. The prospect of two-dimensional (2D) confinement of a dipolar spin system is also attractive for quantum simulations, as it would open the door to realising exotic ground-state phases such as spin liquids6,7 as well as exploring many-body localisation and thermalisation in 2D8,9,10,11,12. To date, only the negatively charged boron vacancy (\({V}_{{{\rm{B}}}}^{-}\)) defect has been used for such quantum applications1. The \({V}_{{{\rm{B}}}}^{-}\) defect is a ground-state spin triplet (S = 1) with a quantisation axis along the c-axis of the hBN crystal and a zero-field splitting of D ≈ 3.45 GHz between the mS = 0 and mS = ± 1 spin sublevels. Owing to a spin-dependent intersystem crossing, the electronic spin transitions of the \({V}_{{{\rm{B}}}}^{-}\) defect, i.e. \(\left\vert 0\right\rangle \leftrightarrow \left\vert \pm 1\right\rangle\), can be probed via optically detected magnetic resonance (ODMR). The sensitivity of these transitions to the defect’s environment in turn enables accurate measurements of magnetic fields, temperature and strain, as well as spatial imaging of these fields13,14,15,16,17,18,19,20.

Meanwhile, several groups have reported the observation of a family of hBN defects emitting primarily at visible wavelengths and exhibiting ODMR with no apparent (or very weak) zero-field splitting21,22,23,24,25 akin to an effective spin doublet (S = 1/2). The exact structure of these defects as well as their spin multiplicity remain unknown, although they are generally believed to be related to carbon impurities21,26,27,28,29. The deterministic creation of these spin defects is also an ongoing challenge3,21,25 and consequently, these S = 1/2-like defects have not been exploited in sensing applications despite the unique possibilities afforded by the lack of intrinsic quantisation axis. More generally, having multiple optically addressable spin systems within a single layered solid would open new opportunities for quantum technologies. In this Article, we demonstrate the co-existence of two distinct optically addressable spin species in hBN.

Results

The two spin defects at the heart of this work are represented in Fig. 1a. The first is the \({V}_{{{\rm{B}}}}^{-}\) defect, which emits in the near-infrared1. The second spin species is the carbon-related defect emitting in the visible, which we will refer to as C?—a proposed candidate is the carbon trimer C2CN28,29. We found that these C? spin defects are present in a variety of hBN samples both commercially sourced (powders and bulk crystals) and lab-grown by metal-organic vapour-phase epitaxy (MOVPE), see Table 1. In the following, we leverage the unique characteristics of each sample to demonstrate the isotropic character of the C? defects (using hBN powder), explore the interplay between \({V}_{{{\rm{B}}}}^{-}\) and C? spins (using a bulk crystal), and demonstrate quantum sensing using the C? defect (using a thin MOVPE film).

Fig. 1: Multiple optically addressable spin defects in hBN.
figure 1

a Schematic representation of two co-existing species of spin defects in hBN: the boron vacancy defect (\({V}_{{{\rm{B}}}}^{-}\), orange arrows) and a carbon-related defect (referred to as C?, purple arrows). An example candidate for C? is shown, namely the C2CN defect. b Photoluminescence (PL) spectra of hBN powder as received (dotted line) and after electron irradiation (solid line), under λ = 532 nm laser excitation. The shaded areas indicate the main emission band of C? (present in the as-received powder) and \({V}_{{{\rm{B}}}}^{-}\) (created by irradiation). c Optically detected magnetic resonance (ODMR) spectra of the \({V}_{{{\rm{B}}}}^{-}\) defects (PL band 750–1000 nm) in hBN powder at B0 = 0 (grey line) and B0 = 30 mT (blue). d Energy level diagram of the \({V}_{{{\rm{B}}}}^{-}\) spin triplet. The spin eigenstates are denoted as \(\left\vert 0,\pm \right\rangle\) in the general case of an arbitrarily oriented magnetic field. The graph shows the calculated spin resonance frequencies fr as a function of B0 for a range of field orientations. e ODMR spectra of the C? defects (PL band 550-700 nm) in the same hBN powder as in (c), at different field strengths B0 from 30 mT to 150 mT (left to right). f Energy level diagram of the C? effective spin doublet. The graph shows the spin resonance frequency fr inferred from (e) as a function of B0 (dots). The solid line is a linear fit, indicating a g-factor of 2.0(1).

Table 1 Summary of the hBN samples used in this work

Co-existence of \({V}_{{{\rm{B}}}}^{-}\) and C?

We first consider a commercially sourced hBN powder (see Table 1 and Supplementary Figs. 25). The photoluminescence (PL) spectrum of the as-received powder under laser excitation (λ = 532 nm wavelength) shows visible PL emission characteristic of the C? defect21, mainly centred around λ = 550–650 nm with a tail extending in the near-infrared up to 900 nm [Fig. 1b]. To create \({V}_{{{\rm{B}}}}^{-}\) defects, the as-received powder was irradiated with high-energy electrons, causing the appearance of a broad near-infrared emission peak centred around 820 nm characteristic1 of the \({V}_{{{\rm{B}}}}^{-}\) defect [Fig. 1b].

Next, we used radiofrequency (RF) fields to probe the spin transitions of the defects via spin-dependent PL. A continuous-wave (CW) ODMR spectrum of the \(S=1\,{V}_{{{\rm{B}}}}^{-}\) defect ensemble is obtained by collecting the \({V}_{{{\rm{B}}}}^{-}\) emission (750–1000 nm) as a function of RF frequency [Fig. 1c]. Under zero magnetic field (B0 = 0), a single resonance at fr = D ≈ 3.45 GHz is observed corresponding to the nearly degenerate electronic spin transitions \(\left\vert 0\right\rangle \leftrightarrow \left\vert \pm 1\right\rangle\) [see energy level diagram in Fig. 1d]. Upon applying a magnetic field, this central resonance splits into two broad resonances due to the Zeeman effect, where the significant broadening is the result of the random orientation of the defects in the powder, as shown in the resonance frequencies calculated for a range of orientations [Fig. 1d].

On the other hand, the ODMR spectrum of the C? defects (550–700 nm) shows a single resonance at a frequency fr that scales linearly with the applied field B0 [Fig. 1e], thus resembling a S = 1/2 electronic system. Fitting the data with hfr = gCμBB0 where h is Planck’s constant and μB the Bohr magneton, yields a g-factor of gC = 2.0(1) [Fig. 1f]. The powdered nature of the sample and the relatively large orientation-averaged ODMR contrast (of about −1%) provide a strong indication that the mechanism underpinning ODMR is intrinsically isotropic, i.e. independent of the direction of the applied field relative to the crystal orientation, rather than relying on an intersystem crossing in a S≥1 spin system as was suggested previously23.

Spin multiplicity of the C? defect

To gain further insights into the nature of the C? spin defect and the origin of the ODMR contrast, we now use a flake exfoliated from a bulk electron-irradiated hBN crystal (see Table 1 and Supplementary Figs. 6, 7, here the ODMR contrast is about  + 0.5%). The single crystal orientation allows us to align the magnetic field with the \({V}_{{{\rm{B}}}}^{-}\) spin’s quantisation axis and drive a single spin transition, e.g. \(\left\vert 0\right\rangle \to \left\vert -1\right\rangle\) [Fig. 2a], whose coherent dynamics can then be precisely compared to that of the C? spins. First, we perform a Rabi experiment whereby each spin ensemble is driven by a resonant RF pulse of variable duration and the corresponding PL monitored [Fig. 2b]. Rabi oscillations are observed both for the \({V}_{{{\rm{B}}}}^{-}\) ensemble [Fig. 2c] and the C? ensemble [Fig. 2d], demonstrating coherent control and optical readout of two distinct spin species within the same host material, at room temperature.

Fig. 2: Coherent spin control at room temperature and S = 1/2 character of the C? defect.
figure 2

a Diagram depicting the spin resonance frequencies fr of the \({V}_{{{\rm{B}}}}^{-}\) and C? defects as a function of the magnetic field strength B0 applied parallel to the c-axis of the hBN crystal. b Pulse sequence used for the Rabi measurement. c, d Rabi oscillations of (c) the \({V}_{{{\rm{B}}}}^{-}\) defects at B0 = 20 mT and of (d) the C? defects at B0 = 100 mT in an exfoliated single-crystal hBN flake. The resonance frequency being driven is fr = 2.9 GHz in both cases [see circles in (a)]. e Rabi frequency of the C? defects (ΩC) as a function of the Rabi frequency of the \({V}_{{{\rm{B}}}}^{-}\) defects (ΩV). Measurements taken from two different flakes are shown, see raw data in Supplementary Fig. 9. The error bars correspond to one standard error in the Rabi fit, see details in Supplementary Note 5B and Supplementary Figs. 10, 11. The solid lines correspond to the expectation under different assumptions for the spin multiplicity of the C? defects: a single S = 1/2 or a pair of weakly coupled S = 1/2 particles (red line); a pure S = 1 or S = 3/2 system with negligible zero-field splitting (blue line). The dashed line is the ΩC = ΩV reference corresponding to driving a single transition of a S = 1 system.

We can now address the question of the spin multiplicity of the C? defect, making use of the fact that the Rabi flopping frequency (ΩC) directly depends on the spin quantum number (S) of the driven species according to hΩC = f(S)gCμBB1 where B1 is the magnitude of the driving field and f(S) is a dimensionless function of S. To calibrate B1, we measure the Rabi frequency of the \(S=1\,{V}_{{{\rm{B}}}}^{-}\) ensemble, which is given by \(h{\Omega }_{V}={g}_{V}{\mu }_{B}{B}_{1}/\sqrt{2}\) where gV = 2.00 ≈ gC is the \({V}_{{{\rm{B}}}}^{-}\,g\)-factor1, and compare it to ΩC, measured at the same resonance frequency fr [Fig. 2a] to ensure B1 is identical in both Rabi measurements. We find that ΩC is consistently smaller than ΩV, with a ratio \({\Omega }_{C}/{\Omega }_{V}\approx 1/\sqrt{2}\) that reveals the S = 1/2 character of the C? defect’s magnetic resonance [Fig. 2e]. Consequently, we can rule out a pure S = 1 or S = 3/2 system, which would give \({\Omega }_{C}/{\Omega }_{V}=\sqrt{2}\) (blue box, see Supplementary Note 5 A for a detailed discussion).

Rather than a single S = 1/2 system, which is not normally expected to give rise to ODMR, we propose a more specific interpretation whereby the C? defect would instead involve a pair of weakly coupled S = 1/2 particles (e.g. two unpaired electrons). Such a system also satisfies \({\Omega }_{C}/{\Omega }_{V}=1/\sqrt{2}\)30, while providing a more natural explanation for the ODMR contrast by invoking different photon absorption/emission probabilities for the singlet and triplet configurations of the spin pair31,32,33. In this scenario, the optical readout would distinguish the parallel spin states (pure triplet states \(\left\vert \uparrow \uparrow \right\rangle\) and \(\left\vert \downarrow \downarrow \right\rangle\)) from the anti-parallel states (singlet-triplet mixtures of \(\left\vert \uparrow \downarrow \right\rangle\) and \(\left\vert \downarrow \uparrow \right\rangle\)). We provide evidence supporting the spin pair theory in Supplementary Note 5E and Supplementary Fig. 12.

Cross-relaxation between \({V}_{{{\rm{B}}}}^{-}\) and C?

So far we have used the \({V}_{{{\rm{B}}}}^{-}\) and C? spin ensembles independently. We now study the dynamics and interplay between the two spin species. To this end, we use again a single-crystal hBN sample containing both \({V}_{{{\rm{B}}}}^{-}\) and C? spins, and apply a magnetic field to tune the \(\left\vert 0\right\rangle \leftrightarrow \left\vert -1\right\rangle\) transition of the \({V}_{{{\rm{B}}}}^{-}\) spins in resonance with the \(\left\vert \uparrow \right\rangle \leftrightarrow \left\vert \downarrow \right\rangle\) transition of the C? spins [Fig. 3a], here \(\left\vert \uparrow \right\rangle\) and \(\left\vert \downarrow \right\rangle\) refer to the states of either of the spin pair partners]. At the resonant field of B0 = hD/[(gC + gV)μB] ≈ 62 mT, the two spin ensembles can exchange energy causing an increased relaxation of their respective spin populations [Fig. 3a], a process known as cross-relaxation (CR)34,35.

Fig. 3: Cross-relaxation between two optically addressable spin species.
figure 3

a Diagram illustrating the cross-relaxation (CR) resonance condition between the \({V}_{{{\rm{B}}}}^{-}\) and C? spin ensembles, at which the ensembles exchange energy. The populations (circles) are for illustrative purpose only, as the sign and level of spin polarisation of the C? spins is unknown. b Schematic of the pulsed ODMR sequence, which includes an interaction time τ = 350 ns before applying the RF pulse. c, d Pulsed ODMR spectra as a function of B0 for the \({V}_{{{\rm{B}}}}^{-}\) (c) and C? (d) defects near the CR resonance. Lorentzian fits to the individual ODMR spectra are plot together on the right with different colours for the different values of B0. The corresponding raw data is shown in Supplementary Fig. 13. e Spin contrast of each spin ensemble as a function of B0, corresponding to the ODMR contrast extracted from (c, d) after a linear slope was subtracted to remove RF power variations across the frequency range, normalised to 1 away from the CR resonance. The solid lines are the result of a model of the CR effect, see main text.

To probe the CR resonance, we use a fixed free interaction time τ between the initial laser pulse (which partially polarises both spin species) and the probe RF pulse [Fig. 3b], while varying the field strength B0. For each value of B0, the RF frequency of the probe pulse is scanned to construct a pulsed ODMR spectrum [Fig. 3c, d] and extract a normalised spin contrast [plot against B0 in Fig. 3e]. This spin contrast is a measure of the amount of spin polarisation averaged over the sequence, which depends on the CR coupling present during the free interaction time τ as well as during the laser pulse where CR competes with optically induced spin polarisation. Examining the \({V}_{{{\rm{B}}}}^{-}\) spin contrast first, we see that the \({V}_{{{\rm{B}}}}^{-}\) ensemble experiences a reduced spin polarisation at the CR resonance [Fig. 3c], indicating coupling with a bath of S = 1/2 electron spins, which includes the C? defects36,37. Crucially, the C? defects also exhibit a reduced spin polarisation at the CR resonance [Fig. 3d], providing unambiguous evidence of C? -\({V}_{{{\rm{B}}}}^{-}\) coupling.

We model the CR effect by considering the coupling of each spin to its nearest neighbour from the opposite spin species (see details in Supplementary Note 6B and Supplementary Fig. 14). For simplicity we assume the system to be initialised into the interacting state. We note that changing the initialisation using a combination of fast magnetic field control and RF pulses38 could in principle reveal the direction of spin polarisation of the C? defect. For the C? spins, the mean distance to the nearest \({V}_{{{\rm{B}}}}^{-}\) is approximately 5 nm based on the estimated density of \([{V}_{{{\rm{B}}}}^{-}]=1{0}^{18}\) cm−3. The resulting model with no free parameter [purple line in Fig. 3(e)] is in good agreement with the data, confirming that we do indeed detect CR between the C? and \({V}_{{{\rm{B}}}}^{-}\) spin ensembles. For the \({V}_{{{\rm{B}}}}^{-}\) case, we leave the total density of S = 1/2 spins free; best fit to the data is obtained for [S = 1/2] = 5 × 1018 cm−3 corresponding to a mean distance between nearest neighbours of approximately 3 nm. This cross-relaxation experiment thus reveals the high density of S = 1/2 spins in this hBN sample, and could be applied to determine the spin content of hBN flakes subject to various treatments. More generally, the demonstrated coupling between two optically addressable spin species of different multiplicities could be a useful new resource for future quantum technologies.

Magnetic imaging with the C? defect

Having established the S = 1/2 character of the C? defect, we now explore its potential for quantum sensing and imaging. The key advantage of the C? spin is its lack of intrinsic quantisation axis, allowing magnetometry to be performed under any direction of the external magnetic field. This feature is in contrast to spin defects with uniaxial anisotropy such as the \({V}_{{{\rm{B}}}}^{-}\) defect or the nitrogen-vacancy centre in diamond which are restricted to a narrow range of field directions and magnitudes due to spin mixing caused by transverse fields39.

To demonstrate magnetic imaging, we used a 40-nm-thick hBN film grown by MOVPE with precursors tuned to create a dense and uniform ensemble of C? spin defects21,40 (see Table 1 and Supplementary Fig. 8). Importantly, large flakes (hundreds of micrometres laterally) of the continuous wafer-scale film can be transferred from the growth substrate to the target sample [Fig. 4a and Supplementary Fig. 15] while preserving a uniform, well-defined thickness, an advantage over exfoliation from a bulk hBN crystal.

Fig. 4: Magnetic imaging with S = 1/2 defects in hBN.
figure 4

a Schematic of the experiment. A 40-nm-thick hBN film containing C? spins (black arrows) is placed on top of a Fe3GaTe2 flake exhibiting perpendicular magnetic anisotropy (white arrows). The external field \({\overrightarrow{B}}_{0}\) sets the quantisation axis of the C? spins. b Optical micrograph of the hBN film covering multiple Fe3GaTe2 flakes. Inset: magnified view of the Fe3GaTe2 flake studied in (ch). c ODMR spectra taken at the centre of the flake (red data) and outside the flake (black), with B0 ≈ 35 mT pointing along the z direction (θB = 0). The dashed lines are Lorentzian fits. d Stray magnetic field image of a Fe3GaTe2 obtained with the C? defects at room temperature. e Simulated stray field for a uniformly magnetised flake (see details in Supplementary Note 7 C). f Line profile of the measured and simulated stray field across the flake, taken along the dashed line displayed in (e). g, h Stray field images obtained with the same applied field magnitude B0 ≈ 35 mT as in (d) but with an angle (g) θB = 45° and (h) θB = 90°. The blue arrow in (g, h) indicates the direction of the in-plane component of \({\overrightarrow{B}}_{0}\).

As a test magnetic sample, we used micron-sized flakes of Fe3GaTe2, a ferromagnetic van der Waals material with a Curie temperature just above room temperature and a perpendicular magnetic anisotropy41. A single piece of the hBN film enables us to cover a multitude of Fe3GaTe2 flakes [Fig. 4b] which can then be magnetically imaged by performing widefield ODMR measurements of the C? defects. ODMR spectra on and off the magnetic flakes reveal local Zeeman shifts of up to Δfr ≈ 100 MHz [Fig. 4c], corresponding to stray fields ΔB = hΔfr/gCμB ≈ 3 mT. Since the magnitude of the applied field is B0 ≈ 35 mT ≫ ΔB, the measured sample’s stray field ΔB corresponds to the projection along the direction of \({\overrightarrow{B}}_{0}\).

By fitting the ODMR spectrum at each pixel of the image, we can construct a ΔB map of a Fe3GaTe2 flake, for example in Fig. 4d where \({\overrightarrow{B}}_{0}\) is along the easy axis of magnetisation (θB = 0). The flake appears uniformly magnetised, as confirmed by the good agreement with the simulation [Fig. 4e] which assumed a uniform out-of-plane magnetisation of Ms = 160 kA/m, in line with the expected value at room temperature41. A more detailed magnetisation map of the flake can be reconstructed from the data through a reverse propagation method [Supplementary Fig. 18]. A line cut across the flake [Fig. 4f] indicates a spatial resolution of about 600 nm in good agreement with the diffraction limit of our setup, which could be improved to 300 nm using a higher numerical-aperture objective.

As \({\overrightarrow{B}}_{0}\) is rotated away from the easy axis, the stray field becomes weaker overall [Fig. 4g, h] and nearly vanishes in the purely in-plane case (θB = 90). This indicates the formation of multiple domains of opposite signs within the flake in the absence of a stabilising out-of-plane field, consistent with the findings in ref. 41. Note that the pattern of the residual stray field at θB = 90 suggests the remanent magnetisation still points along the easy axis (see Supplementary Fig. 17), confirming the strong out-of-plane anisotropy of the material. Angle-dependent images of additional flakes are shown in Supplementary Fig. 16.

These measurements illustrate the utility of the isotropic C? defect to study micron-sized magnetic samples. The omnidirectional magnetometry allows the application of magnetic fields along arbitrary easy or hard axes and spanning a broad range of magnitudes from about 10 mT (below which the ODMR contrast drops) up to 300 mT or more (only limited by the RF electronics), allowing the precise determination of unknown anisotropies. As an example, it could be applied to test the potential existence of easy axes within in-plane ferromagnets such as monolayer CrCl3, which is believed to exhibit 2D-XY ferromagnetism42 but has not been systematically investigated as a function of the azimuthal angle of \({\overrightarrow{B}}_{0}\). Such measurements are generally inaccessible or impractical with current stray field techniques.

The shot-noise-limited magnetic sensitivity of our 40-nm-thick MOVPE film is about 100 μT/\(\sqrt{{{\rm{Hz}}}}\) per (500 nm)2 pixel (see Supplementary Note 7E), which is an order of magnitude better than that obtained with \({V}_{{{\rm{B}}}}^{-}\) defects in flakes of similar thickness15,16 thanks to the higher brightness of the C? defects. Crucially, this sensitivity is already sufficient to image atomically thin ferromagnets and investigate the emerging field of Moiré magnetism43, for example, and could be boosted by using advanced sensing protocols44,45 and potentially by optimising sample fabrication.

Besides the unique omnidirectional magnetometry capability and the relative ease of fabrication compared to existing quantum sensing platforms like diamond, another advantage of the hBN platform is the possibility of leveraging the multiple spin species available. In particular, the C? defect is an ideal complement to \({V}_{{{\rm{B}}}}^{-}\)-based temperature and strain sensing13 as it is insensitive to variations in those quantities (an expected consequence of its S = 1/2 character and negligible orbital magnetic moment), and remains a reliable magnetometer regardless of sensor geometry (for instance in the presence of flake rippling or powder averaging). In this sense, a co-present C? ensemble can be viewed as augmenting a \({V}_{{{\rm{B}}}}^{-}\) ensemble tasked with temperature and strain sensing, with orientation-independent magnetic sensitivity. We envisage that this dual-spin multi-modal imaging capability will present new opportunities for studying phase transitions where the magnetic properties of a sample can be spatially correlated with the temperature profile or mechanical properties of a sample, and illustrate this capability with a proof-of-principle experiment, see Supplementary Figs. 19, 20.

More generally, the co-existence of two distinct spin ensembles within a single host material, which can both be optically initialised, read out, and coherently driven, at room temperature, distinguishes hBN from established material platforms such as diamond and silicon carbide in which only one type of optically addressable spin defect can generally be stabilised in a given sample46. Combined with the prospect of 2D confinement afforded by the layered structure of hBN, which appears realistic given the recent observation of \({V}_{{{\rm{B}}}}^{-}\) defects in few-layer hBN5, hBN emerges as a rich and promising platform for future quantum technologies.

Methods

Experimental setup

The experiments reported in this work were carried out on a custom-built wide-field fluorescence microscope. The typical experimental setup and conditions are indicated below.

Optical excitation from a continuous-wave (CW) λ = 532 nm laser (Laser Quantum Opus 2 W) was gated using an acousto-optic modulator (Gooch & Housego R35085-5) and focused using a widefield lens (f = 400 mm) to the back aperture of the objective lens (Nikon S Plan Fluor ELWD 20x, NA = 0.45). The photoluminescence (PL) from the sample is separated from the excitation light with a dichroic beam splitter (DBS) and a 550 nm longpass filter. The PL is either sent to a spectrometer (Ocean Insight Maya2000-Pro) or imaged with a scientific CMOS camera (Andor Zyla 5.5-W USB3) using a f = 300 mm tube lens. When imaging, additional shortpass and longpass optical filters were inserted to only collect a given wavelength range. A simplified schematic of the setup is shown in Supplementary Fig. 1 to emphasise that only the PL emission filters are changed when measuring the \({V}_{{{\rm{B}}}}^{-}\) or C? defects. The laser spot diameter (1/e2) at the sample was about 50 μm and the total CW laser power up to 500 mW, which gives a maximum intensity of about 0.5 mW/μm2 in the centre of the spot. For Fig. 4, the laser power at the sample was reduced to 25 mW to minimise laser-induced heating.

Radiofrequency (RF) driving was provided by a signal generator (Windfreak SynthNV PRO) gated using an IQ modulator (Texas Instruments TRF37T05EVM) and amplified (Mini-Circuits HPA-50W-63+). A pulse pattern generator (SpinCore PulseBlasterESR-PRO 500 MHz) was used to gate the excitation laser and RF, as well as for triggering the camera. The output of the amplifier was connected to a printed circuit board (PCB) equipped with a coplanar waveguide and terminated by a 50 Ω termination. The hBN sample was placed above the coplanar waveguide, either in direct contact (Figs. 13) or on a quartz coverslip placed on the PCB (Fig. 4).

The external magnetic field was applied using a permanent magnet, and the measurements were performed at room temperature in ambient atmosphere. The only exception is Fig. 1e, for which the sample was placed in a closed-cycle cryostat with a base temperature of T ≈ 5 K47 which allowed us to apply a calibrated magnetic field using the enclosed superconducting vector magnet.

Sample preparation

The hBN powders used in Fig. 1 and for the dual-spin-species imaging experiment (Supplementary Fig. 19) were sourced from Graphene Supermarket (BN Ultrafine Powder), with a specified purity of 99.0%. Two batches of powder nominally identical but purchased at different times were used: ‘Powder 1’ was purchased in 2022 whereas ‘Powder 2’ was purchased in 2017. The as-received powders were electron irradiated with a beam energy of 2 MeV and a variable dose between 1 × 1018 cm−2 and 5 × 1018 cm−2. No annealing or further processing was performed. The experiments reported in Fig. 1 used Powder 1 with a dose of 2 × 1018 cm−2, whereas the experiments reported in Supplementary Fig. 19 used Powder 2 with a dose of 1 × 1018 cm−2. To form thin films of the hBN powders, the powder was suspended in isopropyl alcohol (IPA) at a concentration of 20 mg/mL and sonicated for 30 min using a horn-sonicator. The sediment from the suspension was drawn using a pipette then drop-cast on a glass coverslip or directly onto the PCB, generally forming a relatively continuous film. Morphological, optical, and spin characterisations of the powder films are presented in Supplementary Note 2.

The hBN single-crystal samples used in Fig. 2 and Fig. 3 were sourced from HQ Graphene, and had a thickness of  ~100 μm and a lateral size of  ~1 mm. The as-received crystals were electron irradiated with a beam energy of 2 MeV and a dose between 2 × 1018 cm−2 and 1 × 1019 cm−2. No annealing or further processing was performed. In Fig. 3, a whole bulk crystal was placed on the PCB and measured. In Fig. 2, a thinner flake ( ~1 μm) was exfoliated from a bulk crystal using scotch-tape and transferred to the PCB. Exfoliation of a thin flake allowed us to achieve a stronger and more uniform RF driving compared to using the whole crystal. Optical and spin characterisations are presented in Supplementary Note 3.

The hBN film used in Fig. 4 was grown by metal-organic vapour-phase epitaxy (MOVPE) on a 2-inch sapphire wafer, using precursors triethylboron (TEB) and ammonia. The growth details can be found in ref. 40. The film used in our work was grown with a TEB flow of 30 μmol/min, and has a thickness of about 40 nm determined by atomic force microscopy. In ref. 21, it was shown that this TEB flow leads to a dense and uniform ensemble of carbon-related optical emitters, including the ODMR-active C? defects studied in this paper. Optical and spin characterisations are presented in Supplementary Note 4. For the magnetic imaging experiment reported in Fig. 4, as a test magnetic sample we used a Fe3GaTe2 crystal purchased from PrMat. Fe3GaTe2 microflakes were first exfoliated in an Argon-filled glove box onto a Si/SiO2 substrate using the scotch-tape technique. Then, the hBN film and Fe3GaTe2 flakes were picked up in sequence by a polycarbonate/polydimethylsiloxane (PC/PDMS) stamp and released onto a quartz substrate. Finally, the PC film was dissolved with chloroform. The quartz substrate was then positioned above a coplanar waveguide to facilitate ODMR measurements. A Fe3GaTe2 flake was located from the reflection image, and then via the PL image where the flake typically appears brighter than the background because it reflects additional PL from the C? defects. Images of the sample throughout the process are shown in Supplementary Note 7.