Single Nitrogen-Vacancy-NMR of Amine-Functionalized Diamond Surfaces

Nuclear magnetic resonance (NMR) imaging with shallow nitrogen-vacancy (NV) centers in diamond offers an exciting route toward sensitive and localized chemical characterization at the nanoscale. Remarkable progress has been made to combat the degradation in coherence time and stability suffered by near-surface NV centers using suitable chemical surface termination. However, approaches that also enable robust control over adsorbed molecule density, orientation, and binding configuration are needed. We demonstrate a diamond surface preparation for mixed nitrogen- and oxygen-termination that simultaneously improves NV center coherence times for emitters<10-nm-deep and enables direct and recyclable chemical functionalization via amine-reactive crosslinking. Using this approach, we probe single NV centers embedded in nanopillar waveguides to perform $^{19}\mathrm{F}$ NMR sensing of covalently bound trifluoromethyl tags in the ca. 50-100 molecule regime. This work signifies an important step toward nuclear spin localization and structure interrogation at the single-molecule level.

Elucidating molecular structure at the single-to few-molecule level is an important goal in analytical chemistry, biochemistry, and molecular biology. It allows to study functional differences in populations that possess static disorder. As a popular structural probe, nuclear magnetic resonance (NMR) spectroscopy enables identification of atomic arrangements and hierarchical ordering in molecules using the resonant frequency of atomic nuclear spins. However, conventional NMR spectroscopy suffers from poor sensitivity due, in part, to intrinsically small nuclear spin polarizations in thermal equilibrium at room temperature. 1 Alternatively, a powerful route to realize highly sensitive nanoscale-NMR employs nitrogen-vacancy (NV) centers in diamond. [2][3][4] The NV center is a fluorescent crystal defect in the diamond lattice composed of a substitutional nitrogen and adjacent vacancy that can act as an atomic-sized sensor for small magnetic moments. [5][6][7] For sensing nuclear spins at diamond surfaces, it is critical to stabilize shallow (<10-nm-deep) NV centers, preserve their coherence properties, and control adsorbed molecule density, orientation, and binding configuration.
Although functionalization of the diamond surface itself is possible using a variety of chemical attachment strategies, [8][9][10][11] such modifications can be detrimental to near-surface NV centers. Charge state conversion from the useful negatively charged NV centers to the neutral state due to surface charge traps or band bending renders the defect ineffective. [12][13][14] Moreover, detection sensitivity is worsened in shallow NV centers from surface magnetic impurities. [15][16][17] Promising chemical approaches to minimize surface noise include fluorination, 18 nitrogen termination, 19-21 or oxygen-termination. 22-25 On oxygen-terminated diamond, for instance, carboxyl groups can then be used to attach molecules of interest using carbodiimide crosslinker chemistry. 26 However, immobilization density and surface passivation with adsorbed analytes are difficult to control when limited solely by the native surface density of residual chemically addressable surface groups.
Atomic layer deposition (ALD) may be used to grow 1-2-nm-thick adhesion layers for dense molecular self-assembly. Recent reports have utilized this method with chemical modification by phosphate or silane anchoring groups to enable NMR detection of molecular films in ensemble NV measurements 27 and to develop biocompatible surface architectures for NV sensing. 28 Still, this method can result in decreased coherence of near-surface NV centers, and adds distance between the NV sensor spin and target surface spins of interest. The signal-generating dipolar interaction inversely scales with the third power of this separation distance. Thus, highly sensitive nuclear spin detection with single NV centers would benefit from direct molecular attachment to the diamond surface. [29][30][31][32][33] Dense molecular assemblies of silane molecules may instead be formed without adhesion layers on oxygen-terminated diamond, anchored to surface hydroxyl moieties. [34][35][36] Indeed, we have successfully performed surface NMR sensing of 19 F with shallow NV centers without ALD layers for vapor-deposited films of trimethoxy(3,3,3-trifluoropropyl)silane, as well as films of (3-aminopropyl)trimethoxysilane with subsequent amine-reactive crosslinking of trifluoromethyl tags (Supplementary Information Figure S1). However, the mechanisms of silanization chemistry of surfaces is still not completely understood, [37][38][39] and preventing multilayer formation or film degradation under aqueous conditions and air exposure is a major challenge. 40,41 Improved surface treatments are necessary that simultaneously enable predictable molecular attachment and stabilization of shallow NV sensors. Here, we demonstrate direct chemical functionalization of mixed nitrogen-and oxygen-(N/O-) terminated diamond for surface NMR spectroscopy with single NV centers ( Figure 1). Starting with O-terminated diamond obtained through thermal annealing, the composition of mixed N/O surface termination is controlled with exposure to ammonia (NH 3 ) plasma. We show reversible surface functionalization of amine groups introduced by plasma exposure using derivatization; N -hydroxysuccinimide (NHS) ester crosslinking chemistry is used to attach fluorescent dye molecules by stable amide bond formation. We find at short plasma exposure times that the mixed N/O-terminated surfaces improve the coherence time of <10nm-deep NV centers compared to only O-annealed surfaces. We finally functionalize diamond nanopillars hosting single NV centers with trifluoromethyl tags to detect the magnetic field variance arising from surface-bound 19 F spins. Within the sensing volume of each NV, we estimate detection of ca. 50-100 surface-bound molecules. This surface functionalization demonstrates the generalizability of our immobilization protocol, as well as the persistent stability of shallow NV centers after chemical attachment of proximal molecules for nanoscale NMR.
Low diamond surface roughness is essential for surface sensing as it facilitates the formation of highly ordered chemical termination, which increases the coherence time of nearsurface NV centers. 23 Bulk and membrane samples (the latter for nanofabrication of pillar arrays) are recessed using Ar/Cl 2 and and O 2 inductively coupled plasma -reactive ion etching (ICP-RIE). This step is followed by cleaning in a tri-acid mixture of H 2 SO 4 :HClO 4 :HNO 3 at 120°C to remove graphitic carbon on the surface as a result of the O 2 etching (Step 1, Figure 1b). Using this procedure we achieve surface roughness <0.2 nm-rms (Supplementary Information Figure S2).
To create shallow NV centers, recessed diamond samples are implanted with 15 N + ions with controllable density and depth (Step 2, Figure 1b). Implantation energies of 5 or 7 keV and fluences of 10 9 cm −2 are used, yielding an expected average implantation depth of 8.0(31) and 10.8(40) nm respectively (Supplementary Information Figure S3). 42 Annealing at 800°C for 2 h under high vacuum (< 5 × 10 −8 mbar) converts implanted 15 N + ions into NV centers due to vacancy migration. Nanopillar arrays are then patterned on membrane samples via electron-beam lithography (Step 3, Figure 1b) for higher photoluminescence collection efficiency and to provide a map to selectively address and revisit the same NV centers for repeated characterization. 43 Samples are subsequently thermally annealed under an oxygen atmosphere at 460°C so as to remove further graphitic carbon and to terminate the diamond surface with oxgyen (Step 4, Figure 1b). Using an analogous oxygen annealing procedure, Sangtawesin et al. recently demonstrated improvements in coherence (T 2 ) times of shallow NV centers of up to a factor of four compared to acid-cleaned diamond surfaces, which was attributed to a highly ordered, predominantly ether-terminated surface. 23 Similarly, we see an improvement in NV optical contrast using both continuous wave (cw) and pulsed optically detected magnetic resonance (ODMR) measurements, and factor of two improvement in coherence and Rabi decay times of NV centers following oxygen annealing (Supplementary Information Figure S4).
Although suggested to be beneficial for near-surface NV stability, the resulting scarcity of hydroxyl or carboxylic acid functional groups on O-terminated surfaces by thermal annealing in oxygen precludes straightforward functionalization with molecules of interest. Here, we incorporate additional reactive amine terminal groups for subsequent molecular attachment by introducing a 50 W rf of 13.56 MHz NH 3 plasma treatment to O-annealed surfaces for mixed N/O-termination (Step 5, Figure 1b). This approach mitigates full conversion to a surface that exhibits negative electron affinity (characteristic of fully amine-terminated diamond), 44 which can be detrimental for NV stability. We note that alternative diamond amination procedures using NH 3 , N 2 , or mixed-source plasmas have been developed previously, but with hydrogen-terminated diamond as a starting surface or without characterizing their influence on the photophysical properties of near-surface NV centers. [45][46][47][48][49] Changes to the chemical composition of the surfaces exposed to 0, 20, 40, and 60 s of NH 3 plasma are characterized using X-ray photoelectron spectroscopy (XPS) on bulk oxygenannealed diamond samples. A decrease in elemental percentage of oxygen in the sampling depth (ca. ≤6 nm) is accompanied by an increase in nitrogen to 3% after 60 s (Figure 2a,b). These percentages are obtained by integration of O 1s, N 1s, and C 1s signals after adjusting for photoionization cross sections of the core electron species. 50 The emergent N 1s peak position at 398.4 eV suggests predominately single-bonded C-N and/or double-bonded C=N, while nitrile groups may be excluded. 19,51 Analysis of high-resolution C 1s spectra shows a dominant peak at 284.8 assigned to sp 3 carbon, a shoulder at ca. 1 eV lower binding energy attributed to sp 2 carbon, and satellite peaks at higher binding energy due to carbon-oxygen binding ( Figure 2c). 23, 52 The NH 3 plasma treatment reduces the already low amount of sp 2 carbon on the diamond surfaces with increasing exposure time ( Figure 2d). The highresolution O 1s signals can be fit with a C-O-C (ether) assignment at 531.9 eV and C-O-H (hydroxyl) contribution at ca. 1 eV lower binding energy (Figure 2e). 23 The relative ratio of these two peaks for oxygen-annealed diamond is ca. 5:1, and decreases to ca. 2:1 after 60 s plasma exposure (Figure 2f ).
The presence of reactive amines on the mixed N/O-terminated diamond surface is determined using complementary fluorescence microscopy characterization (Figure 3a,b). Amine groups are derivitized by incubating surfaces with a sulfo-Cy3 NHS ester dye designed to bind selectively via amine-reactive crosslinking. From 20 s to 60 s exposure time, increasing relative fluorescence intensity is observed above the O-terminated background regions. These results indicate clearly the tunability of available amine groups and surface density of adsorbed molecules. This functionalization is also reversible (Figure 3c,d). We show that surfaces can be reset by treating with 75% H 2 SO 4 at 60°C for 5 h in order to break the amide bonds formed between the adsorbed molecules and aminated surface, indicated by total loss of fluorescence relative to the background region. A repeated functionalization of the surface by incubating with sulfo-Cy3 NHS ester again shows fluorescence from the region originally exposed to NH 3 plasma, albeit at lower intensity. The reduction in intensity is likely due to partial loss of surface-bound amine groups following the reset, resulting in a lower surface density of dye molecules. Still, this proof-of-principle recyclability may be optimized to preserve a higher percentage of reactive functional groups for repeated analysis.
We next test how the NH 3 plasma treatment affects the sensing properties of shallow NV centers. Figure 4a shows representative confocal fluorescence images of bulk diamond surfaces containing individually resolvable NV centers before and after 20 s plasma exposure. The plasma treatment causes background fluorescence to decrease, making it easier to distinguish fluorescent NV centers from bright surface impurities. Next, individual NV centers are identified and characterized using OMDR, wherein the NV center is first illuminated with a green laser (λ = 532 nm) to polarize the electron spin into the m s = 0 state. b) Fluorescence intensity measured as relative fluorescence units (RFU) of patterned square regions exposed to NH 3 plasma over oxygen-only-terminated background regions (RFU = 1). N = 5 per condition. Error bars represent standard errors of the means. Inset shows a representative fluorescence microscopy image of a dyefunctionalized square region exposed to 60 s plasma (scale bar, 0.2 mm). c) Schematic of surface recyclability. d) Fluorescence linescans (average of N = 5 per condition) from the same exposed square region on a diamond surface after sulfo-Cy3 NHS ester functionalization (1), after resetting the surface with sulfuric acid (2), and after a second dye functionalization step (3). Errors represent standard deviation.
Applying a subsequent microwave field at the Larmor frequency of the electron spin drives transitions between the optically polarized m s = 0 (bright) state and the m s = ±1 (dark) states. Finally, readout is performed by integrating the emitted photons during a second green laser pulse. The measurement sensitivity scales linearly with ODMR contrast, which is defined as the ratio of integrated fluorescence of the bright vs dark states. 6 We find that increased plasma exposure time is accompanied by a decrease in the number of NV centers that display an ODMR signal (Figure 4b). The survival rate is calculated by determining the number of NV centers with an ODMR signal detected per scan area after plasma treatment, and normalized to the number of detected NV centers prior to exposure (Supporting Information Figure S5). Approximately two-thirds of NV centers remain following 20 s plasma exposure, which drops below 50% after 40 and 60 s. Consequently, we opted to use a nanostructured diamond membrane for further testing such that we could track the same NV centers before and after treatment. Figure 4c shows a representative fluorescence map of one nanopillar array after a 20 s plasma treatment. Analogous to the bulk samples, a decrease in fluorescence background is observed, in addition to a decrease in the number of pillars containing NV candidates with detectable ODMR signals. Encouragingly, no significant difference in the mean pulsed-ODMR contrast nor the mean photoluminescence of NV centers is determined before vs after 20 s plasma exposure (Figure 4d,e).
We compare the coherence properties of NV centers using a Carr-Purcell-Meiboom-Gilltype (CPMG) multi-pulse dynamical decoupling protocol, 53,54 which is illustrated in Figure 4f. After an initial π/2 pulse, a train of π pulses follows which refocuses the spin. A final π/2 pulse maps the coherence back to the initialized bright state. When increasing the evolution time between the π pulses, we observe a signal decay with which we associate the T 2,CPMG time. To compensate for brightness variations, we collect reference traces of an initialization of the m S = 0 and m s = −1 state in parallel. The sequence also allows us to perform NMR spectroscopy. By tuning the inter-pulse delay of the π pulses a CPMG sequence, we match the nuclear Larmor frequency and detect the noise generated by external nuclear spins in a lock-in manner. 55 By quantifying the signal, we estimate the root mean square value of the B field fluctuations produced by external spins. This signal can then be used to infer the depth of the NV center. Fit analysis providing B rms ( 1 H) is performed by a Monte-Carlo model as well as by fitting an analytical model. 16,56,57 From the extracted B rms we infer the depth by inverting 16 where µ 0 denotes the magnetic field constant,h is the reduced Planck's constant, γ H1 = 2π · (42.58 MHz/T) is the gyromagnetic ratio of protons, ρ is the density of the surface proton layer, ∆ is the thickness of this layer and d is the NV center depth. We assume an adsorbed water layer of 1 nm thickness and proton density of ρ = 60 nm −3 . 16, [58][59][60][61] The T 2,CPMG coherence times are shown as a function of NV center depth in Figure 4g. We observe a monotonic decrease in NV center coherence time with increasing proximity to the surface, consistent with previous reports. 23,28,62-64 Promisingly, the Survival rate of NV centers after different plasma exposure times. c) Representative confocal fluorescence image of a nanopillar array hosting NV centers in a diamond membrane. Scale bar is 10 µm. d) Pulsed-ODMR contrast and e) photoluminescence intensity of NV centers in nanopillar waveguides before and after plasma treatment. In the box and whisker plots, black stars show the mean values of the data. Boxes compose the middle 25%-75% of the data. Whiskers extend to 1.5× this interquartile range. Dotted grey lines connect the same NV centers characterized before and after plasma exposure. f ) Dynamical decoupling spectroscopy sequence for detecting nuclear spin signals. g) Coherence time (T 2 , CPMG ) of NV centers as a function of depth within the diamond. Red crosses indicate NV centers from which no ODMR signal could be measured following plasma treatment. Dashed lines are guides for the eye. Data points representing the same NV centers characterized both before and after plasma exposure are indexed. a) and b) correspond to data collected from bulk crystals, while c)-g) correspond to data collected from nanopillar arrays on diamond membranes.
are larger on average after 20 s plasma exposure. In analysis of five NV centers directly compared before and after plasma treatment, we observe increases in T 2,CPMG by as much as 1.8(3) times. Depths and T 2,CPMG values of these NV centers are summarized in Table 1.
In addition, from the data set characterized prior to plasma exposure, we could not measure an ODMR signal from three of the NV centers following 20 s plasma, indicated by red crosses in Figure 4g. We note that these NV centers, with calculated depths of ca. 4.5(8), 5.4(8), and 9.6(28) nm, each exhibited below-average coherence times, suggesting that while the plasma reduces the number of observed NV centers (Figure 4b), it preserves those with the highest stability and sensitivity for performing surface NV-NMR measurements. Finally, we test our N/O-termined diamond NV sensing platform for nanoscale-NMR of surface-bound molecules (Step 6, Figure 1b). Following plasma treatment, a diamond nanopillar sample is incubated with 2,5-dioxopyrrolidin-1-yl 2,2,2-trifluoroacetate to attach trifluoromethyl groups to the surface via amide bond formation (Figure 5a). Functionalization is confirmed by detection of fluorine on the surface via XPS.
Surface NV-NMR spectra are shown in Figure 5b that correspond to the same NV center (NV 4) measured after oxygen-annealing, 20 s plasma treatment, and surface functionalization (Steps 4-6, Figure 1b). Prior to attachment of trifluoromethyl moieties to the surface, the dynamical decoupling spectrum shows only dips in contrast at the frequency corresponding to 1 H spins, attributed mainly to the presence of an adsorbed water layer. After exposure to 20 s plasma, an improvement in coherence time of the NV is evident by reduced signal decay with decreasing frequency and a further pronounced proton signal due to this slower decay. Following attachment of trifluoromethyl tags, a second dip appears in the vicinity of the expected 19 F resonance frequency. Assignment in the NV-NMR spectra is validated by measuring two separate NV centers (NV 4 and NV 6) independently and at distinct magnetic field biases, which shifts the Larmor frequencies of both 1 H and 19 F spins (Figure 5c). We find for NV 4 at the 1 H frequency a B rms of 245(5) nT and 102(5) nT at the 19 F frequency. For NV 6, we find 331 (12) nT and 163(7) nT for these two resonances, respectively. From the proton signals, we estimate the NV depths to be 6.4(2) nm and 6.3(2) nm (Equation (1)). 16,58-61 Modeling the 19 F spin bath as a 2D layer,  where ρ 2D is the density of the 2D layer and γ F19 = 2π · (40.078 MHz/T) is the gyromagnetic ratio of 19 F. By using the depths determined by 1 H NMR, we estimate the surface density of 19 F to be 5(1) 19 F nm −2 and 12(2) 19 F nm −2 for NV 4 and NV 6, respectively. Since each attached sub-unit contains three fluorine atoms per molecule, this corresponds to a molecular surface density of 1.7(5) and 4.0(1) molecules nm −2 . By using the sensitive surface area for a NV center at depth d which produces first 70% of the signal, A = 0.735d 2 (Supporting Information Figure S6), we conclude that 51(15) and 117(10) molecules contribute to the detected signal by each NV center, respectively. 16 In summary, we demonstrate a diamond surface preparation strategy that enables direct chemical functionalization of amine functional groups while improving coherence times of near-surface NV centers for surface NMR spectroscopy. Mixed N/O-terminated surfaces are prepared by thermal annealing under an oxygen atmosphere at elevated temperature and subsequent exposure to NH 3 plasma. This process yields robust and reproducible control over the elemental percentages of nitrogen and oxygen on diamond surfaces. We identify an experimental regime in which two-thirds of shallow NV centers are preserved following NH 3 plasma treatment with improved sensing properties compared to oxygen-annealed surfaces. In particular, we find significant reduction in the background luminescence and up to 1.8(3) times improvement in the coherence times of near-surface NV centers. The use of nanostructured diamond allowed us to compare the same NV centers at different stages of processing, with the additional benefit of improved collection efficiency. Finally, we bind trifluoromethyl tags to surface-bound amine groups and perform NMR spectroscopy at the few-molecule (ca. 50-100 molecules) regime using dynamical-decoupling noise spectroscopy with single NV centers. The presented approach enables a precise preparation of molecular systems of interest at diamond surfaces that may be applied for emergent NV center-based quantum sensing of chemical functionality. [65][66][67][68]

Supporting Information
The Supporting Information provides additional materials and experimental methods, as well as additional data used to evaluate the conclusions in the paper; Figures S1-S7 and Table S1 show data related to XPS characterization and NV-NMR with silanized surfaces, SRIM (The Stopping and Range of Ions in Matter) calculations, atomic force microscopy images, characterization of NV centers following thermal annealing under oxygen, additional characterization of NV centers following exposure to ammonia plasma, integration of the sensitive slice on the surface above each NV center for NMR measurements, and estimated errors from magnetic field measurements and NV center depths.

Notes
The authors declare no competing financial interest.

Mixed N/O Diamond Surface Termination
Diamond samples were baked at 460°C under oxygen atmosphere (AS-Micro, RTP-System, Annealsys; Montpellier, FR) for 4 h to etch away any residual graphitic carbon and to increase the percentage of oxygen termination on the surfaces. To nitrogenate the surface, membranes were exposed to 50 W rf of 13.56 MHz plasma with 20 sccm NH 3 with total pressure in the chamber of 300 mTorr at 80°C for 20, 40, or 60 s (Oxford Instruments PECVD 80+, Abingdon, UK).

Surface Characterization by X-Ray Photoelectron Spectroscopy
X-ray photoelectron spectroscopy was performed using a PHI Quantera SXM photoelectron spectrometer at the Swiss Federal Laboratories for Materials Science and Technology (EMPA, Dübendorf, ZH). A monochromatic Al Kα X-ray source with a 100 µm circular spot size was used under ultrahigh vacuum (1 × 10 −9 mbar). High-resolution C 1s spectra were acquired at a pass energy of 55 eV using a 20 ms dwell time. For all scans, 15 kV was applied with an emission current of 3 mA; an average of 6-10 scans were collected over three distinct regions for each measurement condition. Spectra were analyzed with CasaXPS Software Version 2.3.23PR1.0. A Tougaard background and Gaussian-Lorenzian peak shapes were fit to integrate signals from high-resolution C 1s, O 1s, and N 1s spectra, and to deconvolute contributions to the high resolution C 1s and O 1s signals. In C 1s spectra, the dominant peaks were assigned to sp 3 carbon and calibrated to 284.8 eV as a charge reference.

Surface Functionalization
Functionalization of mixed N/O-terminated diamond surfaces was performed via aminereactive crosslinking. For characterization by fluorescence microscopy, mixed N/O-terminated diamond surfaces were incubated with 10 mM sulfo-Cyanine3 NHS ester dissolved in water for 2 h to attach the fluorescent dye to the surface using NHS ester crosslinking. Surfaces were then rinsed thoroughly with water and IPA and blown dry with nitrogen. For surface NMR measurements, surfaces were incubated for 4 h with 10 mM DPTFA dissolved in a 1:9 ratio of DMSO:H 2 O to attach -CF 3 moieties to terminal amine groups. Surfaces were then rinsed thoroughly with water and IPA and blown dry with nitrogen.

Fluorescence Microscopy of Dye-Functionalized Diamond Surfaces
Fluorescence microscopy was conducted in the The Scientific Center for Optical and Electron Microscopy (ScopeM) at ETH Zurich. Bulk diamond samples without fabricated nanopillar arrays were used to test surface functionalization via fluorescence microscopy. Oxygenannealed samples were treated with 20, 40, or 60 s ammonia plasma using a custom-made alumina mask to expose only 0.4 × 0.4 mm square regions prior to surface functionalization with sulfo-Cy NHS ester. Fluorescence images were collected using a Nikon Ti2-E inverted fluorescence microscope and Orca Fusion BT camera (2304 × 2304 pixels, 6.5 µm × 6.5 µm). To compare relative fluorescence intensity at plasma exposure times of 20, 40, and 60 s, images were collected using a CFI SPlan Fluor ELWD 20 × C (NA 0.45 Ph1 WD 8.2-6.9 mm) objective lens. To compare relative fluorescence intensity from the same exposed square regions after treatment with 60 s ammonia plasma, after surface resetting, and after refunctionalizyation, a CFI Plan Apochromat 4× (NA 0.2 WD 20 mm) objective lens was used. All images were collected with 500 ms exposure and excitation and emission wavelengths of 554/23 nm and 596/30 nm, respectively. Image processing and analysis was performed using ImageJ. S2 Relative fluorescence units were calculated as pixel intensities inside 2 × 2 mm square regions (mixed N/O-terminated) exposed to plasma, and normalized to pixel intensities outside of the square regions (O-terminated background).

Confocal Microscope for NV Measurements and Microwave Instrumentation
Experiments were performed using a custom-built confocal microscope equipped with a green λ = 532 nm frequency-doubled Nd:YAG excitation laser (CNI Laser MSL-FN-532nm) and a 630 − 800 nm detection path using a single-photon avalanche photodiode (Pelkin Elmer SPCM-AQR Series). Optical pulses were generated by an acousto-optic modulator (AOM, Crystal Technology 3200-144) in a double-pass configuration. Gating of arriving photons was realized by time-tagging (NI-PCIe-6363) and software binning of photon counts. Counts were integrated typically for 270 to 380 ns. Typical laser excitation powers were on the order of 500 µW for bulk samples and 100 µW for nano-patterned samples. Microwave pulses for manipulating the electronic spin were synthesized using an arbitrary waveform generator (AWG, Tektronix AWG5014C) and up-converted them using a vector signal generator (Stanford Research Systems SG-386) via IQ modulation. Pulses were subsequently amplified using a broad-band linear amplifier (Amplifier Research 80S1G40). The microwave field at the NV center location origins from a home-build coplanar waveguide (CPW) photo-lithographically defined on a quartz cover-slip and reaches field strengths of typically 700 -1400 µT. The transmission line was terminated by using an external 50 Ω load. A cylindrical samariumcobalt permanent magnet (TC-SmCo, reversible temperature coefficient 0.001% K −1 ) was used to apply the spin-aligning B 0 field (B 0 ∼ 40 mT). The bias field B 0 was aligned with the NV symmetry axis by adjusting the relative location of the permanent magnet and observing the resonances of ODMR scans performed with different magnet positions.

Characterization of NV Centers
Measurements are run in an automated manner. After the manual pre-selection of NV candidates by identifying highly fluorescent spots in confocal scans, we conduct continuous-wave optically detected magnetic resonance (cw-OMDR) experiments to obtain the resonance frequency. of the electron spin transition. To be able to compare also cw-ODMR properties, we ensure that measurements are taken at comparable microwave field strength and laser powers. Subsequently, we perform pulsed experiments for sites full-filling contrast thresholds (> 10%) and count-rate thresholds (> 150 kcts/s). We determine the pulsed contrast and the T 2,CPMG time by fitting the background decay w.r.t the simultaneously recorded references traces for the bright and the dark state. We use for the CPMG-like sequences the phase cycles XY8 as well as XY16. The typical number of decoupling pulses applied was 96 -384.

NV Center Depth Calculation
In order to estimate the depth of the NV centers, we quantify the spin noise produced by a proton layer on top of the diamond.

Estimation of B rms
From the publication of Pham et al. S3 , we fit relation (1) in combination with relation (3) to the experimental data using lmfit. S4 We confirmed that the obtained B rms values coincidence with Monte-Carlo simulations used before in the group to estimate the depth.
Translating B rms to depth After obtaining the B rms value by fitting, we estimate the expected noise level of a modeled water layer covering the diamond surface. The dipolar coupling energy between the NV center spin and the bath of classical magnetic dipoles is given by The squared magnetic field amplitude of the fluctuations of a single nuclear spin on the NV center axis for precessing in the plane perpendicular to the NV axis can be expressed aŝ where θ 0 denotes the angle of 54.7°between the NV center axis and the axis of the surface normal of a 100 cut diamond. For an adsorbate layer of finite thickness, we integrate this expression to Here, we use µ I =hγ I /2 for nuclear spins with I=1/2 and γ I in units of rad s −1 T −1 . For γ I in Hz T −1 replaceh with h. To find the depth, we numerically invert relation (3) and solve only for real and positive solutions of d. The factor under-braced in (3) shows the correction for a layer of finite thickness ∆. The influence of it for estimating the thickness is plotted in Figure S7a.

NV-NMR and Surface Density Calculation
For a 2D layer of surface spins, we integrate relation (2) only for x and y and evaluate at z = d. We find By using the previously calculated depth d of the NV center based on the proton NMR, we estimate the surface density ρ 2D . Note that a small error in the inferred depth can have tremendous implications for the estimated density due to the d −4 dependence. The determined depth is itself dependent on the assumed water layer thickness (c.f. Figure S7b). Table S1 reports the estimated surface densities for various thickness assumptions.

Sensitive surface area
The sensitivity profile from (2) is plotted in Figure S6. We numerically integrate and find the region that contributes 50% to B 2 rms or 70% to B rms . This area is estimated to A = 0.735 d 2 .
For the 3D case, the corresponding sensitive volume is V = (0.98d) 3 . Figure S1: Surface functionalization via silanization and characterization using X-ray photoelectron spectroscopy (XPS) and NV-NMR. b) a) Figure S2: Atomic force microscope (AFM) images of an electronic grade diamond a) after tri-acid cleaning, before nanofabrication, and b) after 1 hour of ArCl 2 ICP RIE followed by three cycled etches comprising 5 min of ArCl 2 and 10 min of O 2 . The total etch procedure removes 5.5 µm of material to visibly remove damage from mechanical polishing and smooth the surface.  Figure S7: Scaling of the estimated B rms as a function of the assumed surface layer thickness for various NV depths. a) Square root of the under-braced factor in (3). b) Error of the estimated depth for NVs when varying the assumed adsorbate layer thickness. We calculate the expected B rms for NVs that are 3, 5 and 8 nm deep when a 1-nm-thick water-layer is present. Then, we invert (3) to find the depth again and vary ∆. We plot the relative deviation of the inferred depth as a function of ∆ compared to the "true" depth.