# Bayesian-Based Hybrid Method for Rapid Optimization of NV Center Sensors

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Methods

#### 2.1. Optimal Control Model of NV Center Ensemble

#### 2.2. The Estimation Model

#### 2.3. The Hybrid Optimization Method

- Sample position: In the sample selection step, instead of completely randomly picking the sample points, we add random bias to evenly distributed coordinate values to obtain the randomly yet uniformly distributed sample positions. This choice improves the estimation performance, especially in cases with small sample numbers.
- Model parameter: Model parameters $\alpha $ and p are selected based on a random initial field ${g}^{\mathrm{ini}}\left(t\right)$ and are fixed during one optimization process. This tactic ensures the monodromy of the objective function and the convergence of the subsequent search process, reduces the computation time spent building the predict function and does not damage the estimation accuracy.
- Cross validation: After constructing a predict function, cross validation is applied to eliminate the low-performing ones. Each function value of the n sample points $y\left(s\right)$ is successively regarded as an unknown quantity and is predicted based on model parameters $\alpha $ and p, and other $n-1$ samples, given a corresponding predict vector ${y}_{\mathrm{pred}}\left(s\right)$. Then, linear fitting is performed on those points located at $\left(y\left(s\right),{y}_{\mathrm{pred}}\left(s\right)\right)$, and we use slope ${p}_{\mathrm{fit}}$ as a criterion. In principle, ${p}_{\mathrm{fit}}$ far away from 1 indicates bad performance of the predictor, and by examining the fitted slope of bad predict models occurred in the optimization process, we found that bad models correspond to small values of ${p}_{\mathrm{fit}}$. Therefore, we set ${p}_{\mathrm{fit}}>0.6$ as the threshold. If this condition is fulfilled, the predict function can be used as the objective function in the following direct search process. Otherwise, a new model needs to be built from the very beginning.

#### 2.4. AC Magnetometry

## 3. Results

#### 3.1. Feasibility of the Estimation Model

#### 3.2. Optimization Efficiency of the B-PM Method

#### 3.3. Sensitivity Improvement in AC Magnetometry

## 4. Discussion

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

PM | Phase-modulated |

B-PM | Bayesian estimation phase-modulated |

SFB | Standard Fourier basis |

B-SFB | Bayesian estimation standard Fourier basis |

FWHM | Full width at half maximum |

DD | Dynamical decoupling |

AC | Alternating current |

DC | Direct current |

PDD | Periodic dynamical decoupling |

CDD | Concatenate dynamical decoupling |

## References

- Taylor, J.M.; Cappellaro, P.; Childress, L.; Jiang, L.; Budker, D.; Hemmer, P.R.; Yacoby, A.; Walsworth, R.; Lukin, M.D. High-Sensitivity Diamond Magnetometer with Nanoscale Resolution. Nat. Phys.
**2008**, 4, 810–816. [Google Scholar] [CrossRef] - Rondin, L.; Tetienne, J.P.; Hingant, T.; Roch, J.F.; Maletinsky, P.; Jacques, V. Magnetometry with Nitrogen-Vacancy Defects in Diamond. Rep. Prog. Phys.
**2014**, 77, 056503. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Casola, F.; van der Sar, T.; Yacoby, A. Probing Condensed Matter Physics with Magnetometry Based on Nitrogen-Vacancy Centres in Diamond. Nat. Rev. Mater.
**2018**, 3, 17088. [Google Scholar] [CrossRef] [Green Version] - Dolde, F.; Fedder, H.; Doherty, M.W.; Nöbauer, T.; Rempp, F.; Balasubramanian, G.; Wolf, T.; Reinhard, F.; Hollenberg, L.C.L.; Jelezko, F.; et al. Electric-Field Sensing Using Single Diamond Spins. Nat. Phys.
**2011**, 7, 459–463. [Google Scholar] [CrossRef] - Hayashi, K.; Matsuzaki, Y.; Taniguchi, T.; Shimo-Oka, T.; Nakamura, I.; Onoda, S.; Ohshima, T.; Morishita, H.; Fujiwara, M.; Saito, S.; et al. Optimization of Temperature Sensitivity Using the Optically Detected Magnetic-Resonance Spectrum of a Nitrogen-Vacancy Center Ensemble. Phys. Rev. Appl.
**2018**, 10, 034009. [Google Scholar] [CrossRef] [Green Version] - Doherty, M.W.; Struzhkin, V.V.; Simpson, D.A.; McGuinness, L.P.; Meng, Y.; Stacey, A.; Karle, T.J.; Hemley, R.J.; Manson, N.B.; Hollenberg, L.C.L.; et al. Electronic Properties and Metrology Applications of the Diamond NV
^{-}Center under Pressure. Phys. Rev. Lett.**2014**, 112, 047601. [Google Scholar] [CrossRef] [Green Version] - Wang, Z.; Kong, F.; Zhao, P.; Huang, Z.; Yu, P.; Wang, Y.; Shi, F.; Du, J. Picotesla Magnetometry of Microwave Fields with Diamond Sensors. Sci. Adv.
**2022**, 8, eabq8158. [Google Scholar] [CrossRef] - Schmitt, S.; Gefen, T.; Stürner, F.M.; Unden, T.; Wolff, G.; Müller, C.; Scheuer, J.; Naydenov, B.; Markham, M.; Pezzagna, S.; et al. Submillihertz Magnetic Spectroscopy Performed with a Nanoscale Quantum Sensor. Science
**2017**, 356, 832–837. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Miller, B.S.; Bezinge, L.; Gliddon, H.D.; Huang, D.; Dold, G.; Gray, E.R.; Heaney, J.; Dobson, P.J.; Nastouli, E.; Morton, J.J.L.; et al. Spin-Enhanced Nanodiamond Biosensing for Ultrasensitive Diagnostics. Nature
**2020**, 587, 588–593. [Google Scholar] [CrossRef] - Li, C.; Soleyman, R.; Kohandel, M.; Cappellaro, P. SARS-CoV-2 Quantum Sensor Based on Nitrogen-Vacancy Centers in Diamond. Nano Lett.
**2022**, 22, 43–49. [Google Scholar] [CrossRef] - Arai, K.; Kuwahata, A.; Nishitani, D.; Fujisaki, I.; Matsuki, R.; Nishio, Y.; Xin, Z.; Cao, X.; Hatano, Y.; Onoda, S.; et al. Millimetre-Scale Magnetocardiography of Living Rats with Thoracotomy. Commun. Phys.
**2022**, 5, 200. [Google Scholar] [CrossRef] - Chen, S.; Li, W.; Zheng, X.; Yu, P.; Wang, P.; Sun, Z.; Xu, Y.; Jiao, D.; Ye, X.; Cai, M.; et al. Immunomagnetic Microscopy of Tumor Tissues Using Sensors in Diamond. Proc. Natl. Acad. Sci. USA
**2022**, 119, e2118876119. [Google Scholar] [CrossRef] [PubMed] - Wang, Z.Y.; Lang, J.E.; Schmitt, S.; Lang, J.; Casanova, J.; McGuinness, L.; Monteiro, T.S.; Jelezko, F.; Plenio, M.B. Randomization of Pulse Phases for Unambiguous and Robust Quantum Sensing. Phys. Rev. Lett.
**2019**, 122, 200403. [Google Scholar] [CrossRef] [PubMed] - MacQuarrie, E.R.; Gosavi, T.A.; Bhave, S.A.; Fuchs, G.D. Continuous Dynamical Decoupling of a Single Diamond Nitrogen-Vacancy Center Spin with a Mechanical Resonator. Phys. Rev. B
**2015**, 92, 224419. [Google Scholar] [CrossRef] [Green Version] - Cao, Q.Y.; Yang, P.C.; Gong, M.S.; Yu, M.; Retzker, A.; Plenio, M.; Müller, C.; Tomek, N.; Naydenov, B.; McGuinness, L.; et al. Protecting Quantum Spin Coherence of Nanodiamonds in Living Cells. Phys. Rev. Appl.
**2020**, 13, 024021. [Google Scholar] [CrossRef] [Green Version] - Farfurnik, D.; Jarmola, A.; Pham, L.M.; Wang, Z.H.; Dobrovitski, V.V.; Walsworth, R.L.; Budker, D.; Bar-Gill, N. Optimizing a Dynamical Decoupling Protocol for Solid-State Electronic Spin Ensembles in Diamond. Phys. Rev. B
**2015**, 92, 060301. [Google Scholar] [CrossRef] [Green Version] - Genov, G.T.; Ben-Shalom, Y.; Jelezko, F.; Retzker, A.; Bar-Gill, N. Efficient and Robust Signal Sensing by Sequences of Adiabatic Chirped Pulses. Phys. Rev. Res.
**2020**, 2, 033216. [Google Scholar] [CrossRef] - Poulsen, A.F.L.; Clement, J.D.; Webb, J.L.; Jensen, R.H.; Troise, L.; Berg-Sørensen, K.; Huck, A.; Andersen, U.L. Optimal Control of a Nitrogen-Vacancy Spin Ensemble in Diamond for Sensing in the Pulsed Domain. Phys. Rev. B
**2022**, 106, 014202. [Google Scholar] [CrossRef] - Brochu, E.; Cora, V.M.; de Freitas, N. A Tutorial on Bayesian Optimization of Expensive Cost Functions, with Application to Active User Modeling and Hierarchical Reinforcement Learning. arXiv
**2010**, arXiv:1012.2599. [Google Scholar] - Shahriari, B.; Swersky, K.; Wang, Z.; Adams, R.P.; de Freitas, N. Taking the Human Out of the Loop: A Review of Bayesian Optimization. Proc. IEEE
**2016**, 104, 148–175. [Google Scholar] [CrossRef] [Green Version] - Zhan, D.; Xing, H. Expected Improvement for Expensive Optimization: A Review. J. Glob. Optim.
**2020**, 78, 507–544. [Google Scholar] [CrossRef] - Bauch, E.; Hart, C.A.; Schloss, J.M.; Turner, M.J.; Barry, J.F.; Kehayias, P.; Singh, S.; Walsworth, R.L. Ultralong Dephasing Times in Solid-State Spin Ensembles via Quantum Control. Phys. Rev. X
**2018**, 8, 031025. [Google Scholar] [CrossRef] [Green Version] - Glaser, S.J.; Boscain, U.; Calarco, T.; Koch, C.P.; Köckenberger, W.; Kosloff, R.; Kuprov, I.; Luy, B.; Schirmer, S.; Schulte-Herbrüggen, T.; et al. Training Schrödinger’s Cat: Quantum Optimal Control. Eur. Phys. J. D
**2015**, 69, 279. [Google Scholar] [CrossRef] - Koch, C.P.; Boscain, U.; Calarco, T.; Dirr, G.; Filipp, S.; Glaser, S.J.; Kosloff, R.; Montangero, S.; Schulte-Herbrüggen, T.; Sugny, D.; et al. Quantum Optimal Control in Quantum Technologies. Strategic Report on Current Status, Visions and Goals for Research in Europe. EPJ Quantum Technol.
**2022**, 9, 19. [Google Scholar] [CrossRef] - Accanto, N.; de Roque, P.M.; Galvan-Sosa, M.; Christodoulou, S.; Moreels, I.; van Hulst, N.F. Rapid and Robust Control of Single Quantum Dots. Light. Sci. Appl.
**2017**, 6, e16239. [Google Scholar] [CrossRef] [Green Version] - Yang, X.; Thompson, J.; Wu, Z.; Gu, M.; Peng, X.; Du, J. Probe Optimization for Quantum Metrology via Closed-Loop Learning Control. Npj Quantum Inf.
**2020**, 6, 1–7. [Google Scholar] [CrossRef] - Egger, D.J.; Wilhelm, F.K. Adaptive Hybrid Optimal Quantum Control for Imprecisely Characterized Systems. Phys. Rev. Lett.
**2014**, 112, 240503. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Jelezko, F.; Wrachtrup, J. Single Defect Centres in Diamond: A Review. Phys. Status Solidi (a)
**2006**, 203, 3207–3225. [Google Scholar] [CrossRef] - Tian, J.; Liu, H.; Liu, Y.; Yang, P.; Betzholz, R.; Said, R.S.; Jelezko, F.; Cai, J. Quantum Optimal Control Using Phase-Modulated Driving Fields. Phys. Rev. A
**2020**, 102, 043707. [Google Scholar] [CrossRef] - Simpson, T.; Poplinski, J.; Koch, P.N.; Allen, J. Metamodels for Computer-based Engineering Design: Survey and Recommendations. Eng. Comput.
**2001**, 17, 129–150. [Google Scholar] [CrossRef] [Green Version] - Wang, G.G.; Shan, S. Review of Metamodeling Techniques in Support of Engineering Design Optimization. J. Mech. Des.
**2006**, 129, 370–380. [Google Scholar] [CrossRef] - Barton, R.R. Metamodeling: A State of the Art Review. In Proceedings of the Winter Simulation Conference, Lake Buena Vista, FL, USA, 11–14 December 1994; pp. 237–244. [Google Scholar] [CrossRef] [Green Version]
- van de Schoot, R.; Depaoli, S.; King, R.; Kramer, B.; Märtens, K.; Tadesse, M.G.; Vannucci, M.; Gelman, A.; Veen, D.; Willemsen, J.; et al. Bayesian Statistics and Modelling. Nat. Rev. Methods Prim.
**2021**, 1, 1. [Google Scholar] [CrossRef] - Sacks, J.; Welch, W.J.; Mitchell, T.J.; Wynn, H.P. Design and Analysis of Computer Experiments. Stat. Sci.
**1989**, 4, 409–423. [Google Scholar] [CrossRef] - Jones, D.R.; Schonlau, M. Efficient Global Optimization of Expensive Black-Box Functions. J. Glob. Optim.
**1998**, 13, 455–492. [Google Scholar] [CrossRef] - Matheron, G. Principles of Geostatistics. Econ. Geol.
**1963**, 58, 1246–1266. [Google Scholar] [CrossRef] - Ng, S.H.; Yin, J. Bayesian Kriging Analysis and Design for Stochastic Simulations. Acm Trans. Model. Comput. Simul.
**2012**, 22, 17. [Google Scholar] [CrossRef] - Stein, M.L. Interpolation of Spatial Data: Some Theory for Kriging; Springer Science & Business Media: Berlin/Heidelberg, Germany, 1999. [Google Scholar]
- Currin, C.; Mitchell, T.; Morris, M.; Ylvisaker, D. A Bayesian Approach to the Design and Analysis of Computer Experiments; Technical Report ORNL-6498; Oak Ridge National Lab.: Oak Ridge, TN, USA, 1988. [Google Scholar]
- Currin, C.; Mitchell, T.; Morris, M.; Ylvisaker, D. Bayesian Prediction of Deterministic Functions, with Applications to the Design and Analysis of Computer Experiments. J. Am. Stat. Assoc.
**1991**, 86, 953–963. [Google Scholar] [CrossRef] - Morris, M.D.; Mitchell, T.J.; Ylvisaker, D. Bayesian Design and Analysis of Computer Experiments: Use of Derivatives in Surface Prediction. Technometrics
**1993**, 35, 243–255. [Google Scholar] [CrossRef] - Kleijnen, J.P. Kriging Metamodeling in Simulation: A Review. Eur. J. Oper. Res.
**2009**, 192, 707–716. [Google Scholar] [CrossRef] [Green Version] - Caneva, T.; Calarco, T.; Montangero, S. Chopped Random-Basis Quantum Optimization. Phys. Rev. A
**2011**, 84, 022326. [Google Scholar] [CrossRef] [Green Version] - Müller, M.M.; Said, R.S.; Jelezko, F.; Calarco, T.; Montangero, S. One Decade of Quantum Optimal Control in the Chopped Random Basis. Rep. Prog. Phys.
**2022**, 85, 076001. [Google Scholar] [CrossRef] - Katoch, S.; Chauhan, S.S.; Kumar, V. A Review on Genetic Algorithm: Past, Present, and Future. Multimed. Tools Appl.
**2021**, 80, 8091–8126. [Google Scholar] [CrossRef] - Khaneja, N.; Reiss, T.; Kehlet, C.; Schulte-Herbrüggen, T.; Glaser, S.J. Optimal Control of Coupled Spin Dynamics: Design of NMR Pulse Sequences by Gradient Ascent Algorithms. J. Magn. Reson.
**2005**, 172, 296–305. [Google Scholar] [CrossRef] [Green Version] - Machnes, S.; Sander, U.; Glaser, S.J.; de Fouquières, P.; Gruslys, A.; Schirmer, S.; Schulte-Herbrüggen, T. Comparing, Optimizing, and Benchmarking Quantum-Control Algorithms in a Unifying Programming Framework. Phys. Rev. A
**2011**, 84, 022305. [Google Scholar] [CrossRef] [Green Version] - Lucarelli, D. Quantum Optimal Control via Gradient Ascent in Function Space and the Time-Bandwidth Quantum Speed Limit. Phys. Rev. A
**2018**, 97, 062346. [Google Scholar] [CrossRef] [Green Version] - Sørensen, J.J.W.H.; Aranburu, M.O.; Heinzel, T.; Sherson, J.F. Quantum Optimal Control in a Chopped Basis: Applications in Control of Bose-Einstein Condensates. Phys. Rev. A
**2018**, 98, 022119. [Google Scholar] [CrossRef] [Green Version] - Nelder, J.A.; Mead, R. A Simplex Method for Function Minimization. Comput. J.
**1965**, 7, 308–313. [Google Scholar] [CrossRef] - Wang, G.; Liu, Y.X.; Cappellaro, P. Coherence Protection and Decay Mechanism in Qubit Ensembles under Concatenated Continuous Driving. New J. Phys.
**2020**, 22, 123045. [Google Scholar] [CrossRef] - Knowles, H.S.; Kara, D.M.; Atatüre, M. Observing Bulk Diamond Spin Coherence in High-Purity Nanodiamonds. Nat. Mater.
**2014**, 13, 21–25. [Google Scholar] [CrossRef] [Green Version] - de Lange, G.; van der Sar, T.; Blok, M.; Wang, Z.H.; Dobrovitski, V.; Hanson, R. Controlling the Quantum Dynamics of a Mesoscopic Spin Bath in Diamond. Sci. Rep.
**2012**, 2, 382. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Gullion, T.; Baker, D.B.; Conradi, M.S. New, Compensated Carr-Purcell Sequences. J. Magn. Reson.
**1990**, 89, 479–484. [Google Scholar] [CrossRef] - Viola, L.; Lloyd, S. Dynamical Suppression of Decoherence in Two-State Quantum Systems. Phys. Rev. A
**1998**, 58, 2733–2744. [Google Scholar] [CrossRef] [Green Version] - Khodjasteh, K.; Lidar, D.A. Fault-Tolerant Quantum Dynamical Decoupling. Phys. Rev. Lett.
**2005**, 95, 180501. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Cywiński, L.; Lutchyn, R.M.; Nave, C.P.; Das Sarma, S. How to Enhance Dephasing Time in Superconducting Qubits. Phys. Rev. B
**2008**, 77, 174509. [Google Scholar] [CrossRef] [Green Version] - Doria, P.; Calarco, T.; Montangero, S. Optimal Control Technique for Many-Body Quantum Dynamics. Phys. Rev. Lett.
**2011**, 106, 190501. [Google Scholar] [CrossRef] [Green Version] - Castro, A.; Werschnik, J.; Gross, E.K.U. Controlling the Dynamics of Many-Electron Systems from First Principles: A Combination of Optimal Control and Time-Dependent Density-Functional Theory. Phys. Rev. Lett.
**2012**, 109, 153603. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Zhang, J.; Um, M.; Lv, D.; Zhang, J.N.; Duan, L.M.; Kim, K. NOON States of Nine Quantized Vibrations in Two Radial Modes of a Trapped Ion. Phys. Rev. Lett.
**2018**, 121, 160502. [Google Scholar] [CrossRef] [Green Version] - Monz, T.; Schindler, P.; Barreiro, J.T.; Chwalla, M.; Nigg, D.; Coish, W.A.; Harlander, M.; Hänsel, W.; Hennrich, M.; Blatt, R. 14-Qubit Entanglement: Creation and Coherence. Phys. Rev. Lett.
**2011**, 106, 130506. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Singer, K.; Poschinger, U.; Murphy, M.; Ivanov, P.; Ziesel, F.; Calarco, T.; Schmidt-Kaler, F. Colloquium: Trapped Ions as Quantum Bits: Essential Numerical Tools. Rev. Mod. Phys.
**2010**, 82, 2609–2632. [Google Scholar] [CrossRef] [Green Version] - Watts, P.; Vala, J.; Müller, M.M.; Calarco, T.; Whaley, K.B.; Reich, D.M.; Goerz, M.H.; Koch, C.P. Optimizing for an Arbitrary Perfect Entangler. I. Functionals. Phys. Rev. A
**2015**, 91, 062306. [Google Scholar] [CrossRef] [Green Version] - Goerz, M.H.; Gualdi, G.; Reich, D.M.; Koch, C.P.; Motzoi, F.; Whaley, K.B.; Vala, J.; Müller, M.M.; Montangero, S.; Calarco, T. Optimizing for an Arbitrary Perfect Entangler. II. Application. Phys. Rev. A
**2015**, 91, 062307. [Google Scholar] [CrossRef] [Green Version]

**Figure 1.**(

**a**) Schematic of NV center in diamond lattice. (

**b**) Schematic diagram of energy level of NV center. (

**c**) Fidelity of state flip of NV center using rectangular control field $g\left(t\right)=10$ MHz. (

**d**) Probability density of frequency detuning $\delta $. (

**e**) Probability density of amplitude drift factor $\delta $. (

**f**) Sampling range of numerical simulation when computing the value of average fidelity $\mathcal{F}$.

**Figure 3.**(

**a**) Shape of control field in interaction picture, ${\mathrm{\Omega}}_{x}^{\mathrm{PM}}\left(t\right)={\sum}_{j=1}^{{N}_{\mathrm{D}}}\frac{{a}_{j}}{2}cos\left[\frac{{b}_{j}}{{v}_{j}}sin\left({v}_{j}t\right)\right]$ and ${\mathrm{\Omega}}_{y}^{\mathrm{PM}}\left(t\right)={\sum}_{j=1}^{{N}_{\mathrm{D}}}\frac{{a}_{j}}{2}sin\left[\frac{{b}_{j}}{{v}_{j}}sin\left({v}_{j}t\right)\right]$, with randomly taken parameters $a=0.0332$, $b=0.0104$ and $\nu =0.0378$. (

**b**,

**c**) Values of true function with sample number ${N}_{s}=9$. (

**d**) Values of true function with sample number ${N}_{s}=16$. (

**e**) Values of estimation function with sample number $n=9$ and estimation point number ${N}_{e}=2500$. (

**f**) Values of estimation function with sample number $n=16$ and estimation point number ${N}_{e}=2500$. Black circles in (

**e**,

**f**) represent locations of sample points.

**Figure 4.**(

**a**) Average computation time of the objective function as a function of calculating sample number $M\times N$. In total, 100 processes under random control fields were calculated, and the estimation model parameter was updated in each process when computing ${\widehat{\mathcal{F}}}_{\mathrm{obj}}$. Insert: Zoomed-in graph for $M\times N\le 100$. (

**b**) Average function value deviation as a function of calculating sample number $M\times N$. Based on the same data as (

**a**). The deviation was calculated by subtracting the values of $f(\delta ,\kappa )$, with $M\times N=2500$, i.e., $|{\mathcal{F}}_{\mathrm{obj}}-{\mathcal{F}}_{\mathrm{obj}(M\times N=2500)}|$ for the true value-based process and $|{\widehat{\mathcal{F}}}_{\mathrm{obj}}-{\mathcal{F}}_{\mathrm{obj}(M\times N=2500)}|$ for the predictor-based process. (

**c**) Average computation time of the objective function as a function of calculating sample number $M\times N$, where the estimation model parameter was fixed in all the 100 random processes. Insert: Zoomed-in graph for $M\times N\le 100$. (

**d**) Average function value deviation as a function of calculating sample number $M\times N$. Based on the same data as (

**c**). The control fields took the form of $g\left(t\right)=acos\left[{\omega}_{0}t+\frac{b}{\nu}sin\left(\nu t\right)\right]$, with evolution time $T=100$ ns, and $a,b$ and $\nu $ being randomly taken from ranges $a\in [0,10\times 2\pi ]$ MHz, $b\in [0,2\pi /T]$ and $\nu \in [0,2\pi /T]$. The sample number used in the estimation model was $n=16$.

**Figure 5.**(

**a**) Optimizedfidelity of B-PM, PM, B-SFB and SFB methods with parameter set number ${N}_{\mathrm{D}}=1$. (

**b**) Optimized fidelity of B-PM, PM, B-SFB and SFB methods with parameter set number ${N}_{\mathrm{D}}=2$. (

**c**,

**d**) Average function $f(\delta ,\kappa )$ calling times in Equation (6) that gave the results in (

**a**,

**b**), respectively. All results are based on 100 trials with random initial parameters. The total evolution time was taken as $T=100$ ns, and the maximal field amplitude was bounded as $max\left|g\left(t\right)\right|\u2a7d{\mathrm{\Omega}}_{max}=2\pi \phantom{\rule{3.33333pt}{0ex}}\times \phantom{\rule{3.33333pt}{0ex}}10$ MHz.

**Figure 6.**(

**a**–

**c**) Optimization results obtained with the B-PM method with ${N}_{\mathrm{D}}=1$ and $n=9$. (

**d**–

**f**) Optimization results obtained with the SFB method with ${N}_{\mathrm{D}}=2$ and $M\times N=16$. (

**a**,

**d**) Optimization values of objective function of 100 trials with random initial parameters $\mathbf{\lambda}$. (

**b**,

**e**) Shape of the optimized control field in the interaction picture. (

**c**,

**f**) Fidelity distribution in regions $\delta \in 2\pi \times [-10,10]$ MHz and $\kappa \in [0.5,1.5]$.

**Figure 7.**(

**a**) Scheme of XY-8 pulse and AC signal to be sensed. The pulse length of the rectangular pulse was ${T}_{\mathrm{pulse}}=50$ ns, and that of the PM pulse was ${T}_{\mathrm{pulse}}=100$ ns. The time separation for the rectangular pulse was $\tau =350$ ns, and that for the PM pulse was $\tau =300$ ns. The frequency of the AC signal was ${\omega}_{s}=\pi /({T}_{\mathrm{pulse}}+\tau )=2.5\pi $ MHz. (

**b**) Simulation results of the population of $|0\rangle $ of the NV center ensemble using different XY-8 pulses. Red line with point marks: population under optimized pulse obtained with the B-PM method with pulse length ${T}_{\mathrm{pulse}}=100$ ns. Green line with cross marks: population under rectangular $\pi $ pulse with pulse length ${T}_{\mathrm{pulse}}=50$ ns. Gray solid curve: population under rectangular $\pi $ pulse with pulse length ${T}_{\mathrm{pulse}}=100$ ns without considering inhomogeneous broadening or the dynamic noise term. Gray dashed lines: from top to bottom, ${P}_{0}=(1+1/e)/2$ reference, ${P}_{0}=1/2$ reference and ${P}_{0}=(1-1/e)/2$ reference, respectively. The ${T}_{2}$ time was identified as the time when the maximal value of ${P}_{0}$ dropped below $(1+1/e)/2$.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Tian, J.; Said, R.S.; Jelezko, F.; Cai, J.; Xiao, L.
Bayesian-Based Hybrid Method for Rapid Optimization of NV Center Sensors. *Sensors* **2023**, *23*, 3244.
https://doi.org/10.3390/s23063244

**AMA Style**

Tian J, Said RS, Jelezko F, Cai J, Xiao L.
Bayesian-Based Hybrid Method for Rapid Optimization of NV Center Sensors. *Sensors*. 2023; 23(6):3244.
https://doi.org/10.3390/s23063244

**Chicago/Turabian Style**

Tian, Jiazhao, Ressa S. Said, Fedor Jelezko, Jianming Cai, and Liantuan Xiao.
2023. "Bayesian-Based Hybrid Method for Rapid Optimization of NV Center Sensors" *Sensors* 23, no. 6: 3244.
https://doi.org/10.3390/s23063244