Table of Contents
Fetching ...

A Deep-Learning-Boosted Framework for Quantum Sensing with Nitrogen-Vacancy Centers in Diamond

Changyu Yao, Haochen Shen, Zhongyuan Liu, Ruotian Gong, Md Shakil Bin Kashem, Stella Varnum, Liangyu Li, Hangyue Li, Yue Yu, Yizhou Wang, Xiaoshui Lin, Jonathan Brestoff, Chenyang Lu, Shankar Mukherji, Chuanwei Zhang, Chong Zu

Abstract

Nitrogen-vacancy (NV) centers in diamond are a versatile quantum sensing platform for high sensitivity measurements of magnetic fields, temperature and strain with nanoscale spatial resolution. A common bottleneck is the analysis of optically detected magnetic resonance (ODMR) spectra, where target quantities are encoded in resonance features. Conventional nonlinear fitting is often computationally expensive, sensitive to initialization, and prone to failure at low signal-to-noise ratio (SNR). Here we introduce a robust, efficient machine learning (ML) framework for real-time ODMR analysis based on a one-dimensional convolutional neural network (1D-CNN). The model performs direct parameter inference without initial guesses or iterative optimization, and is naturally parallelizable on graphics processing units (GPU) for high-throughput processing. We validate the approach on both synthetic and experimental datasets, showing improved throughput, accuracy and robustness than standard nonlinear fitting, with the largest gains in the low-SNR regime. We further validate our methods in two representative sensing applications: diagnosing intracellular temperature changes using nanodiamond probes and widefield magnetic imaging of superconducting vortices in a high-temperature superconductor. This deep-learning inference framework enables fast and reliable extraction of physical parameters from complex ODMR data and provides a scalable route to real-time quantum sensing and imaging.

A Deep-Learning-Boosted Framework for Quantum Sensing with Nitrogen-Vacancy Centers in Diamond

Abstract

Nitrogen-vacancy (NV) centers in diamond are a versatile quantum sensing platform for high sensitivity measurements of magnetic fields, temperature and strain with nanoscale spatial resolution. A common bottleneck is the analysis of optically detected magnetic resonance (ODMR) spectra, where target quantities are encoded in resonance features. Conventional nonlinear fitting is often computationally expensive, sensitive to initialization, and prone to failure at low signal-to-noise ratio (SNR). Here we introduce a robust, efficient machine learning (ML) framework for real-time ODMR analysis based on a one-dimensional convolutional neural network (1D-CNN). The model performs direct parameter inference without initial guesses or iterative optimization, and is naturally parallelizable on graphics processing units (GPU) for high-throughput processing. We validate the approach on both synthetic and experimental datasets, showing improved throughput, accuracy and robustness than standard nonlinear fitting, with the largest gains in the low-SNR regime. We further validate our methods in two representative sensing applications: diagnosing intracellular temperature changes using nanodiamond probes and widefield magnetic imaging of superconducting vortices in a high-temperature superconductor. This deep-learning inference framework enables fast and reliable extraction of physical parameters from complex ODMR data and provides a scalable route to real-time quantum sensing and imaging.
Paper Structure (6 sections, 4 figures)

This paper contains 6 sections, 4 figures.

Figures (4)

  • Figure 1: NV-Center Sensing Scheme and Monte-Carlo Fitting Characterization (a) An NV center in a diamond lattice. An NV center is a substitutional nitrogen (N) atom adjacent to a lattice vacancy (V). The lattice structure illustrates the four possible NV crystallographic orientations. (b) Schematic of NV centers in diamond under optical excitation. A 532 nm laser initializes and reads out the spin state via spin-dependent photoluminescence (PL), while microwave (MW) fields drive spin transitions. (c) Ground-state energy level structure of the NV center. The spin-triplet ground state ($S=1$) exhibits a zero-field splitting $D_{gs} \approx 2.87$ GHz at room temperature and the splitting is sensitive to temperature with a typical coefficient $\mathrm{d}D_{gs}/\mathrm{d}T \approx -70$ kHz/K. Furthermore, the $|m_s=\pm1\rangle$ states degeneracy is lifted via the Zeeman effect with splitting $\delta = 2 \gamma_{e} B_{\parallel}$ under external magnetic field. (d) Representative ODMR spectrum of NV ensemble in a nanodiamond displaying the characteristic double-dip feature of $|0\rangle \leftrightarrow |\pm 1\rangle$ transitions. Here we intentionally choose a spectrum with low SNR, $\mathrm{SNR}=5.33$ (e) Estimation error as a function of SNR (fixed at 200 Monte Carlo (MC) iterations). Inset: Convergence of MC fitting error versus iteration count at fixed SNR ($\approx 12$), showing reduced variance, at the expense of increased computational latency.
  • Figure 2: Model Architecture and Performance Validation on Synthetic Data (a) Schematic of the proposed 1D-CNN architecture, comprising 5 convolutional layers for feature extraction followed by 3 fully connected layers ($\sim 70$ M parameters). (b) Prediction success rate for center frequency as a function of SNR ($N=1,024$). A prediction is classified as successful if the absolute center frequency error is $< 0.003$ (normalized frequency range to $[0,1]$). (c) Scatter plot of estimation errors for the center frequency across varying SNR levels. Inset: Expanded view of the error distribution at SNR $= 6.93$, highlighting significant outliers attributed to Monte-Carlo fitting failures. (d) RMSE of the estimated center frequency versus SNR. The black dashed line indicates the expected Poisson noise scaling, while colored dashed lines represent the algorithmic error floor determined from noise-free synthetic data, due to model capacity or floating point error. Inset: Wall-clock runtime comparison between Monte Carlo (MC) fitting (683 s), CNN inference (2.94 ms), and the Hybrid approach (10.8 s) for 5000 spectra. (e) Prediction error of the center frequency versus SNR. Red error bars represent the CNN-predicted aleatoric uncertainty ($1\sigma$) for individual spectra, illustrating the expected decrease in uncertainty at higher signal levels. Inset: Distribution of standardized residuals. The close agreement with a standard normal distribution validates the calibration of the model's aleatoric uncertainty estimates.
  • Figure 3: Calibration on Experimental Data and In Vivo Thermometry (a) Scatter plot of estimation errors across varying SNR levels. The high-SNR reference dataset (SNR $\approx 249$) serves as the ground truth. Inset: Expanded view of the error distribution at SNR $= 4.51$, highlighting significant outliers attributed to Monte-Carlo fitting failures. (b) Temperature dependence of the center frequency (Zero-Field Splitting, $D$). Linear regression of the Machine Learning inference (orange) and hybrid fitting (green) yields thermal coefficients $dD/dT = -66.5$ kHz/$^\circ$C ($R^2 = 0.9844$) and $-65.0$ kHz/$^\circ$C ($R^2 = 0.9859$), respectively. (c) Histogram of pixel-wise center frequencies at $T = 32^\circ$C ($N=19,618$ pixels, SNR $>5$). The distribution is centered at $2.8689$ GHz with a Full-Width at Half-Maximum (FWHM) around $0.5$ MHz, corresponding to a temperature variance of $\pm3.8$$^\circ$C. Inset: Wide-field fluorescence image of drop-cast nanodiamond clusters, averaged over 2,000 frames. (d) Validation in biological systems. Schematic of ND bio-sensing and FCCP-induced thermogenesis. FCCP dissipates the mitochondrial proton gradient, thereby releasing metabolic energy as heat. Consequently, FCCP-treated cells exhibit elevated intracellular temperatures compared to wild-type controls. Right panel: Image of peritoneal exudate cell under white light. (e) Intracellular temperature measurements comparing $4$ untreated control and $5$ FCCP-treated cells. Hybrid fitting extracts average temperatures of $28.4 \pm 2.3^\circ$C (untreated control) and $36.2 \pm 4.7^\circ$C (FCCP). In comparison, the CNN prediction yields $31.8 \pm 2.2^\circ$C (untreated control) and $43.8 \pm 4.3^\circ$C (FCCP). Both methods successfully capture the relative warming trend induced by the uncoupler. P-values between untreated control and FCCP-treated groups: CNN: 0.0013, Hybrid: 0.017. P-values between methods: untreated control: 0.21, FCCP: 0.14.
  • Figure 4: Magnetic Field Imaging of Superconducting Vortices using NV Centers (a) Illustration of the Meissner effect and vortex formation in a Type-II superconductor. External magnetic field lines are expelled from the bulk material, while discrete magnetic flux quanta penetrate the superconductor in the mixed state. (b) Magnetic stray field map of the BSCCO flake reconstructed by the 1D-CNN at $T=60$ K under a $1.25$ G bias field. Superconducting vortices are clearly resolved as distinct dark dots. (c) Reconstruction error (RMSE) of the magnetic field map as a function of SNR. The network inference (orange) is compared with single-shot least-squares fitting using optimized (dark blue, center $= 0.5$) and perturbed (light blue, center $= 0.45$) initial guesses. While the network maintains low error across the range, the fitting method with poor initialization degrades significantly at low SNR. SNR levels correspond to different signal averaging times, with the dataset from the longest integration time serving as the ground truth reference.