††thanks: These authors contributed equally to this work††thanks: These
authors contributed equally to this work

# Optimal control of a nitrogen-vacancy spin ensemble in diamond for sensing
in the pulsed domain

Andreas F.L. Poulsen  Center for Macroscopic Quantum States (bigQ), Department
of Physics, Technical University of Denmark, Kgs. Lyngby, Denmark  Joshua D.
Clement  Center for Macroscopic Quantum States (bigQ), Department of Physics,
Technical University of Denmark, Kgs. Lyngby, Denmark  James L. Webb
<EMAIL_ADDRESS>Center for Macroscopic Quantum States (bigQ), Department
of Physics, Technical University of Denmark, Kgs. Lyngby, Denmark  Rasmus H.
Jensen  Center for Macroscopic Quantum States (bigQ), Department of Physics,
Technical University of Denmark, Kgs. Lyngby, Denmark  Kirstine Berg-Sørensen
Department of Health Technology, Technical University of Denmark, Kgs. Lyngby,
Denmark  Alexander Huck<EMAIL_ADDRESS>Center for Macroscopic
Quantum States (bigQ), Department of Physics, Technical University of Denmark,
Kgs. Lyngby, Denmark  Ulrik Lund Andersen<EMAIL_ADDRESS>Center
for Macroscopic Quantum States (bigQ), Department of Physics, Technical
University of Denmark, Kgs. Lyngby, Denmark

###### Abstract

Defects in solid state materials provide an ideal, robust platform for quantum
sensing. To deliver maximum sensitivity, a large ensemble of non-interacting
defects hosting coherent quantum states are required. Control of such an
ensemble is challenging due to the spatial variation in both the defect energy
levels and in any control field across a macroscopic sample. In this work we
experimentally demonstrate that we can overcome these challenges using Floquet
theory and optimal control optimization methods to efficiently and coherently
control a large defect ensemble, suitable for sensing. We apply our methods
experimentally to a spin ensemble of up to 4 $\times$ 109 nitrogen vacancy
(NV) centers in diamond. By considering the physics of the system and
explicitly including the hyperfine interaction in the optimization, we design
shaped microwave control pulses that can outperform conventional ($\pi$-)
pulses when applied to sensing of temperature or magnetic field, with a
potential sensitivity improvement between 11 and 78%. Through dynamical
modelling of the behaviour of the ensemble, we shed light on the physical
behaviour of the ensemble system and propose new routes for further
improvement.

##  I Introduction

Solid state defects are a promising platform for quantum sensing, where purely
quantum mechanical properties such as superposition and entanglement can be
utilized to overcome classical limitations.[1, 2]. Particularly in
semiconductors, where they can be controllably created and manipulated, solid
state defects can host quantum states that are both long-lived and sensitive
to the local environment in discrete energy levels within the bandgap. A
typical and extensively used defect system is the nitrogen-vacancy (NV) center
in diamond. This consists of a substitutional nitrogen atom and an adjacent
lattice vacancy, having discrete electronic and nuclear spin states with long
coherence times up to room temperature.[3] The optical properties of the
negatively-charged NV center (NV-) are highly sensitive to a range of
parameters including magnetic field[4, 5, 6, 7, 8, 9], electric field[10, 5],
temperature[11, 12] and pressure (strain).[13] Applications include sensing
using a scanning diamond tip[14, 15], nanoscale nuclear magnetic resonance
(NMR)/ electron spin resonance (ESR)[16, 17] and in biophysics,[18, 19, 20,
21] where robustness and high biocompatibility of diamond makes it an ideal
platform for sensing, even within biological samples.[22, 23]

Figure 1: Color online. (a) Simplified level diagram for a single NV- center
within the diamond bandgap, with the ground state levels shown in detail. At
zero magnetic field there is a splitting of
$2.87\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$ (ZFS) between the $m_{s}$=0 and
$m_{s}$=$\pm$1 states. At finite field $B$, the Zeeman effect shifts the
$m_{s}$=$\pm$1 states in energy by $\gamma B$. The $m_{s}$=$\pm$1 states are
further split into 3 hyperfine levels ($m_{l}$=0,$\pm$1) separated by
$\delta_{l}=$2.16\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$. (b) Bloch sphere
representation depicting this $m_{s}=\\{0,-1\\}$ two-level system and the time
evolution and result vector for a shaped optimal microwave pulse applied to
the initial ground state ($\ket{0}$, black arrow). Here we show the time
evolution for each of the hyperfine resonances $m_{l}$.

The level structure of the NV-, illustrated schematically in Fig. 1(a)
consists of spin triplet ground and excited states and metastable spin singlet
states.[24, 6, 25, 9, 26]. When green laser light is absorbed by an NV in
$m_{s}$=0, red fluorescence is emitted from decay back into the triplet ground
state. However, when absorbed in the spin-split $m_{s}$=$\pm$1, decay back to
$m_{s}$=0 may occur through singlet shelving states, via nonradiative and
infrared emission. The populations of $m_{s}$=0 and $\pm$1 can be controlled
by applying resonant microwaves
($f=$2.87\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$$ in the absence of an
external bias magnetic field). This results in a detectable decrease in red
fluorescence output on resonance, with contrast $C$ of 1-$2\text{\,}\%$ for a
large ensemble of defects and up to $30\text{\,}\%$ for a single NV[26]. The
$m_{s}$=$\pm$1 states can be split in energy e.g. via the Zeeman effect by an
external magnetic field, giving rise to multiple spectral features including
additional sub-features due to hyperfine splitting introduced by coupling to
the nuclear spin of the ^14N or ^15N impurity atom[27]. By sweeping microwave
frequency, these resonances can be identified by the drop in fluorescence
output, a process termed optically detected magnetic resonance (ODMR)
spectroscopy. By fixing the microwave drive frequency on or close to a
resonance, any frequency shift resulting from the level shift of
$m_{s}$=$\pm$1 by magnetic field, electric field or local temperature can be
detected.

Sensing using NV centers can be performed by a simple continuous wave (CW)
method, maintaining a constant intensity of microwave and laser
irradiation[25, 28]. Alternatively, laser and microwave pulses can be used to
control and read the ensemble[29, 26]. This relies on the NV behaving as a
two-level quantized system[30], with one (bright) maximally fluorescent state,
$\ket{0}$, and one (dark) state with reduced fluorescence under illumination
with green light, $\ket{\pm 1}$. For a single NV, these correspond to the
electron spin states $m_{s}$=0 and $m_{s}$=$\pm$1 respectively. Rabi
oscillations can be observed in $C$ on application of a microwave field
resonant with the ground state splitting. This allows coherent control using
discrete laser and microwave pulses, offering improvement over CW methods
through reduction in the power broadening of the resonance linewidths.
Techniques such as Ramsey interferometry [31, 32] and Hahn echo-type sequences
have been demonstrated[33, 34], realizing single molecule sensitivity in
nanoscale diamond NMR experiments.[35, 36, 37]

Pulsed schemes are used extensively for quantum sensing measurements using
single or few-NV centers often in a confocal microscopy setup.[38, 39, 40]
However, as extensive nuclear magnetic- and electron spin- resonance
experiments have shown, a macroscopic ensemble of many billions of electron or
nuclear spins in a larger volume can also be manipulated by microwave pulse
sequences in the same manner.[41] From a quantum sensing perspective, large
ensembles are desirable for imaging applications,[19] for vector sensing,[42]
or to maximize bulk sensitivity where spatial resolution is not required,
since the shot noise-limited sensitivity scales as $1/\sqrt{N}$, with $N$ the
number of defect centers.[4] Compared to single NV readout, ensemble NV
sensing with flat (fixed amplitude and phase) microwave pulses suffers from
nonuniform pulse operation. Inhomogeneous broadening due to strain and bias
field gradients spreads the distribution of resonance frequencies of the NV
centers, detuning many from a central drive frequency. In addition, the near-
field microwave drive can vary in central resonance frequency, power, and
phase across the ensemble, depending on the antenna and microwave coupling to
the diamond.[43] This makes control of a large ensemble challenging.

To overcome these issues, several approaches have been investigated for higher
frequency AC sensing ($>$10\text{\,}\mathrm{k}\mathrm{H}\mathrm{z}$$),
beginning with dynamical decoupling,[44, 45, 34, 7] and with further
correction using e.g. adiabatic chirped pulses.[8]. These are however
unsuitable for applications that require DC to low frequency sensing,
particularly for applications in biosensing[20, 46, 47, 48]. An alternative in
this frequency range is to deliver shaped microwave pulses (varying phase and
amplitude), in order to boost fidelity in a Ramsey or pulsed ODMR[30] scheme.
Such pulses can be designed using optimal control methods.[33, 49, 50, 51, 52]
Optimal pulses have been used with small ensembles of NV centers for Hahn-
echo[33, 49, 53] or Carr-Purcell sequences,[54] to improve the robustness and
temperature sensitivity of the D-Ramsey scheme,[55] to extend the coherence
time of an NV,[56] and to improve the accuracy of entanglement operations[57].

In this work, we demonstrate the use of shaped microwave pulses produced by
optimal control methods combined with Floquet theory that can deliver improved
coherent control over a large solid state defect ensemble of diamond NV
centers. We show improved ODMR contrast and therefore potentially higher
sensitivity when compared to a conventional flat $\pi$-pulse sensing scheme.
Our scheme is widely adaptable to a range of solid state systems where a two-
level quantum system can be realized, although we specifically test our
methods using an NV ensemble in diamond. We achieve our improvement through a
full consideration of the physics of the system, including the hyperfine
interaction with the nuclear spin of the subsitutional nitrogen in the NV
center (both ^14N and ^15N). We model ensemble behaviour to further understand
the physics of the system, in particular to explain the dynamics when a
readout laser pulse is applied. This is also to uncover new routes for
improvement for quantum sensing. We demonstrate our methods experimentally in
off-the-shelf, standard grade material without significant processing or
fabrication. Furthermore, we demonstrate operation at low Rabi frequencies,
typical of those achievable using low-power microwave amplification e.g. in a
portable sensor device.[58]

The paper is structured as follows. In Section II.1 we outline the basic
methodology we use to construct and generate our shaped microwave pulses using
optimal control theory, including our derivation for explicitly including the
hyperfine interaction in the optimization algorithm. We describe a number of
key control parameters, the limits of which we discuss in Section II.2. In
Section II.3 we describe in detail our experimental setup and methodology and
in Sections III.1 and III.2 we demonstrate the use of optimized shaped pulses
for ODMR spectroscopy, compare to a conventional $\pi$-pulse scheme using a
flat microwave pulse, and analyze and discuss the optical behaviour and how
this relates to the physical dynamics of the NV ensemble.

##  II Methods

###  II.1 Optimal Control

Our optimal control algorithm maximizes a functional that describes the
desired transfer of one quantum state to another.[33, 49, 51, 59, 25, 52]. We
define our state transfer functional as:

$F_{\text{st}}=\left|\left\langle\psi_{f}\left|\hat{U}(t_{p})\right|\psi_{i}\right\rangle\right|^{2},$
(1)

where $\mathcal{F}_{\text{st}}$ is the fidelity, of value between 0 and 1,
which describes how well the pulse transfers the quantum state of a solid
state defect from an initial state $\left|\psi_{i}\right\rangle$ to a final
state $\left|\psi_{f}\right\rangle$. A fidelity of 1 represents a complete
transfer to the desired state. The influence of the pulse is described by the
unitary time evolution operator $\hat{U}(t_{p})$, where $t_{p}$ is the pulse
duration.

To represent the state transfer of an ensemble, we calculate ${F}_{\text{st}}$
for each member of a sample of defects with a specified range of frequency
detuning $\hat{\Delta}$ and relative control amplitude $\hat{\alpha}$. These
factors are set to be representative of the variation across a real ensemble.
The relative control amplitudes $\alpha_{i}$ represent the drive field
inhomogeneity across the ensemble, and each value is the ratio between the
Rabi frequency at which a given single defect is driven (due to drive field
inhomogeneity) and the Rabi frequency at which the pulse is designed to drive
the defects. The values of $\alpha_{i}$ thus vary around unity across the
representative sample. The relative control amplitude only relates to the
changes in Rabi frequency caused by drive field inhomogeneity and does not
include the effects of frequency detuning on the Rabi frequency. These effects
are included in the optimization separately via the $\Delta_{i}$ values, which
represent the inhomogenous broadening. We thus assign each defect in the
representative sample a value of $\alpha_{i}$ and $\Delta_{i}$ within the
specified range $\hat{\Delta}$ and $\hat{\alpha}$ and seek a pulse that
maximizes the average fidelity of the entire representative ensemble. Using
this model assumes that interaction between defects is minimal, such that each
defect can act as as single, isolated quantum defect in the material.

We assume our detunings $\Delta_{i}$ follow a Gaussian distribution centered
at zero. The full width at half maximum (FWHM) of this Gaussian distribution
is set equal to half of the width of the considered detuning range
$\hat{\Delta}$. The $\alpha_{i}$ values are assumed to follow a flat
distribution. The weight of each defect in the representative ensemble is thus
equal to the weight of its $\Delta_{i}$ value. These are normalized such that
the sum of the weights of all defects in the representative ensemble is equal
to 1. We therefore also use a weighted average of the fidelity. For numerical
optimization, we use throughout this work a representative ensemble of size
12x12 (12 values to cover the ranges $\hat{\Delta}$ and $\hat{\alpha}$,
respectively). This was based on a series of simulations of the performance of
pulses transferring state $\ket{0}$ to $\ket{-1}$ (Fig. 1(b)) optimized using
different representative ensembles. As shown in Fig. 2, 12x12 more than
ensures convergence of the fidelity, while minimizing computational time.

Figure 2: Color online. The simulated weighted average fidelity of optimal
control pulses optimized with different ensemble sizes as a function of
representative ensemble size for three values of the maximum allowed Rabi
frequency $R_{\text{lim}}$. The pulses were optimized for
$\hat{\Delta}=\pm$1\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$ detuning,
$\hat{\alpha}=1\pm$10\text{\,}\%$$ amplitude variations and a duration of
$t_{p}=$1.85\text{\,}\mathrm{\SIUnitSymbolMicro s}$$ with the indicated values
of $R=R_{\text{lim}}$. Figure 3: Color online. Plot of $I(t)$ and $Q(t)$ in
units of Rabi frequency for two optimal control pulses that were optimized by
including state transfer using all three hyperfine levels. The pulses were
optimized for $\hat{\Delta}=\pm$1\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$
detuning and $\hat{\alpha}=1\pm$10\text{\,}\%$$ amplitude variations with a
duration of $t_{p}=$1.85\text{\,}\mathrm{\SIUnitSymbolMicro s}$$ and a maximum
allowed Rabi frequency of (a) $1.4\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$ and
(b) $3.0\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$.

For the design of our shaped microwave pulses, we use smooth optimal control.
Here we choose a basis of periodic functions with the same periodicity $T$ and
discretized frequency components, resulting in the shaped pulses becoming
smooth in time.[50] In this work, we use a basis of sine functions with a
fundamental frequency determined by the pulse duration $t_{p}$.[49, 33] Smooth
optimal control has experimental advantages over alternatives such as gradient
ascent pulse engineering (GRAPE)[60] in that the bandwidth and the individual
frequency components are known in advance and the number of high frequency
components in the pulse Fourier spectrum is reduced, making modulation in
experiments less technically demanding.[50] Our smooth optimal control pulse
has the general form:

$S(t)=I(t)\cos\left(\omega_{D}t\right)+Q(t)\sin\left(\omega_{D}t\right),$ (2)

where

$I(t)=\sum\limits_{j=1}^{N_{f}}2a_{jx}\sin\left(j\Omega_{f}t\right),\>Q(t)=\sum\limits_{j=1}^{N_{f}}2a_{jy}\sin\left(j\Omega_{f}t\right).$
(3)

Here, $\omega_{D}$ is the central driving frequency,
$\Omega_{f}=2\pi/(2t_{p})$ is the fundamental frequency, $N_{f}$ is the number
of frequency components and the real $a_{jk}$-values are control amplitudes.
The bandwidth of such a pulse is then $N_{f}\Omega$. The fundamental frequency
is not related to the Rabi frequency and purely serves to enforce the desired
periodicity of $T=2t_{p}$. The $a_{jk}$-values are, however, defined in units
of Rabi frequency. As an example, Fig. 3 shows the in-phase and quadrature
components $I(t)$ and $Q(t)$ used to modulate the microwave carrier for two of
the specific pulses that we designed. In our experiments, the microwave
carrier has a frequency
$\omega_{D}\approx$2.8\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$$ corresponding
to the splitting between the $m_{s}$=0 and $m_{s}$=-1 levels of the NV center
ground state with an applied bias magnetic field.

It has been previously shown[53] that the performance of smooth optimal
control pulses improves with increasing $N_{f}$ until it saturates for
$N_{f}\geq 7$. We use $N_{f}=10$ for all of our pulses to ensure that we are
in the saturated regime. This yields 20 different control amplitudes $a_{jk}$
per shaped pulse, and these are the parameters that are optimized by the
control algorithm. The optimization is carried out iteratively by stepping
along the gradient of the fidelity with respect to the control amplitudes with
a step size $\beta$. Starting with initial control amplitudes $a_{jk}$, we
compute the resulting $\hat{U}(t_{p})$, $\mathcal{F}_{\text{st}}$ and
$\frac{\partial\mathcal{F}_{\text{st}}}{\partial a_{jk}}$, before updating the
control amplitudes by adding
$\beta\frac{\partial\mathcal{F}_{\text{st}}}{\partial a_{jk}}$. This process
is then repeated until $\mathcal{F}_{\text{st}}$ converges. The choice of
time-periodic basis functions yields a time-periodic Hamiltonian that can be
solved using Floquet theory.[61, 62, 50]

In this work, we extend previous methods to include the effects of hyperfine
splitting during the optimization. Although we specifically calculate for
diamond NV centers here, this method is generally adaptable and applicable to
any such splitting for a defect ensemble. The goal is to create a shaped pulse
that performs the state transfer $\ket{0}$ to $\ket{-1}$ simultaneously and
with as high fidelity as possible for each of the $m_{l}$ hyperfine levels.
For an NV center ensemble, this results in a higher ODMR contrast than would
be otherwise achievable by acting on only one $m_{l}$. This is analogous to
continuous wave methods driving multiple hyperfine lines previously described
in the literature.[63] By doing this in the pulsed domain, we seek to achieve
similar benefits, but without the negative effects of power broadening of the
resonance linewidths. In order to explicitly account for the hyperfine
splitting, it is necessary to modify the expression for the Fourier components
of the Hamiltonian that make up the Floquet matrix. The Fourier components of
the Hamiltonian are generally defined as

$\hat{\mathcal{H}}_{n}=\frac{1}{T}\int_{0}^{T}\exp\left(-in\Omega_{f}t\right)\hat{\mathcal{H}}(t)\,\mathrm{d}t,$
(4)

where $T=2t_{p}$ is the periodicity of the Hamiltonian and
$\hat{\mathcal{H}}(t)$ is the time-domain Hamiltonian that describes the
system to be optimized. The nitrogen in an NV can be either ^14N with $I=1$
(highest natural abundance) or ^15N with $I=1/2$, yielding either three or two
hyperfine levels, respectively, as illustrated in Fig. 1(a). We assume
hyperfine interaction between the ^14N nuclear spins and the NV electron spins
in the ensemble so that three hyperfine states are possible. The nuclear spins
are assumed to be in a thermal state such that all $m_{l}$ hyperfine states
are equally represented in the ensemble. The ODMR spectrum then contains three
resonances separated by
$\delta_{l}=$2.16\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$, corresponding to
the three hyperfine resonances $m_{l}$=-1,0,1. We also assume that the
different NV electron spins do not interact and that the $m_{s}$=$\pm$1 states
are clearly split by a static magnetic bias field. A single set of three NV
centers that each correspond to one of the hyperfine transitions can then be
reasonably approximated as three independent two-level systems. The drift
Hamiltonian thus has the form

$\hat{\mathcal{H}}_{0}=\sum\limits_{k=1}^{3}\frac{\omega_{0,k}}{2}\sigma_{z,k},$
(5)

where $\omega_{0,k}$ is the transition frequency of hyperfine transition $k$,
and $\sigma_{z,k}$ is a Pauli spin-$z$ matrix that is specific to transition
$k$. Note that the above expression applies to any two-level defect with three
equidistant hyperfine resonances that fulfills the underlying assumptions. The
transition frequencies are related via $\omega_{0,1}=\omega_{0,2}-\delta_{l}$
and $\omega_{0,3}=\omega_{0,2}+\delta_{l}$. Given that the states of the three
two-level systems can be completely described by a single vector of length 6,
the $\sigma_{z,k}$-matrices can also be represented by 6-by-6 matrices. (See
Appendix A). The same is true of the $\sigma_{x,k}$\- and
$\sigma_{y,k}$-matrices. The control Hamiltonian describes the interaction
between the control pulse of the form given in Eq. (2) and the three allowed
transitions.

Assuming the control field is linearly polarized in the $x$-direction, which
is perpendicular to the defect axis, the control Hamiltonian can be written in
the form:

$\hat{\mathcal{H}}_{c}=\sum\limits_{k=1}^{3}\sigma_{x,k}\left[I(t)\cos\left(\omega_{D}t\right)+Q(t)\sin\left(\omega_{D}t\right)\right],$
(6)

and the total Hamiltonian thus has the form

$\hat{\mathcal{H}}(t)=\sum\limits_{k=1}^{3}\left(\frac{\omega_{0,k}}{2}\sigma_{z,k}\right.\\\
\left.+\sigma_{x,k}\left[I(t)\cos\left(\omega_{D}t\right)+Q(t)\sin\left(\omega_{D}t\right)\right]\right).$
(7)

We can simplify the rest of the calculations by working in a rotating frame
given by the unitary rotation operator

$\hat{R}=\exp\left(\sum\limits_{k=1}^{3}i\omega_{D}t\sigma_{z,k}/2\right),$
(8)

which will commute with every term in $\hat{\mathcal{H}}_{c}$ except for
$\sigma_{x,k}$. More precisely,
$\left[\sigma_{z,k},\sigma_{x,k^{\prime}}\right]=2i\sigma_{y,k}\delta_{k,k^{\prime}}$
and
$\left[\sigma_{z,k},\sigma_{y,k^{\prime}}\right]=-2i\sigma_{x,k}\delta_{k,k^{\prime}}$.

The Baker-Campbell-Hausdorff lemma thus allows us to write

$\hat{R}\hat{\mathcal{H}}_{c}\hat{R}^{\dagger}=\sum\limits_{k=1}^{3}\left(\sigma_{x,k}\cos\left(\omega_{D}t\right)+\sigma_{y,k}\sin\left(\omega_{D}t\right)\right)\\\
\times\left[I(t)\cos\left(\omega_{D}t\right)+Q(t)\sin\left(\omega_{D}t\right)\right].$
(9)

Using this expression and defining the detuning,
$\Delta=\omega_{0,2}-\omega_{D}$, as the difference between the transition
frequency of the central hyperfine transition, $\omega_{0,2}$, and the central
driving frequency, $\omega_{D}$, we obtain the expression

$\hat{\mathcal{H}}^{\prime}=\sum\limits_{k=1}^{3}\left(\frac{\Delta+w_{k}\delta_{l}}{2}\sigma_{z,k}\right.\\\
\left.+\left(\sigma_{x,k}\cos\left(\omega_{D}t\right)+\sigma_{y,k}\sin\left(\omega_{D}t\right)\right)\right.\\\
\left.\times\left[I(t)\cos\left(\omega_{D}t\right)+Q(t)\sin\left(\omega_{D}t\right)\right]\right),$
(10)

where $w_{1}=-1$, $w_{2}=0$ and $w_{3}=1$. Expanding by using trigonometric
relations, the above expression can be simplified by using the rotating wave
approximation to eliminate the fast-oscillating terms

$\hat{\mathcal{H}}^{\prime}=\sum\limits_{k=1}^{3}\left(\frac{\Delta+w_{k}\delta_{l}}{2}\sigma_{z,k}+\frac{I(t)}{2}\sigma_{x,k}+\frac{Q(t)}{2}\sigma_{y,k}\right).$
(11)

Combining Eq. (11) with Eq. (3) and inserted into Eq. (4), the Fourier
components of the Hamiltonian become

$\hat{\mathcal{H}}_{n}=\sum\limits_{k=1}^{3}\frac{1}{T}\int\limits_{0}^{T}\exp\left(in\Omega
t\right)\left(\frac{\Delta+w_{k}\delta_{l}}{2}\sigma_{z,k}\right.\\\
\left.+\sum\limits_{j=1}^{N_{f}}\left[a_{jx}\sigma_{x,k}+a_{jy}\sigma_{y,k}\right]\sin\left(j\Omega
t\right)\right).$ (12)

The above expression can be further simplified by using the exponential form
of a sine and the integral form of a Kronecker delta. Doing so yields the
final expression for the Fourier components of the Hamiltonian when the
effects of hyperfine splitting are taken into account

$\hat{\mathcal{H}}_{n}=\sum\limits_{k=1}^{3}\left(\frac{\Delta+w_{k}\delta_{l}}{2}\sigma_{z,k}\delta_{n,0}\right.\\\
\left.+\sum\limits_{j=1}^{N_{f}}\frac{1}{2i}\left[a_{jx}\sigma_{x,k}+a_{jy}\sigma_{y,k}\right]\cdot\left[\delta_{n,j}-\delta_{-n,j}\right]\right)$
(13)

We use Eq. (13) in the construction of the Floquet matrix for the computation
of $\hat{U}(t_{p})$ and $\frac{\partial\mathcal{F}}{\partial a_{jk}}$ as part
of the update step of the optimal control algorithm. We include the
corresponding derivation for two hyperfine levels (^15N for NV centers) in the
Supplementary Information. Control amplitude variations are included by
multiplying the control amplitudes $a_{jx}$, $a_{jy}$ by the
$\alpha_{i}$-value for the given defect in the representative ensemble.

In order to ensure the optimization of our control amplitudes converges while
remaining within experimentally achievable limits, we include a penalty
functional

$\mathcal{F}_{\text{pen}}=-pt_{p}\sum\limits_{j,k}a_{jk}^{2}$ (14)

in our algorithm, applied at each update step. The penalty functional includes
a specified penalty constant $p>0$ and scales with the control amplitudes. We
optimize using the gradient of the sum of the penalty functional and the state
transfer fidelity
$\mathcal{F}_{\text{tot}}$=$\mathcal{F}_{\text{pen}}$+$\mathcal{F}_{\text{st}}$.
After each update step, the maximum amplitude of the optimal control pulse is
computed in units of Rabi frequency, and if it exceeds the maximum allowed
Rabi frequency $R_{\text{lim}}$, the penalty constant is increased by a step
size $\Delta p$. If the maximum amplitude of the optimal control pulse does
not exceed $R_{\text{lim}}$, the penalty constant is reduced by $\Delta p$.
$R_{\text{lim}}$ is one of the inputs to the algorithm and is limited by the
maximum achievable experimental Rabi frequency $R_{\text{max}}$. This method
also prevents the algorithm remaining in local maxima compared to optimizing
without a penalty functional.

Figure 4: Color online. Simulated maps of the state transfer fidelity (Eq.
(1)) from $\left|0\right\rangle$ to $\left|1\right\rangle$ for a single NV
(i=1) subject to (a,d) a flat ($\pi$)-pulse, (b, e) an optimized shaped pulse
and (c, f) a shaped pulse optimized while taking the fidelity of state
transfer taking all three hyperfine levels into account. The top plots (a, b,
c) show the fidelity of the transfer experienced by the central hyperfine
transition while the bottom plots (d, e, f) show the average of the transfer
fidelities for each of the three hyperfine levels. Each point in the top plots
is the fidelity for a single NV electron spin with the given values of
$\alpha_{1}$ and $\Delta_{1}$. Each point in the bottom plots is the average
of the fidelities for three NV electron spins with the given value of
$\alpha_{1}$ and transition frequencies detuned by $\Delta_{1}$,
$\Delta_{1}+\delta_{l}$ and $\Delta_{1}-\delta_{l}$, respectively, from the
driving frequency. The flat pulse has a Rabi frequency of
$1.4\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$, and the optimal control pulses
were both optimized using
$\hat{\Delta}=\pm$1\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$ detuning,
$\hat{\alpha}=1\pm$10\text{\,}\%$$ amplitude variation, $R_{\text{lim}}$=
$1.4\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$ and a pulse duration
$t_{p}=$1.85\text{\,}\mathrm{\SIUnitSymbolMicro s}$$.

As a demonstration of the effect of explicitly including all three hyperfine
levels in the optimization, Fig. 4 shows a series of simulated fidelity maps
for a single NV subject to a flat $\pi$-pulse and optimal control pulses with
and without including the hyperfine components. The fidelity of a $\ket{0}$ to
$\ket{-1}$ state transfer is directly proportional to the resulting ODMR
contrast $C$ since the contrast will be maximal when all NV electron spins are
in the $\left|-1\right\rangle$ state and minimal in the $\left|0\right\rangle$
state. All three pulses are in the regime $R_{\text{lim}}<\delta_{l}$. It is
clear that the regular optimal control pulse has superior performance for a
single hyperfine resonance. However, when considering the average of all
three, the shaped pulse optimized while taking the effects of hyperfine
splitting into account is significantly better, albeit within a narrower range
of detuning. Fig. 4(f) indicates that the optimal control pulse including the
hyperfine splitting in the optimization is capable of simultaneously
performing state transfer using all three hyperfine levels with high fidelity.
The narrow range of high fidelity dropping rapidly with detuning indicates
that the optimal pulse will yield high contrast when applied with drive
frequency $\omega_{D}$ close to any one of the three hyperfine resonances and
low contrast when applied off-resonance. This behavior naturally translates to
a high contrast and narrow resonance linewidth and thus higher sensitivity to
magnetic field. As can be seen in Fig. 4(c,f), as $\alpha_{1}$ is increased,
the $\ket{0}$ to $\ket{-1}$ fidelity (i.e., ODMR contrast) further improves in
the narrow range of high fidelity without significantly broadening the range
of high fidelity. We therefore experimentally apply our optimal control pulses
at applied microwave power equivalent to a higher maximum Rabi frequency than
we use for optimization, empirically chosen to maximize the slope.

###  II.2 Optimization Details

All of our pulses were made using an initial value of the penalty constant
$p=1$ and $\Delta p=0.05$. They were optimized to perform a state transfer
from $\left|0\right\rangle$ to $\left|-1\right\rangle$. We used 150 update
steps for all of the optimizations, as this was found to be sufficient to
achieve convergence of $\mathcal{F}_{\text{st}}$. For the first 51 steps, the
step size along the gradient was kept constant at $\beta=0.007$ and for the
remaining steps, the optimal step size was determined using a line search.
This was done to speed up the optimization without compromising the quality of
the resulting optimal control pulses. We designed pulses using different
values of $R_{\text{lim}}$, $t_{p}$ and the ranges $\hat{\Delta}$ and
$\hat{\alpha}$ and tested them experimentally. We determined the maximum
achievable experimental Rabi frequency, i.e. the upper limit on the maximum
allowed Rabi frequency $R_{\text{lim}}\leq
R_{\text{max}}=$3.2\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$ through prior
experimental measurements using flat pulses on the same diamond NV ensemble.
Based on this, we defined a range of $R_{\text{lim}}$ to generate testable
optimized shaped pulses for as between
$R_{\text{lim}}=$0.8\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$ and
$R_{\text{lim}}=$3.2\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$. The minimum
value of $t_{p}$ necessary to achieve improvements over a comparable flat
pulse was limited by the need to apply sufficient power to perform the desired
state transfer. We set the lower limit of $t_{p}$ to be at least twice the
duration of a flat $\pi$-pulse with Rabi frequency equal to $R_{\text{lim}}$.
The maximum value of $t_{p}$ was limited by the $T_{2}$ coherence time of a
single NV. Based on this, we defined a range of $t_{p}$ to generate testable
optimized shaped pulses for as between
$t_{p}=$1.0\text{\,}\mathrm{\SIUnitSymbolMicro s}$$ and
$t_{p}=$5.0\text{\,}\mathrm{\SIUnitSymbolMicro s}$$.

Although the possible values of detuning $\Delta_{i}$ are in principle not
limited, higher Rabi frequencies are required to compensate for higher levels
of inhomogenous broadening. Based on the considered values of
$R_{\text{lim}}$, we therefore used $\hat{\Delta}$ up to
$\pm$2\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$. The possible values of
$\alpha_{i}$ are similarly not limited in principle, but higher Rabi
frequencies are required to compensate for higher levels of drive field
inhomogeneity. We therefore chose to optimize up to $\hat{\alpha}=1\pm 0.2$
relative control amplitude range.

Our initial $a_{jk}$-values were set using pseudorandom values within a range
sufficient to yield a maximum Rabi frequency of the corresponding initial
pulse greater than $R_{\text{lim}}$. This was done in order to ensure that the
optimization algorithm approached the region of allowed pulses from the
outside, so that pulses utilizing $R_{\text{lim}}$ were considered. For this
work, the initial Rabi frequency was 2.8 times greater than the maximum
allowed Rabi frequency.

###  II.3 Experimental Setup

Figure 5: Color online. (a) Schematic of our experimental setup. The pump
laser is modulated by the AOM, at $2.6\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$
and controlled by the AWG. Microwave pulses are delivered to the diamond using
a near-field antenna. The AWG provides IQ modulation to the signal generator
to create the required control pulses. An ADC, synchronized with the AWG,
digitizes the analog AOM modulation signal, the signal from the APD collecting
the diamond fluorescence $V_{\text{fl}}$ and the signal from an amplified
photodetector that collects a small amount of the pump laser $V_{\text{ref}}$.
(b) Pulsed ODMR sequence as applied in our measurements, showing the repeating
sequence of pump laser pulses $P_{l}$ and microwave pulses $P_{\text{MW}}$.
This sequence is repeated continuously by the AWG.

A schematic of our experimental setup is shown in Fig. 5(a). We used an off-
the-shelf, optical-grade diamond (Element 6) with
$\sim$0.5\text{\,}\mathrm{p}\mathrm{p}\mathrm{b}$$ NV- concentration, of
dimensions 5x5x$1.2\text{\,}\mathrm{m}\mathrm{m}^{3}$. For this diamond, we
measured a $T_{2}^{*}$-limited linewidth of
$0.75\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$ and determined $T_{1}$, $T_{2}$
and $T_{2}^{*}$ times as $7.1\text{\,}\mathrm{m}\mathrm{s}$,
$7.0\text{\,}\mathrm{\SIUnitSymbolMicro s}$ and
$0.44\text{\,}\mathrm{\SIUnitSymbolMicro s}$ respectively, with a maximum
ensemble-averaged Rabi frequency of
$R_{\text{max}}=$3\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$ driven by our
antenna (see Supplementary Information for details). A bias field of
$2.9\text{\,}\mathrm{mT}$ aligned along the [111] crystallographic axis was
applied by fixed permanent magnets, so as to split the $m_{s}$=$\pm$1 states.
We addressed only the $m_{s}$=$0\xrightarrow{}m_{s}$=$-1$ transition to use an
effective two-level system within the antenna’s resonance.

The diamond was optically pumped using a $532\text{\,}\mathrm{nm}$ diode-
pumped solid state laser (DPSS, Cobolt Samba 1500). The linearly polarized
beam was focused to a waist diameter of
$120\text{\,}\mathrm{\SIUnitSymbolMicro m}$ before Brewster-angle refraction
into the diamond to optically address (with at least $1/e^{2}$ the center
intensity) an ensemble with a minimum estimated size of
$\approx$4\text{\times}{10}^{9}\text{\,}$$ NV centers in a volume of
$\approx$0.04\text{\,}\mathrm{m}\mathrm{m}^{3}$$ based on the focused waist of
the pump beam. The maximum pump laser power we delivered to the diamond was
$500\text{\,}\mathrm{m}\mathrm{W}$. This resulted in
$84\text{\,}\mathrm{\SIUnitSymbolMicro W}$ of red fluorescence escaping the
front face of the diamond, of which we collected
$9.1\text{\,}\mathrm{\SIUnitSymbolMicro W}$ by using two condenser lenses
(Thorlabs ACL25416U) to first collimate to pass through a low-pass filter
(FEL0550) and then focus onto an avalanche photodiode (Thorlabs APD120A),
producing an amplified analog voltage output $V_{\text{fl}}$ sampled by an
analog-to-digital converter (ADC, Gage Octopus CS8300) at
$50\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$. We optically modulated our pump
laser using an acousto-optic modulator (AOM, Isomet 532C-4) at
$f_{\text{AOM}}=$2.6\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$, allowing us to
perform software lock-in detection to minimize noise in the electronic
readout. A fraction of the pump beam was also sampled by a second detector
(Thorlabs PDA10A) to provide a reference, $V_{\text{ref}},$ for common-mode
noise rejection.

We generated the microwave pulses necessary for implementation of the optimal
control protocols using an arbitrary waveform generator (AWG, Tektronix 5000),
in-phase/quadrature (IQ) modulating a Stanford SG394 RF signal generator. The
microwave output was amplified (Mini-Circuits ZHL-16W-43-S+) and delivered to
the diamond using a near-field antenna based on a square split-ring resonator
design [64, 65]. This antenna was designed for uniformity of near-field
intensity in a 5x$5\text{\,}\mathrm{m}\mathrm{m}^{2}$ region centered on the
diamond with a resonance at approximately
$2.8\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$. Our AWG also controlled a switch
(Minicircuits ZASWA-2-50DRA+) through which the AOM modulation drive was
passed, allowing the pump beam incident on the diamond to be pulsed and
modulated.

###  II.4 Pulse Sequencing and Readout

In our experimental setup, we measured contrast $C$, the change in
fluorescence output as a result of a control pulse. We define $C$ as the
change in fluorescence output in the initial period of a pump laser readout
pulse after application of a preceding microwave pulse[30, 66, 34]. $C$ was
measured across an ODMR resonance feature by varying microwave drive frequency
$\omega_{D}$. We measured this change in fluorescence signal $V_{\text{fl}}$
after application of either a shaped or flat microwave pulse, relative to the
laser reference signal $V_{\text{ref}}$. We obtained $C$ by scaling the
reference to the size of the fluorescence signal, subtracting the two, and
integrating the resulting signal over a time window $t_{w}$=0.3-2.7 ms at the
start of the laser pulse (see Supplementary Information for full details).
This subtraction method allowed us to reject both DC and higher-frequency
($>$kHz) common-mode noise from the laser on the readout signal within the
integration window. It also allowed us to measure a value for $C$ from every
laser pulse (rather than measuring a reference with no microwave pulse on
every other fluorescence readout), maximizing the bandwidth of our readout.
From $C$ we also derived $C^{{}^{\prime}}$ the change in contrast with
microwave drive frequency. This quantity, the slope of the ODMR resonance,
gives a measure of the strength of response and hence sensitivity to the local
environment.

Using the pulsed protocol shown in Fig. 5(b), we first initialized the NV
ensemble into the ground state using pump laser pulse $(n-1)$ of duration
$t_{l}$. The pump laser was then blocked by the AOM during application of
microwave control pulse $n$ of duration $t_{p}$. A subsequent laser pulse $n$
of the same duration $t_{l}$ was then applied and the state read out via
diamond fluorescence emission This pulse also acted to reinitialize the system
back into the $\ket{0}$ state, allowing the next $(n+1)$ pulses to read and
initialise. This method enabled measurements using only a short repeating
sequence in the AWG memory. We acquired data continuously for repeated
sequence sets up to the memory limit of the ADC ($n$=110 pulses when using
$t_{l}$=$3\text{\,}\mathrm{m}\mathrm{s}$). Once this limit was reached, the
data was transferred to computer memory and processed, averaging over all
pulse sequence sets in the acquisition to reduce noise, and then integrating
to obtain $C$.

For direct comparison, we performed the same pulse sequence with the same
readout methods for $C$ using both shaped microwave pulses and standard fixed
amplitude and phase (flat) pulses. We used the same method for calculating $C$
throughout our measurements, to ensure accurate comparison between the
different microwave pulses. In the latter case, we used pulses with a single
microwave drive frequency of the form $\cos(\omega t)$ and three-frequency
drive pulses of the form $\sum_{n\in\\{0,\pm
1\\}}\cos((\omega+n\delta_{l})t+\phi_{n})$ to drive multiple hyperfine
transitions.[67] The latter were generated using the AWG with randomized
phases $\phi_{n}$ for each ADC acquisition to eliminate time-dependent
artifacts.

##  III Results

###  III.1 Laser Pulse Duration

Our previous measurements[68] demonstrated long optical reinitialization
times, requiring many milliseconds on an approximately exponential decay with
laser pulse duration to fully return the ensemble to the ground state. For the
comparably sized ensemble in these experiments, we observed similar
exponential behavior with a time constant of of
$\approx$$1.4\text{\,}\mathrm{m}\mathrm{s}$.

Figure 6: Contrast as a function of laser pulse time $t_{l}$. Below 3 ms,
$t_{l}$ is too short to sufficiently reinitialize the ensemble, leaving to a
reduction in contrast $C$ with shorter readout/reinitilisation laser pulse
length $t_{l}$.

Figure 7: Raw fluorescence readout signal $V_{\text{fl},n}$ and relative
contrast $C_{r,n}(t)=V_{\text{fl},n}-V_{\text{ref},n}$ for the first (n=1) and
last (n=110) $3\text{\,}\mathrm{m}\mathrm{s}$ readout laser pulse in a single
ADC acquisition of 110 readout sequences. No difference within the readout
noise was observed at this readout duration, as would be expected from
hysteresis effects arising from insufficient reinitialization of the ensemble.

Waiting tens of milliseconds per readout would severely limit the number of
pulses we could read and average in a single ADC acquisition and thus our
contrast resolution. We therefore first performed experiments varying laser
pulse duration to determine whether we could initialize and control the
ensemble using shorter laser pulses without suffering hysteresis effects,
either from incomplete initialization or reionization delay across the readout
laser pulses.[69, 70, 71]

Fig. 6 shows the contrast $C$ as a function of laser readout pulse duration
$t_{l}<$20\text{\,}\mathrm{m}\mathrm{s}$$ as measured using an optimal control
pulse. We observed $C$ to be reduced for times shorter than
$\approx$3\text{\,}\mathrm{m}\mathrm{s}$$, indicative that an increasing
number of NV centers in the sample were not fully reinitialized into the
ground state. For $t_{l}$=3ms and above, we observed negligable hysteresis
effects in the fluorescence readout. This is supported by Fig. 7, comparing
the raw fluorescence readout and relative contrast calculated from the first
and last individual readout pulses in a 110 pulse ADC acquisition using
$t_{l}=$3\text{\,}\mathrm{m}\mathrm{s}$$.

Figure 8: Modelled variation in laser intensity and the time to reinitialize
NV centers into the $m_{s}$=0 ground state level as a function of bean radius,
relative to $r_{0}$ the 1/e2 beam width. The reinitialization time increases
rapidly at the lower intensity edges of the beam.

Figure 9: (a) Modeled dynamics of the $m_{s}$=0 population for NV centers
receiving pump beam intensity $I(r)$ at 4 different increasing values of
$r$/$r_{0}$. (b) The hysteresis-free behaviour of the defects within
$r$/$r_{0}<0.5$ dominates the fluorescence output (normalized to the initial
output with all NV centers in the $m_{s}$=0 bright state). The NV centers at
the beam edge that are not fully reinitialized reduce the ensemble contrast as
laser pulse length is reduced, as modeled in (c).

We note that the fact we can achieve the same hysteresis-free contrast for a
short $3\text{\,}\mathrm{m}\mathrm{s}$ laser pulse as for one much longer is
somewhat surprising. We consider that this effect primarily arises due to the
Gaussian intensity profile of the laser, whereby the NV centers at the low
intensity edges of the beam require more time to reinitialize back into the
ground state, but contribute far less to the overall fluorescence output,
especially in the first few milliseconds of the readout laser pulse where
contrast is measured[34]. In order to further investigate the physics of our
NV ensemble and to determine the size of ensemble we address, we implemented a
simple physical model of the NV population dynamics. Our model consists of a
fixed NV density addressed by a radially (Gaussian-) varying laser beam
intensity, with an NV at radius $r$ receiving a pump intensity $I(r)$. We then
solve a rate model for all NV centers,[72, 73] from which we estimate the
relative fluorescence output and ensemble contrast $C$. We perform our
microwave pulses as an ideal $\pi$-pulse with instantaneous population
transfer in the rate model between levels $m_{s}$=0 to $m_{s}$=-1. Further
details of the implementation of the model are given in Supplementary
Information.

In Fig. 8, we plot the relative intensity $I(r)$ and the reinitialization
time, the exponential decay time required for the pump beam to return all NV
centers at $r$ into the $m_{s}$=0 ground state as a function of beam radius
$r$/$r_{0}$. Here $r_{0}$ represents the 1/e2 beam width as in our experiment.
From this simulation, it is clear that the time period over which we integrate
to derive the experimental contrast
($t_{w}$=0.3-$2.7\text{\,}\mathrm{m}\mathrm{s}$) corresponds to near complete
reinitialization of the NV centers within $r$/$r_{0}\approx 0.5$, or
$25\text{\,}\%$ of the ensemble. Although this does not represent the entire
ensemble, this still corresponds to $\approx 1$ billion NV centers, based on
estimated ensemble size (4 $\times$ 109) from our experimental measurement of
fluorescence emission.

The reinitilization dynamic behavior can be seen in Fig. 9(a), plotting the
time evolution of the $m_{s}$=0 state population for the first 10 readout/MW
pulses of length $t_{l}=$3\text{\,}\mathrm{m}\mathrm{s}$$ for 4 increasing
values of $r$/$r_{0}$. Below $r$/$r_{0}=0.5$, hysteresis-free behaviour can be
achieved in our model almost immediately after the first microwave pulse.
Hysteretic behaviour is observed for NV centers further towards the edge of
the beam. For these NV centers, the ground state occupancy decays to
$\approx$50\text{\,}\%$$ within the first 10-20 pulses. These NV centers
therefore contribute by a reduced amount to the contrast (as measured in
$t_{w}$) as compared to the NV centers in the beam centre, which exhibit the
correct dynamics of full reinitialization by the laser and full state transfer
by the microwave $\pi$-pulse. Since the outer NV centers are not fully
reinitialized into the triplet ground state, they also act to produce a lower
fluorescence emission as compared to the level expected with all NV centers
reinitialised into the spin triplet ground state. This can be seen in Fig.
9(b), showing the total ensemble fluorescence emission as a function of time
for $t_{l}=$20\text{\,}\mathrm{m}\mathrm{s}$$ and
$t_{l}=$3\text{\,}\mathrm{m}\mathrm{s}$$ laser pulses. For the shorter pulse
length, a greater number of NV centers are not fully reinitialized, reducing
the the overall fluorescence emission to approximately 90$\%$ of the maximum
reached for $t_{l}$=20ms. Since the NV centers on the beam edge are not
properly reinitialised into the ground state, they also cannot be correctly
manipulated by the microwave state transfer pulse. As laser pulse length
$t_{l}$ is reduced and this fraction of NV centers not fully reinitialised
increases, the effect is therefore a reduction in contrast $C$ following a
microwave pulse. This modelled behaviour can be seen in Fig. 9(c) which
qualitatively replicates our experimental data in Fig. 6.

The ability to rapidly read and reinitialize in this manner is an extremely
useful result, since it gives a means to adequately control and read a large
NV ensemble with shorter laser pulses than that required to fully reinitialize
every defect center. This significantly increases the measurement bandwidth
for pulsed quantum sensing schemes, while still addressing a large number of
defects required to maximize sensitivity.

In order to model fluorescence behavior matching the experimental exponential
decay using a Gaussian beam profile and associated volume, it was necessary to
set modelled pump beam intensity a factor of 6 less than the intensity
estimated experimentally. We attribute this to two factors not included in our
model: reflection loss due to imperfect Brewster’s angle coupling into the
diamond and internal reflection within the diamond, spreading the beam across
a wider volume of NV centers. The estimates of ensemble volume and number of
defects addressed by the pump laser thus represents a lower bound based on the
assumptions of our model. Further model development and investigations beyond
the focus of this work are required to explore these aspects further,
including observing changes in decay time for the fluorescence readout as a
function of beam incidence angle and using a non-Gaussian laser profile.

###  III.2 ODMR Using Shaped Optimal Control Pulses

Figure 10: Comparison of pulsed ODMR measurements using the most sensitive
optimized shaped pulse and the flat pulse that delivers the highest contrast
using three-frequency drive. The slope data shown in (b) is the slope of the
fit to the ODMR data in (a).

Figure 11: The maximum contrast slope $C^{{}^{\prime}}$ measured for flat
single-frequency drive pulses over the relevant parameter space of microwave
power (plotted as Rabi frequency) and duration. The red stripe in the colorbar
shows the maximum contrast slope of the best optimal control pulse from Fig.
10. The equivalent plot for 3 frequency drive is given in the Supplementary
Information.

Figure 12: ODMR spectrum frequency versus contrast slope C${}^{{}^{\prime}}$
for the shaped optimal control pulse and for the best flat 3-frequency drive
pulses of any duration for a given microwave power (plotted as measured Rabi
frequency). Error bars and the y-range of the optimal control pulse represent
1$\sigma$ uncertainty. The power used for the optimal control pulse was 0.91
of the maximum Rabi frequency $\Omega_{0}$. The plot covering the full
parameter space in time and Rabi frequency is given in Supplementary
Information.

Using our optimal control algorithm including all 3 hyperfine levels for ^14N,
we first calculated a series of shaped microwave pulses spanning the parameter
space of $\hat{\Delta}$ and $\hat{\alpha}$, the Rabi frequency limit
$R_{\text{lim}}$, and the pulse duration $t_{p}$. Their performance was then
tested experimentally to explore the limits of these parameters that yield
high contrast $C$ and ODMR slope $C^{{}^{\prime}}$. We found that extending
$\hat{\Delta}$ and $\hat{\alpha}$ beyond
$\pm$1\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$ and $\pm$10\text{\,}\%$$
respectively had negligible impact, likely indicating that the real ensemble
distribution in our diamond was within these ranges. Having found that pulses
in the range of
$$1.1\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$<R_{\text{lim}}<$2.4\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$
and $$1\text{\,}\mathrm{\SIUnitSymbolMicro
s}$<t_{p}<$2\text{\,}\mathrm{\SIUnitSymbolMicro s}$$ performed well, we
experimentally searched the parameter space of these optimal control pulses
applied by producing ODMR spectra using the shaped pulses and searching for
the maximum slope $C^{{}^{\prime}}$. We found the best-performing pulse
optimized with $t_{p}=$1.85\text{\,}\mathrm{\SIUnitSymbolMicro s}$$ and
$R_{\text{lim}}=$1.4\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$, with similar
performance from larger $R_{\text{lim}}$ up to 2 MHz at the same
$R_{\text{exp}}$. The modulation components $I(t)$ and $Q(t)$ for this pulse
are shown in Fig. 3(a), and the control amplitudes are given in the
Supplementary Information.

The experimental ODMR spectrum from the best shaped control pulse found is
shown in Fig. 10(a). By differentiating the spectrum, we also show the
frequency versus contrast slope $C^{{}^{\prime}}$ in Fig. 10(b). Here the
largest possible slope is desired, since this produces the maximum response
and highest sensitivity. For comparison, we plot in the same figure the ODMR
spectrum using a flat three-frequency drive ($\pi$-)pulse that corresponds to
the maximum slope for a conventional pulse without shaping. We found the
maximum slope to be 11$\%$ higher for the shaped optimal control pulse than
for this conventional flat pulse. Compared to the simplest single-frequency
flat ($\pi$-)pulses most used in literature, we found significant improvement
of up to 73%. This corresponds directly to the same factor of improvement in
sensitivity.

We note that the length of the flat and shaped pulse that delivered maximum
slope were significantly different. This could potentially lead to the longer
shaped pulse achieving higher performance purely by delivering more microwave
power over an extended time period. To ensure this was not the case, we
compared the optimised pulse against single and three-frequency drive flat
pulses over an extended parameter space of pulse lengths (up to
$t_{p}=$1.35\text{\,}\mathrm{\SIUnitSymbolMicro s}$$) and applied microwave
power (up to Rabi frequency
$R_{max}=$3\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$) . This data is shown in
Fig. 11 for single frequency drive and Fig. 12 for three-frequency drive. The
flat pulses performed best at the length and power that corresponded to
performing a $\pi$-pulse on the largest possible subset of NV centers
(maximizing contrast). However, as can be seen from these figures, the shaped
microwave pulse we created using our optimal control methods always produced
an ODMR slope far higher than any unshaped drive. This was the case for any
pulse length or microwave power, with the optimum for the flat pulses reached
well within experimental limits of $R_{\text{max}}$ and $t_{p}$.

For our setup, we can estimate shot-noise-limited sensitivity using the
expression derived in Appendix B:

$\eta\approx\frac{\sqrt{2t_{R}t_{I}}}{\gamma_{e}C^{\prime}\tau_{R}(1-e^{-t_{R}/\tau_{R}})\sqrt{R_{0}}},$

where we take into account the times for readout and reinitialization
$t_{R},t_{I}$, the reinitialization decay constant $\tau_{R}$, photon
collection rate at max power $R_{0}$, electron gyromagnetic ratio
$\gamma_{e}$, and measured contrast slope $C^{\prime}$. For our setup, we
estimate
$\eta\approx$10\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$$.
Although this is lower than state of the art figures reported elsewhere for
magnetic field sensing with NV centers, we note that our setup is not
optimized for sensitivity due to the standard optical grade diamond we use
(rather than one materially optimized for sensing), our small APD detector
area and ADC memory limitations.

##  IV Conclusion

In this work, we demonstrate that a large ensemble of solid state defects in a
macroscopic sample can be manipulated and coherently controlled in a manner
beneficial for quantum sensing. We demonstrate this for an ensemble of NV
centers in diamond through the use of shaped microwave pulses generated using
Floquet theory and optimal control methods. Due to the scaling of sensitivity
with the number of defects, such large ensembles are key for quantum sensing
applications, either using NV centers or other solid state defects. Both our
overall NV ensemble volume within the estimated Gaussian beam width ($\approx$
4 $\times$ 109 NV centers in a
$\approx$0.04\text{\,}\mathrm{m}\mathrm{m}^{3}$$ volume) and our estimated NV
ensemble contributing maximally to the contrast signal
($\approx$25\text{\,}\%$$ of the total) was larger than NV ensembles
previously studied and reported in the literature using optimal control
methods largely studied using confocal microscopy.[53, 33, 49, 50, 54, 55, 56]

By fully considering the physics of the defect system and including the
hyperfine interaction in our optimization, we demonstrate an $11\text{\,}\%$
enhancement in ODMR slope with optimized shaped pulses when compared to the
best alternative 3-frequency drive flat (fixed amplitude and phase)
($\pi$-)pulses and a $78\text{\,}\%$ improvement over standard single-
frequency-drive flat ($\pi$-)pulses most commonly used for coherent control in
the literature. These are directly equivalent to the same factor of
sensitivity improvement when used in an applied sensing scheme. This
significant improvement offers potential for wider impact for DC/low-frequency
sensing, for example in precision measurement of slowly varying temperature
where ensemble probe bandwidth limitations imposed by the
$\approx$5\text{\,}\mathrm{\SIUnitSymbolMicro s}$$ shaped pulse length would
be less constraining.

We estimate a shot noise-limited sensitivity of
$10\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{Hz}$ using our setup, while
noting that neither the diamond we use nor our apparatus was optimized to
maximize sensitivity at this time. Our method is not specific to the apparatus
we used and could be applied equally well to a sensitivity-optimized setup,
for example using an isotopically purified diamond. By measuring the ODMR
contrast by referring to the signal from an additional photodetector, we were
able to reject more of the laser technical noise while maximizing the number
of contrast measurements we could achieve as compared to alternative time
domain noise rejection methods [34].

Through modeling of the physical dynamics of the readout and initialization of
the defect ensemble, we show that although many tens of milliseconds are
required to fully reinitialise the whole NV ensemble, a shorter laser pulse
can address and reinitialise a large proportion of the NV centers. By
demonstrating reliable contrast measurements free of hysteresis, we show that
these NV centers can be addressed and controlled reliably. Further work is
required to fully understand the dynamics of the system and the distribution
of pump light in the diamond. However, our measurements suggest the primarily
limiting factor on the readout is the Gaussian shape of the laser beam,
hinting at considerable future improvement using a non-Gaussian profile.

The shaped microwave pulses we generate in this work almost certainly
represent local maxima of performance in a wide parameter space. We consider
it very likely that advances in methods for optimization as well as
experimental improvements could provide even better solutions in future. A
particular flaw is the assumption of simple Gaussian distributions for
detuning and other parameters, which are a poor representation of the actual
properties of a real sample. A route forward may be to use experimental
feedback in the optimization algorithm. This would be simplified by producing
a more homogeneous microwave field through antenna improvements, increasing
the ensemble Rabi frequency through better use of the microwave power, and the
use of alternative laser beam profiles to improve uniformity of initialization
and readout. Additionally, in this work we optimize for state transfer
$\ket{0}$ to $\ket{-1}$, which aims to maximize contrast $C$. By instead
explicitly optimizing for the change in contrast in response to the control
field (the slope $C^{{}^{\prime}}$ in our results above), better optimized
pulses could be generated.

Our work represents an important step in the direction of using optimal
control and other techniques widely used in nuclear magnetic- and electron
spin- resonance experiments to explore the physics of new systems suitable for
quantum sensing. These techniques, including those we outline here, can be
adapted to be widely applicable, not only to diamond but to other defects in
both bulk and novel quantum materials, such as those in 2D materials.[74]
Using control pulses shaped by optimal control methods, which could be either
microwaves, optical fields or some other means, offers the best route to reach
the ultimate $T_{2}^{*}$-limited sensitivity for any suitable quantum system.

##  V Acknowledgements

The work presented here was funded by the Novo Nordisk foundation through the
synergy grant bioQ and the bigQ Center funded by the Danish National Research
Foundation (DNRF).

##  Appendix A Spin Matrices

Below are shown the 6-by-6 matrix representations of the Pauli spin matrices
that are each specific to one of the three nitrogen-14 hyperfine transitions.

$\sigma_{z,1}=\left(\begin{smallmatrix}1&0&0&0&0&0\\\ 0&-1&0&0&0&0\\\
0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&0&0&0\end{smallmatrix}\right),\>\sigma_{z,2}=\left(\begin{smallmatrix}0&0&0&0&0&0\\\
0&0&0&0&0&0\\\ 0&0&1&0&0&0\\\ 0&0&0&-1&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&0&0&0\end{smallmatrix}\right)$ (15)
$\sigma_{z,3}=\left(\begin{smallmatrix}0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\ 0&0&0&0&1&0\\\
0&0&0&0&0&-1\end{smallmatrix}\right),\>\sigma_{x,1}=\left(\begin{smallmatrix}0&1&0&0&0&0\\\
1&0&0&0&0&0\\\ 0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&0&0&0\end{smallmatrix}\right)$ (16)
$\sigma_{x,2}=\left(\begin{smallmatrix}0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&1&0&0\\\ 0&0&1&0&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&0&0&0\end{smallmatrix}\right),\>\sigma_{x,3}=\left(\begin{smallmatrix}0&0&0&0&0&0\\\
0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\ 0&0&0&0&0&1\\\
0&0&0&0&1&0\end{smallmatrix}\right)$ (17)
$\sigma_{y,1}=\left(\begin{smallmatrix}0&-i&0&0&0&0\\\ i&0&0&0&0&0\\\
0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&0&0&0\end{smallmatrix}\right),\>\sigma_{y,2}=\left(\begin{smallmatrix}0&0&0&0&0&0\\\
0&0&0&0&0&0\\\ 0&0&0&-i&0&0\\\ 0&0&i&0&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&0&0&0\end{smallmatrix}\right)$ (18)
$\sigma_{y,3}=\left(\begin{smallmatrix}0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\
0&0&0&0&0&0\\\ 0&0&0&0&0&0\\\ 0&0&0&0&0&-i\\\
0&0&0&0&i&0\end{smallmatrix}\right)$ (19)

##  Appendix B Estimation of shot noise-limited sensitivity

Shot noise-limited sensitivity estimation is typically[30, 67] similar to

$\eta\approx\frac{1}{\gamma_{e}\sqrt{R}C^{\prime}}$

with the electron gyromagnetic ratio $\gamma_{e}$, the photon detection rate
$R$ and the (in this case empirically measured) ODMR slope
$C^{\prime}=\derivative{C}{f}$. This assumes that each collected photon adds
the same amonut of information, which is the case in a typical pulsed
detection setup where the readout time $t_{R}$ is much shorter than the total
reinitialization time $t_{I}$, and the contrast barely decays during $t_{R}$.
We therefore include a factor representing the mean information collected per
photon

$\frac{1}{t_{R}}\int_{0}^{t_{R}}e^{-t/\tau_{R}}\differential
t=\frac{\tau_{R}(1-e^{-t_{R}/\tau_{R}})}{t_{R}}$

with $\tau_{R}\approx$1.4\text{\,}\mathrm{m}\mathrm{s}$$ as the decay constant
of the contrast, making this factor about 0.5. We additionally modify $R$ for
clarity, in terms of the maximum photon collection rate at a peak of the
modulation $R_{0}$, $R=R_{0}t_{R}/2t_{I}$, where the duration of the RF pulse
is neglected, and the $1/2$ results from the modulation. In all, we obtain

$\eta\approx\frac{\sqrt{2t_{R}t_{I}}}{\gamma_{e}C^{\prime}\tau_{R}(1-e^{-t_{R}/\tau_{R}})\sqrt{R_{0}}}.$

## References

  * [1] Tim Schröder, Sara L. Mouradian, Jiabao Zheng, Matthew E. Trusheim, Michael Walsh, Edward H. Chen, Luozhou Li, Igal Bayn, and Dirk Englund.  Quantum nanophotonics in diamond [Invited].  Journal of the Optical Society of America B, 33(4):B65, 2016.
  * [2] Igor Aharonovich, Dirk Englund, and Milos Toth.  Solid-state single-photon emitters.  Nature Photonics, 10(10):631–641, 2016.
  * [3] J. H. N. Loubser and J. A. Van Wyk.  Electron spin resonance in the study of diamond.  Reports on Progress in Physics, 41(8):1201–1248, 1978.
  * [4] J M Taylor, P Cappellaro, L Childress, L Jiang, D Budker, P R Hemmer, A Yacoby, R Walsworth, and M D Lukin.  High-sensitivity diamond magnetometer with nanoscale resolution.  Nature Physics, 4(10):810–816, 2008.
  * [5] Zhi_Hui Wang, G. de Lange, D. Risté, R. Hanson, and V. V. Dobrovitski.  Comparison of dynamical decoupling protocols for a nitrogen-vacancy center in diamond.  Physical Review B - Condensed Matter and Materials Physics, 85(15):155204, 2012.
  * [6] D. Farfurnik, A. Jarmola, L. M. Pham, Z. H. Wang, V. V. Dobrovitski, R. L. Walsworth, D. Budker, and N. Bar-Gill.  Improving the coherence properties of solid-state spin ensembles via optimized dynamical decoupling.  In Jürgen Stuhler and Andrew J. Shields, editors, Quantum Optics. SPIE, April 2016.
  * [7] D. Farfurnik, A. Jarmola, D. Budker, and N. Bar-Gill.  Spin ensemble-based AC magnetometry using concatenated dynamical decoupling at low temperatures.  Journal of Optics (United Kingdom), 20(2), 2018.
  * [8] Genko T. Genov, Yachel Ben-Shalom, Fedor Jelezko, Alex Retzker, and Nir Bar-Gill.  Efficient and robust signal sensing by sequences of adiabatic chirped pulses.  Physical Review Research, 2(3), August 2020.
  * [9] F Jelezko, T Gaebel, I Popa, A Gruber, and J Wrachtrup.  Observation of Coherent Oscillations in a Single Electron Spin.  Physical Review Letters, 92(7):1–4, 2004.
  * [10] F Dolde, H Fedder, M W Doherty, F Rempp, G Balasubramanian, F Reinhard, F Jelezko, and J Wrachtrup.  Sensing electric fields using single diamond spins.  Nature Physics, 7(6):459–463, 2011.
  * [11] P Neumann, I Jakobi, F Dolde, C Burk, R Reuter, G Waldherr, J Honert, T Wolf, A Brunner, J H Shim, D Suter, H Sumiya, J Isoya, and J Wrachtrup.  High-Precision Nanoscale Temperature Sensing Using Single Defects in Diamond.  Nano Letters, 13(6):2738–2742, 2013.
  * [12] T. Delord, L. Nicolas, M. Bodini, and G. Hétet.  Diamonds levitating in a Paul trap under vacuum : Measurements of laser-induced heating via NV center thermometry.  Applied Physics Letters, 111(1):013101, 2017.
  * [13] Marcus W. Doherty, Viktor V. Struzhkin, David A. Simpson, Liam P. McGuinness, Yufei Meng, Alastair Stacey, Timothy J. Karle, Russell J. Hemley, Neil B. Manson, Lloyd C. L. Hollenberg, and Steven Prawer.  Electronic properties and metrology applications of the diamond ${\mathrm{nv}}^{-}$ center under pressure.  Phys. Rev. Lett., 112:047601, Jan 2014.
  * [14] I. Gross, W. Akhtar, V. Garcia, L. J. Martínez, S. Chouaieb, K. Garcia, C. Carrétéro, A. Barthélémy, P. Appel, P. Maletinsky, J.-V. Kim, J. Y. Chauleau, N. Jaouen, M. Viret, M. Bibes, S. Fusil, and V. Jacques.  Real-space imaging of non-collinear antiferromagnetic order with a single-spin magnetometer.  Nature, 549(7671):252–256, Sep 2017.
  * [15] L. Thiel, Z. Wang, M. A. Tschudin, D. Rohner, I. Gutiérrez-Lezama, N. Ubrig, M. Gibertini, E. Giannini, A. F. Morpurgo, and P. Maletinsky.  Probing magnetism in 2d materials at the nanoscale with single-spin microscopy.  Science, 364(6444):973–976, 2019.
  * [16] T Staudacher, F Shi, S Pezzagna, J Meijer, J Du, C A Meriles, F Reinhard, and J Wrachtrup.  Nuclear Magnetic Resonance Spectroscopy on a (5-Nanometer)^3 Sample Volume.  Science, 339(6119):561–563, 2013.
  * [17] I. Lovchinsky, A. O. Sushkov, E. Urbach, N. P. de Leon, S. Choi, K. De Greve, R. Evans, R. Gertner, E. Bersin, C. Müller, L. McGuinness, F. Jelezko, R. L. Walsworth, H. Park, and M. D. Lukin.  Nuclear magnetic resonance detection and spectroscopy of single proteins using quantum logic.  Science, 351(6275):836–842, 2016.
  * [18] Romana Schirhagl, Kevin Chang, Michael Loretz, and Christian L. Degen.  Nitrogen-Vacancy Centers in Diamond: Nanoscale Sensors for Physics and Biology.  Annual Review of Physical Chemistry, 65(1):83–105, 2014.
  * [19] D. Le Sage, K. Arai, D. R. Glenn, S. J. DeVience, L. M. Pham, L. Rahn-Lee, M. D. Lukin, A. Yacoby, A. Komeili, and R. L. Walsworth.  Optical magnetic imaging of living cells.  Nature, 496(7446):486–489, Apr 2013.
  * [20] John F. Barry, Matthew J. Turner, Jennifer M. Schloss, David R. Glenn, Yuyu Song, Mikhail D. Lukin, Hongkun Park, and Ronald L. Walsworth.  Optical magnetic detection of single-neuron action potentials using quantum defects in diamond.  Proceedings of the National Academy of Sciences of the United States of America, 113(49):14133–14138, 2016.
  * [21] F Gorrini, R Giri, C E Avalos, S Tambalo, S Mannucci, L Basso, and N Bazzanella.  Fast and sensitive detection of paramagnetic species using coupled charge and spin dynamics in strongly fluorescent nanodiamonds.  ACS Applied Materials and Interfaces, 27(11):24412–24422, 2019\.
  * [22] G. Kucsko, P. C. Maurer, N. Y. Yao, M. Kubo, H. J. Noh, P. K. Lo, H. Park, and M. D. Lukin.  Nanometre-scale thermometry in a living cell.  Nature, 500(7460):54–58, Aug 2013.
  * [23] Masazumi Fujiwara, Simo Sun, Alexander Dohms, Yushi Nishimura, Ken Suto, Yuka Takezawa, Keisuke Oshimi, Li Zhao, Nikola Sadzak, Yumi Umehara, Yoshio Teki, Naoki Komatsu, Oliver Benson, Yutaka Shikano, and Eriko Kage-Nakadai.  Real-time nanodiamond thermometry probing in vivo thermogenic responses.  Science Advances, 6(37), 2020.
  * [24] James L. Webb, Luca Troise, Nikolaj W. Hansen, Jocelyn Achard, Ovidiu Brinza, Robert Staacke, Michael Kieschnick, Jan Meijer, Jean-François Perrier, Kirstine Berg-Sørensen, Alexander Huck, and Ulrik Lund Andersen.  Optimization of a diamond nitrogen vacancy centre magnetometer for sensing of biological signals.  Frontiers in Physics, 8, October 2020.
  * [25] Phila Rembold, Nimba Oshnik, Matthias M. Müller, Simone Montangero, Tommaso Calarco, and Elke Neu.  Introduction to quantum optimal control for quantum sensing with nitrogen-vacancy centers in diamond.  AVS Quantum Science, 2(2):024701, 2020.
  * [26] F. Jelezko and J. Wrachtrup.  Single defect centres in diamond: A review.  Physica Status Solidi (A) Applications and Materials Science, 203(13):3207–3225, 2006.
  * [27] Adam M. Wojciechowski, Mürsel Karadas, Christian Osterkamp, Steffen Jankuhn, Jan Meijer, Fedor Jelezko, Alexander Huck, and Ulrik L. Andersen.  Precision temperature sensing in the presence of magnetic field noise and vice-versa using nitrogen-vacancy centers in diamond.  Applied Physics Letters, 113(1):013502, July 2018.
  * [28] Ilja Fescenko, Andrey Jarmola, Igor Savukov, Pauli Kehayias, Janis Smits, Joshua Damron, Nathaniel Ristoff, Nazanin Mosavian, and Victor M. Acosta.  Diamond magnetometer enhanced by ferrite flux concentrators.  Physical Review Research, 2(2), jun 2020.
  * [29] Masfer Alkahtani, Johannes Lang, Boris Naydenov, Fedor Jelezko, and Philip Hemmer.  Growth of high-purity low-strain fluorescent nanodiamonds.  ACS Photonics, 6(5):1266–1271, April 2019.
  * [30] A. Dréau, M. Lesik, L. Rondin, P. Spinicelli, O. Arcizet, J. F. Roch, and V. Jacques.  Avoiding power broadening in optically detected magnetic resonance of single NV defects for enhanced dc magnetic field sensitivity.  Physical Review B - Condensed Matter and Materials Physics, 84(19):1–8, 2011.
  * [31] John F. Barry, Jennifer M. Schloss, Erik Bauch, Matthew J. Turner, Connor A. Hart, Linh M. Pham, and Ronald L. Walsworth.  Sensitivity Optimization for NV-Diamond Magnetometry.  Reviews of Modern Physics, 92:015004, 2020.
  * [32] Keigo Arai, Junghyun Lee, Chinmay Belthangady, David R Glenn, Huiliang Zhang, and Ronald L. Walsworth.  Geometric phase magnetometry using a solid-state spin.  Nature Communications, 9(1):4996, 2018.
  * [33] Tobias Nöbauer, Andreas Angerer, Björn Bartels, Michael Trupke, Stefan Rotter, Jörg Schmiedmayer, Florian Mintert, and Johannes Majer.  Smooth Optimal Quantum Control for Robust Solid-State Spin Magnetometry.  Physical Review Letters, 115(19):190801, nov 2015.
  * [34] Thomas Wolf, Philipp Neumann, Kazuo Nakamura, Hitoshi Sumiya, Takeshi Ohshima, Junichi Isoya, and Jörg Wrachtrup.  Subpicotesla diamond magnetometry.  Physical Review X, 5(4):1–10, 2015.
  * [35] Dieter Suter and Fedor Jelezko.  Single-spin magnetic resonance in the nitrogen-vacancy center of diamond.  Progress in Nuclear Magnetic Resonance Spectroscopy, 98-99:50–62, 2017.
  * [36] C. Müller, X. Kong, J. M. Cai, K. Melentijevic, A. Stacey, M. Markham, D. Twitchen, J. Isoya, S. Pezzagna, J. Meijer, J. F. Du, M. B. Plenio, B. Naydenov, L. P. McGuinness, and F. Jelezko.  Nuclear magnetic resonance spectroscopy with single spin sensitivity.  Nature Communications, 5:1–2, 2014.
  * [37] Dmitry Budker.  Extreme nuclear magnetic resonance: Zero field, single spins, dark matter….  Journal of Magnetic Resonance, 306:66–68, 2019.
  * [38] A Gruber, A Dräbenstedt, C Tietz, L Fleury, J Wrachtrup, and C Von Borczyskowski.  Scanning Confocal Optical Microscopy and Magnetic Resonance on Single Defect Centers.  Science, 276(5321):2012–2014, 1997.
  * [39] Gopalakrishnan Balasubramanian, Philipp Neumann, Daniel Twitchen, Matthew Markham, Roman Kolesov, Norikazu Mizuochi, Junichi Isoya, Jocelyn Achard, Johannes Beck, Julia Tissler, Vincent Jacques, Philip R. Hemmer, Fedor Jelezko, and Jörg Wrachtrup.  Ultralong spin coherence time in isotopically engineered diamond.  Nature Materials, 8(5):383–387, April 2009.
  * [40] Priyadharshini Balasubramanian, Christian Osterkamp, Yu Chen, Xiuliang Chen, Tokuyuki Teraji, E. Wu, Boris Naydenov, and Fedor Jelezko.  dc magnetometry with engineered nitrogen-vacancy spin ensembles in diamond.  Nano Letters, 19(9):6681–6686, August 2019.
  * [41] Forrest T. Charnock and T. A. Kennedy.  Combined optical and microwave approach for performing quantum spin operations on the nitrogen-vacancy center in diamond.  Physical Review B, 64(4), June 2001.
  * [42] Jennifer M Schloss, John F Barry, Matthew J Turner, and Ronald L Walsworth.  Simultaneous Broadband Vector Magnetometry Using Solid-State Spins.  Physical Review Applied, 10(3):034044, 2018.
  * [43] Andrew Horsley, Patrick Appel, Janik Wolters, Jocelyn Achard, Alexandre Tallaire, Patrick Maletinsky, and Philipp Treutlein.  Microwave device characterization using a widefield diamond microscope.  Physical Review Applied, 10(4), October 2018.
  * [44] J-M Cai, B Naydenov, R Pfeiffer, L P McGuinness, K D Jahnke, F Jelezko, M B Plenio, and A Retzker.  Robust dynamical decoupling with concatenated continuous driving.  New Journal of Physics, 14(11):113023, November 2012.
  * [45] G. de Lange, Z. H. Wang, D. Riste, V. V. Dobrovitski, and R. Hanson.  Universal dynamical decoupling of a single solid-state spin from a spin bath.  Science, 330(6000):60–63, September 2010.
  * [46] Matti J Huotari.  Biosensing by insect olfactory receptor neurons.  Sensors and Actuators B-chemical, 71(July):212–222, 2000.
  * [47] Heidi A Kluess, Audrey J Stone, and Kirk W Evanson.  ATP overflow in skeletal muscle 1A arterioles.  Journal of Physiology, 588(16):3089–3100, 2010.
  * [48] Alfredo de la Escosura-Muñiz and Arben Merkoci.  Nanochannels Preparation and Application in Biosensing.  ACS Nano, 6(9):7556–7583, 2012.
  * [49] Tobias Nöbauer, Andreas Angerer, Björn Bartels, Michael Trupke, Stefan Rotter, Jörg Schmiedmayer, Florian Mintert, and Johannes Majer.  Smooth Optimal Quantum Control for Robust Solid-State Spin Magnetometry - Supplementary material.  Physical Review Letters, 115(19):1–6, 2015.
  * [50] Björn Bartels and Florian Mintert.  Smooth optimal control with Floquet theory.  Physical Review A - Atomic, Molecular, and Optical Physics, 88(5):1–7, 2013.
  * [51] Navin Khaneja, Timo Reiss, Cindie Kehlet, Thomas Schulte-Herbrüggen, and Steffen J. Glaser.  Optimal control of coupled spin dynamics: Design of NMR pulse sequences by gradient ascent algorithms.  Journal of Magnetic Resonance, 172(2):296–305, 2005.
  * [52] R C Constantin Brif and H Rabitz.  Control of quantum phenomena: past, present and future.  New Journal of Physics, 12(7):075008, 2010.
  * [53] Bartels Bjorn.  Smooth Optimal Control of Coherent Quantum Dynamics.  PhD thesis, Albert-Ludwigs-Universitat Freiburg, 2015.
  * [54] S. Hernández-Gómez, F. Poggiali, P. Cappellaro, and Nicole Fabbri.  Quantum control-enhanced sensing and spectroscopy with NV qubits in diamond.  In Mario Agio, Cesare Soci, and Matthew T. Sheldon, editors, Quantum Nanophotonic Materials, Devices, and Systems 2019. SPIE, September 2019\.
  * [55] Philipp Konzelmann, Torsten Rendler, Ville Bergholm, Andrea Zappe, Veronika Pfannenstill, Marwa Garsi, Florestan Ziem, Matthias Niethammer, Matthias Widmann, Sang Yun Lee, Philipp Neumann, and Jörg Wrachtrup.  Robust and efficient quantum optimal control of spin probes in a complex (biological) environment. Towards sensing of fast temperature fluctuations.  New Journal of Physics, 20(12):1–29, 2018.
  * [56] Lihong Dong, Hang Liang, Chang Kui Duan, Ya Wang, Zhaokai Li, Xing Rong, and Jiangfeng Du.  Optimal control of a spin bath.  Physical Review A, 99(1):1–6, 2019.
  * [57] Florian Dolde, Ville Bergholm, Ya Wang, Ingmar Jakobi, Boris Naydenov, Sébastien Pezzagna, Jan Meijer, Fedor Jelezko, Philipp Neumann, Thomas Schulte-Herbrüggen, Jacob Biamonte, and Jörg Wrachtrup.  High-fidelity spin entanglement using optimal control.  Nature Communications, 5(1), February 2014.
  * [58] James L. Webb, Joshua D. Clement, Luca Troise, Sepehr Ahmadi, Gustav Juhl Johansen, Alexander Huck, and Ulrik L. Andersen.  Nanotesla sensitivity magnetic field sensing using a compact diamond nitrogen-vacancy magnetometer.  Applied Physics Letters, 114(23):231103, 2019.
  * [59] F. Poggiali, P. Cappellaro, and N. Fabbri.  Optimal Control for One-Qubit Quantum Sensing.  Physical Review X, 8(2):021059, jun 2018.
  * [60] Thomas E Skinner, Timo O Reiss, Burkhard Luy, Navin Khaneja, and Steffen J Glaser.  Application of optimal control theory to the design of broadband excitation pulses for high-resolution NMR.  Journal of Magnetic Resonance, 163:8–15, 2003.
  * [61] G. Goelman, S. Vega, and D Zax.  Design of broadband propagators in two-level systems.  Physical Review A, 39(11):5725–5743, 1989.
  * [62] Thomas E. Skinner and Naum I. Gershenzon.  Optimal control design of pulse shapes as analytic functions.  Journal of Magnetic Resonance, 204(2):248–255, 2010.
  * [63] Haitham A.R. El-Ella, Sepehr Ahmadi, Adam M. Wojciechowski, Alexander Huck, and Ulrik L. Andersen.  Optimised frequency modulation for continuous-wave optical magnetic resonance sensing using nitrogen-vacancy ensembles.  Opt. Express, 25(13):14809–14821, 2017.
  * [64] Sepehr Ahmadi.  Continuous-Wave Magnetic Field Sensing with Nitrogen-Vacancy Centers in Diamond.  PhD thesis, Technical University of Denmark, 2018.
  * [65] Alper Genc and Reyhan Baktur.  Tunable Microstrip Bandpass Filters Based on Planar Split Ring Resonators.  IEEE Conference Presentation, page 4, 2008.
  * [66] Edlyn V. Levine, Matthew J. Turner, Pauli Kehayias, Connor A. Hart, Nicholas Langellier, Raisa Trubko, David R. Glenn, Roger R. Fu, and Ronald L. Walsworth.  Principles and techniques of the quantum diamond microscope.  Nanophotonics, 8(11):1945–1973, September 2019.
  * [67] Haitham A. R. El-Ella, Sepehr Ahmadi, Adam M. Wojciechowski, Alexander Huck, and Ulrik L. Andersen.  Optimised frequency modulation for continuous-wave optical magnetic resonance sensing using nitrogen-vacancy ensembles.  Optics Express, 25(13):14809, 2017.
  * [68] James L. Webb, Luca Troise, Nikolaj W. Hansen, Jocelyn Achard, Ovidiu Brinza, Robert Staacke, Michael Kieschnick, Jan Meijer, Jean-François Perrier, Kirstine Berg-Sørensen, Alexander Huck, and Ulrik Lund Andersen.  Optimization of a diamond nitrogen vacancy centre magnetometer for sensing of biological signals.  Frontiers in Physics, 8, October 2020.
  * [69] R. Giri, F. Gorrini, C. Dorigoni, C. E. Avalos, M. Cazzanelli, S. Tambalo, and A. Bifone.  Coupled charge and spin dynamics in high-density ensembles of nitrogen-vacancy centers in diamond.  Physical Review B, 98(4), July 2018.
  * [70] N.B. Manson and J.P. Harrison.  Photo-ionization of the nitrogen-vacancy center in diamond.  Diamond and Related Materials, 14(10):1705–1710, October 2005.
  * [71] N Aslam, G Waldherr, P Neumann, F Jelezko, and J Wrachtrup.  Photo-induced ionization dynamics of the nitrogen vacancy defect in diamond investigated by single-shot charge state detection.  New Journal of Physics, 2013.
  * [72] Lucio Robledo, Hannes Bernien, Toeno van der Sar, and Ronald Hanson.  Spin dynamics in the optical cycle of single nitrogen-vacancy centres in diamond.  New Journal of Physics, 13(2):025013, February 2011.
  * [73] Yannick Dumeige, Jean-Francois Roch, Fabien Bretenaker, Thierry Debuisschert, Victor Acosta, Christoph Becher, Georgios Chatzidrosos, Arne Wickenbrock, Lykourgos Bougas, Alexander Wilzewski, and Dmitry Budker.  Infrared laser magnetometry with a NV doped diamond intracavity etalon.  Optics Express, 27(2):1706, 2019.
  * [74] Andreas Gottscholl, Mehran Kianinia, Victor Soltamov, Sergei Orlinskii, Georgy Mamin, Carlo Bradac, Christian Kasper, Klaus Krambrock, Andreas Sperlich, Milos Toth, Igor Aharonovich, and Vladimir Dyakonov.  Initialization and read-out of intrinsic spin defects in a van der Waals crystal at room temperature.  Nature Materials, 19(May):540–545, 2020.