# Optimal Control Theory Techniques for Nitrogen Vacancy Ensembles in Single
Crystal Diamond

Madelaine S.Z. Liddy  The Institute for Quantum Computing, University of
Waterloo, 200 University Avenue, Waterloo, N2L 3G1, ON, Canada  Department of
Electrical and Computer Engineering, University of Waterloo, 200 University
Avenue, Waterloo, N2L 3G1, ON, Canada  Corresponding email:
<EMAIL_ADDRESS>Troy Borneman  The Institute for Quantum Computing,
University of Waterloo, 200 University Avenue, Waterloo, N2L 3G1, ON, Canada
High Q Technologies, 485 Wes Graham Way, Waterloo, N2L 6R2, ON, Canada  Peter
Sprenger  The Institute for Quantum Computing, University of Waterloo, 200
University Avenue, Waterloo, N2L 3G1, ON, Canada  David Cory  The Institute
for Quantum Computing, University of Waterloo, 200 University Avenue,
Waterloo, N2L 3G1, ON, Canada  Department of Chemistry, University of
Waterloo, 200 University Avenue, Waterloo, N2L 3G1, ON, Canada

###### Abstract

Nitrogen Vacancy Center Ensembles are excellent candidates for quantum sensors
due to their vector magnetometry capabilities, deployability at room
temperature and simple optical initialization and readout. This work describes
the engineering and characterization methods required to control all four
Principle Axis Systems (P.A.S.) of NV ensembles in a single crystal diamond
without an applied static magnetic field. Circularly polarized microwaves
enable arbitrary simultaneous control with spin-locking experiments and
collective control using Optimal Control Theory (OCT) in a (100) diamond.
These techniques may be further improved and integrated to realize high
sensitivity NV-based quantum sensing devices using all four P.A.S. systems.

##  1 Introduction

Nitrogen Vacancy (NV) Centers have great potential in the area of quantum
sensing. The NV’s sensitivity to magnetic fields combined with their ability
to be used at room temperature make them excellent test beds for exploring the
engineering requirements of quantum sensing [1]. Sensing applications with NV
centers include imaging small magnetic fields [2], imaging nearby bacteria and
molecules [3, 4, 5, 6], sensing DC and AC magnetic fields [1, 7], and sensing
crystal strain in the diamond lattice [8, 9]. These applications may be
enhanced by using ensembles of NV centers that increase the signal to noise
ratio by having more active centers in the same focal volume and allow for
richer sensor information to be extracted through vector measurements.

Control of all four NV orientations present in an ensemble, both sequentially
and simultaneously, has been achieved with the use of multiple central
microwave frequencies for vector magnetometry and for detecting temperature
and magnetic fields simultaneously [10, 11, 12]. This paper presents an
Optimal Control Theory (OCT) controls-based solution for distinguishable
manipulation of all four orientations while maintaining a compact hardware
design. OCT has been previously used in NV ensembles to develop pulses robust
to the nitrogen hyperfine coupling and inhomogeneities from the microwave
field from control striplines; along with several other examples [13, 14].

Our OCT solutions are implemented using a single central control frequency and
circularly polarized microwave fields, which enables control in zero applied
magnetic field over a selected focal volume of NVs taken from the uniformly
distributed centers in the diamond. The complex structure of the microwave
control field is described by a simple Hamiltonian used to optimize OCT pulses
for two key target examples: (100) and (110) diamond. Measurements were
explicitly run on a (100) diamond sample to characterize phenomenological
Hamiltonian parameters in order to demonstrate orientation-selective spin-
locking and a set of OCT pulses that implement identity and transition-
selective $\pi$ operations, respectively, over all NV orientations in the
ensemble.

##  2 Modelling the NV Ensemble

###  2.1 NV Ensemble Structure and Circularly Polarized Microwave Control

An NV center is created in a diamond lattice by replacing a carbon atom with a
nitrogen and removing an adjacent carbon, [15]. The six electrons found within
the NV- center combine to form an effective spin-1 particle [15, 16, 17]
quantized by a zero field splitting (ZFS) $(\Delta\approx 2.87$ GHz) [18, 19].
Generally, an NV Hamiltonian will also include a transverse ZFS due to crystal
strain, $E(S_{x}^{2}-S_{y}^{2})$, an electron Zeeman interaction,
$\gamma_{e}\vec{B}\cdot\vec{S}$, nuclear Zeeman interactions for both the
nitrogen and nearby carbon-13 nuclei, $\gamma_{N/C}\vec{B}\cdot\vec{I_{N/C}}$,
nitrogen and carbon hyperfine interactions,
$A_{N/C}\vec{S}\cdot\vec{I_{N/C}}$, and a nitrogen nuclear quadrupole
interaction, $QI_{Nz}^{2}$. However, the experiments in this work are
performed in zero applied static magnetic field and in a low strain crystal
so, for simplicity, the NV Hamiltonian is reduced to only the axial ZFS term:

$\begin{split}\mathcal{H}_{int}&=\Delta S_{z}^{2}\end{split}$ (1)

Within the single crystal diamond structure, there are four unique possible
orientations of the bond between the nitrogen and vacancy, leading to four
principal axis systems (P.A.S.) for the NV Hamiltonian (Fig 1). Fixing the
vacancy to the relative center of the $sp_{3}$ hybridized structure, the
orientations correspond to the Nitrogen replacing any of the four connecting
carbons [15, 20, 21, 22]. Control of all four orientations simultaneously is
challenging, as a single control field will not have identical action on all
orientations [15, 18].

Figure 1:  (a) The four possible principal axis systems (P.A.S.s) of an NV
center in the diamond lattice, defined by the vector joining the Nitrogen
(grey) and Vacancy (white-dashed). The magnetic distinguishability of the four
orientations make control of ensembles of NVs non-trivial.
(b) The four P.A.S.s of NVs in the lab frame for (100) and (110) diamond.
Images generated in Inkscape.

The spatial orientation of the microwave field relative to the four P.A.S.s
may be chosen to uniquely define either two or four sub-ensembles. For
example, if the microwave field is chosen to be along the “xz” lab plane, then
it projects onto the (100) diamond to create two effective sub-ensembles: Pair
A, given by the degenerate (-1,-1,-1) $\&$ (1,-1,-1) P.A.S.s; and Pair B,
given by the degenerate (1,1,1) $\&$(-1,1,-1) P.A.S.s. The (100) diamond was
chosen for our demonstration experiments because of this symmetry, allowing
for convenient collective control and equivalent fluorescence from all
orientations. This same field will project onto four unique control
Hamiltonians for the (110) diamond, enabling further control application
targets.

The conventional method for obtaining universal control of the spin-1 NV is to
add a static external magnetic field that breaks the degeneracy of the
$\ket{\pm 1}$ ground spin states, resulting in unique splittings of the
$\ket{0}\leftrightarrow\ket{+1}$ and $\ket{0}\leftrightarrow\ket{-1}$
transitions for each P.A.S. [23, 24, 25, 26, 27, 28, 29]. Alternatively,
circularly polarized microwave fields realized with two or more channels with
independent amplitude and phase control may be used to obtain transition-
selective control to avoid the hardware complexity of adding an external field
to the experimental setup, [23, 24, 25, 26, 27, 28, 29].

###  2.2 The Spatial Components of the Microwave Control Field

We chose to use two parallel microstrip resonators to create independently
controllable microwave fields (figure 11). Each microstrip was 7.5 mm long,
127 $\mu$m wide, and 17.5 $\mu$m tall, with a spacing of 150 $\mu$m between
them to avoid optical interference while still delivering sufficient microwave
power within the focal volume. Figure 2 shows the resulting microwave fields
of the resonator arrangement within the cross section of a $300~{}\mu$m thick
diamond mounted atop the two microstrips. The limit of the working distance
(WD limit) of the (100x) optical objective from the top of the diamond is
indicated on the figure. The $160~{}\mu$m working distance results in the
focal area being $70~{}\mu$m away from the microstrips, minimizing the
reflected signal of incoming green light off the microstrips.

For optimal control efficiency, the orthogonality between the two fields
should be maximized, $\eta=90^{\circ}$, shown by solving for $\eta$ in the
control Hamiltonian in equation 3. However, even with sub-optimal field
orthogonality, OCT pulses may still be found that achieve good control
outcomes, as long as there is some non-commutativity of the control fields,
[24, 25, 29].

Figure 2: Field distribution from each microstrip channel, CH1 (gray), and CH2
(red), at the location of the NV focal volume (blue arrow), with $\eta$
indicating the orthogonality of the two fields emitted from each microstrip.
The field seen by an NV at a given location is the superposition of the fields
from each microstrip. The y-direction is omitted, as the microstrips are
effectively infinite in that direction. The cross section of the $300~{}\mu$m
thick diamond is shown, which combined with the $160~{}\mu$m working distance
of the objective, places the focal volume $\approx 70\mu m$ away from the
microstrips (WD limit), reducing the reflected light from the microstrips.
Image generated in Mathematica.

The following microwave field components may be substituted into the control
Hamiltonian in equation 3:

$\begin{split}w_{x1}&=\frac{\mu_{o}I_{1o}}{2\pi
L}\left(\arctan{\left(\frac{x-L}{z}\right)}-\arctan{\left(\frac{x}{z}\right)}+\arctan{\left(\frac{x-L}{z+h}\right)}-\arctan{\left(\frac{x}{z+h}\right)}\right)\\\
w_{y1}&=0\\\ w_{z1}&=\frac{\mu_{o}I_{1o}}{4\pi
L}\left(\ln{\left(\frac{z^{2}+x^{2}}{z^{2}+(x-L)^{2}}\right)}+\ln{\left(\frac{(z+h)^{2}+x^{2}}{(z+h)^{2}+(x-L)^{2}}\right)}\right)\\\
w_{x2}&=\frac{\mu_{o}I_{2o}}{2\pi
L}\bigg{(}\arctan{\left(\frac{L+w-x}{z}\right)}-\arctan{\left(\frac{2L+w-x}{z}\right)}+\dots\\\
&\arctan{\left(\frac{L+w-x}{z+h}\right)}-\arctan{\left(\frac{2L+w-x}{z+h}\right)}\bigg{)}\\\
w_{y2}&=0\\\ w_{z2}&=\frac{\mu_{o}I_{2o}}{4\pi
L}\left(\ln{\left(\frac{z^{2}+(L+w-x)^{2}}{z^{2}+(2L+w-x)^{2}}\right)}+\ln{\left(\frac{(z+h)^{2}+(L+w-x)^{2}}{(z+h)^{2}+(2L+w-x)^{2}}\right)}\right)\end{split}$
(2)

Where $\mu_{o}$ is the magnetic permeability for free space, $I_{1/2o}$ is the
current running through each microstrip, $L$ is the length of the microstrips,
$w$ is the distance between each microstrip and $x$ and $z$ are the location
of the center of the focal volume relative to the origin.

###  2.3 P.A.S.-Dependent control Hamiltonian

There are three important frames to consider when describing the control
Hamiltonian: the lab frame, the diamond crystal frame, and the NV P.A.S..
Expressing all components in a common frame, and then rotating into the frame
of the internal Hamiltonian (eq.1) yields the control Hamiltonian in equation
3, the full derivation of which may be found in the supplementary information:

$\begin{split}\mathcal{H}_{ctrl}&=AS_{x}+BS_{y}^{\prime}+CS_{y}+DS_{x}^{\prime}\\\
&A=\frac{1}{2}(R_{xx}(I_{1}w_{x1}+I_{2}w_{x2})+R_{yx}(I_{1}w_{y1}+I_{2}w_{y2})+R_{zx}(I_{1}w_{z1}+I_{2}w_{z2}))\\\
&B=-\frac{1}{2}(R_{xx}(Q_{1}w_{x1}+Q_{2}w_{x2})+R_{yx}(Q_{1}w_{y1}+Q_{2}w_{y2})+R_{zx}(Q_{1}w_{z1}+Q_{2}w_{z2}))\\\
&C=\frac{1}{2}(R_{xy}(I_{1}w_{x1}+I_{2}w_{x2})+R_{yy}(I_{1}w_{y1}+I_{2}w_{y2})+R_{zy}(I_{1}w_{z1}+I_{2}w_{z2}))\\\
&D=-\frac{1}{2}(R_{xy}(Q_{1}w_{x1}+Q_{2}w_{x2})+R_{yy}(Q_{1}w_{y1}+Q_{2}w_{y2})+R_{zy}(Q_{1}w_{z1}+Q_{2}w_{z2}))\end{split}$
(3)

The Hamiltonian is expressed in a letter format to show the division between
the four standard spin-1 operators, $S_{x/y}$, and “twisted” spin-1 operators,
$S_{x/y}^{{}^{\prime}}=i[S_{y/x},S_{z}^{2}]$, resulting from moving into the
interaction frame of the internal Hamiltonian [30, 31]. It is the presence of
all four of these operators that allows for access to transition-selective
control in the absence of an applied static magnetic field. This Hamiltonian
displays a dependence on the geometric relationship of the NV P.A.S.s
($R_{xx},R_{xy},R_{zx}$ etc.(SI Fig: 15)) unique to each NV, the spatial
components of the microwave control field ($w_{x1},w_{x2}$ etc.), and the four
control channels of an AWG ($I_{1},I_{2},Q_{1},Q_{2}$) used to create the
control signals.

##  3 OCT Design of Transition-Selective Pulses in Zero Field

Optimal control theory (OCT) is used extensively in quantum control and has
recently been proven useful for finding robust control solutions in quantum
sensing [13, 14, 32]. OCT algorithms generally proceed by optimizing a set of
parameterized controls to achieve a desired quantum operation subject to
constraints when calculated over a set of Hamiltonians and noise/environment
processes. In the most common implementations, the quantum operation is
defined to specify either desired state-to-state transitions [33, 34] or a
full unitary or completely positive trace-preserving (CPTP) map [35].
Noise/environment processes and constraints can generally include any process
that can be modelled compactly, such as field inhomogeneities [36, 37],
limited Rabi frequency [38], and control system distortions [39, 40].

In our control situation, the projection of the control fields onto the unique
set of NV P.A.S. orientations leads to an incoherent distribution of
Hamiltonians that may be treated by optimizing over a direct sum
representation of the dynamics [36, 41, 42]. The validity of the direct sum
representation is helped by the average dipolar coupling between NV centers in
the chosen experimental sample being on the order of kilohertz, allowing the
control Hamiltonians to be considered independent over each subensemble.
Coupling between NV centers may be added for future iterations [43].

In our application, OCT pulses are found using the gradient ascent pulse
engineering (GRAPE) algorithm implemented in the Quantum Utils package [14,
30, 31, 44, 45]. To create a pulse, an initial guess of the pulse shape is
made, then updated successively using gradient techniques until the desired
map or state-to-state transfer is achieved up to a target performance. The
target unitary or state-to-state transfer is given a target fidelity or state
overlap (0.99), internal Hamiltonian ($\Delta S_{z}^{2}$), set of control
Hamiltonians (eq.3) and parameterized controls ($I_{1},I_{2},Q_{1},Q_{2}$) as
inputs. The total length of the pulse is given by the number of time steps
multiplied by the length of each time step. The chosen physical control fields
result in two or four control Hamiltonians for the (100) and (110) diamonds,
respectively.

###  3.1 Defining Transition-Selective Maps

To aid finding and visualizing intuitive solutions, pseudo spin-$\frac{1}{2}$
operators may be used in place of standard spin-1 operators [46]. These are
not true spin-$\frac{1}{2}$ operators, as the $\ket{\pm 1}$ states share a
space with the same $\ket{0}$ state, but conveniently represent the pulse
action over states of interest. The pseudo spin-$\frac{1}{2}$ operators are
labelled as $S_{x/y/z}^{\pm}$ for the $\ket{0},\ket{+1}$ and
$\ket{0},\ket{-1}$ state pairs, respectively. Expressions for pseudo
spin-$\frac{1}{2}$ operators in terms of spin-1 operators are shown below,
with the matrix forms found in equation 31 of the supplementary information.

$S_{x}^{\pm}=\frac{1}{\sqrt{2}}(S_{x}\pm i[S_{y},S_{z}^{2}])$ (4)
$S_{y}^{\pm}=\frac{1}{\sqrt{2}}(S_{y}\mp i[S_{x},S_{z}^{2}])$ (5)
$S_{z}^{\pm}=\frac{1}{2}S_{z}\pm\mathds{1}_{3}\mp\frac{3}{2}S_{z}^{2}$ (6)

The pseudo spin-$\frac{1}{2}$ operators obey the standard commutation
relations of the Pauli operators (i.e.
$[S_{x}^{\pm},S_{y}^{\pm}]=2iS_{z}^{\pm}$), allowing for maps to be
constructed in the same fashion as for spin-$\frac{1}{2}$ particles. As such,
the OCT maps may be defined with the general unitary operator in equation 7,
where ($\alpha$) is the rotation angle, $(\hat{n})$ is the unit vector
defining the rotation axis, and $S^{\pm}$ defines the total list of operators,
$S^{\pm}=\\{Sx^{\pm},Sy^{\pm},Sz^{\pm}\\}$. The (+) or (-) operators are
chosen depending on which state transitions are desired, the matrix form of
the positive operator shown as an example.

$\begin{split}U^{\pm}&=\mathds{1}_{3}-\mathds{1^{\pm}}+\cos{\left(\frac{\alpha}{2}\right)}\mathds{1}^{\pm}-i\sin{\left(\frac{\alpha}{2}\right)}\left(\hat{n}\cdot
S^{\pm}\right)\\\ U^{+}&=\left(\begin{array}[]{ccc}1&0&0\\\
0&-\cos{\left(\frac{\alpha}{2}\right)}+in_{z}\sin{\left(\frac{\alpha}{2}\right)}&(in_{x}+n_{y})\sin{\frac{\alpha}{2}}\\\
0&(in_{x}-n_{y})\sin{\frac{\alpha}{2}}&-\cos{\left(\frac{\alpha}{2}\right)}-in_{z}\sin{\left(\frac{\alpha}{2}\right)}\end{array}\right)\end{split}$
(7)

###  3.2 Transition-Selective OCT Pulse

As an example of optimizing a transition-selective OCT pulse, consider a
selective $\pi_{+/y}$ pulse on the (100) diamond that enacts a $\pi_{y}$
rotation in the positive pseudo-subspace and an identity operation in the
negative: ($\alpha=\pi,n_{x}=0,n_{y}=1,n_{z}=0$). The action of this pulse may
be understood through two sets of Bloch spheres, defined over $S^{\pm}$,
respectively through
$\left<(X/Y/Z)^{+/-}\right>=Tr[S_{(x/y/z)}^{+/-}.\rho_{t}]$ [31]. Figure 3
shows the action of a single OCT pulse on the positive (top) and negative
(bottom) Bloch spheres, respectively. The starting state is indicated with a
red sphere and final state with a black sphere, while the trajectory of the
pulse is shown in grey.

Recall that the (100) diamond has only two non-degenerate elements in the
incoherent distribution of control Hamiltonians under the chosen microwave
field orientation. The trajectory for the (-1,-1,1) $\&$ (1,-1,-1) NV sub-
ensemble (A) has been shown. The trajectory of the (1,1,1) $\&$ (-1,1,-1) NV
sub-ensemble (B) is shown in figure 14. The mapping of the selective $\pi_{+}$
pulse is clearly seen with the starting states of $\ket{0}$ and $\ket{+1}$ in
the positive Bloch spheres, rotating to $\ket{+1}$ and $\ket{0}$,
respectively. The shared $\ket{0}$ state may also be observed with the
negative Bloch sphere. The correct operation of the intended identity pulse,
beginning in the $\ket{-1}$ state is most clearly observed in the negative
Bloch sphere. This is further reflected in the positive sphere as the starting
and ending state is observed to be at the origin of the positive sphere,
indicating no population.

Figure 3: Bloch sphere representations of the action of a transition-selective
OCT pulse, optimized to implement a selective $\pi_{+}$ operation. The
“z”-axis for the positive and negative spheres correspond to the $\ket{0}$ and
$\ket{+(-1)}$ states. The positive “x”-axis corresponds to the
$\frac{\ket{0}+\ket{\pm 1}}{\sqrt{2}}$ state for the positive and negative
Bloch spheres, while the positive y-axis corresponds to the
$\frac{\ket{0}+i\ket{\pm 1}}{\sqrt{2}}$ state. The starting state is indicated
as a red dot, the final state as a black dot, and the state trajectory as a
grey line. In this figure, only the trajectory of the pulse on sub-ensemble
(A) is shown. The OCT pulse may be seen to successfully implement a $\pi_{+}$
transition between the $\ket{0}$ and $\ket{+1}$ states while simultaneously
performing an identity operation if the starting state is $\ket{-1}$. Images
generated in Mathematica.

###  3.3 Orientation-Selective OCT Pulse

While the (100) diamond is an excellent candidate for demonstrating collective
control with two sub-ensembles of NV pairs, the (110) diamond configuration
may be used to investigate the full potential of separately controlling all
four unique NV orientations within the single crystal. In this case there are
four non-degenerate elements in the incoherent distribution of control
Hamiltonians under the chosen microwave field orientation. Figure 4 shows the
Bloch sphere representations of the action of a single orientation-selective
OCT pulse (Table 1) that simultaneously implements a unique operator for each
NV orientation.

Table 1: Operators for each NV Orientation in figure 4 Operator | NV Orientation
---|---
$\pi)_{x/+}$ | (1,1,1)
$\frac{\pi}{2}\big{)}_{\overline{y}/+}$ | (-1,-1,1)
$\mathds{1}_{\pm}$ | (-1,1,-1)
$\frac{\pi}{2}\big{)}_{\overline{x}/-}$ | (1,-1,-1)

Figure 4: Simulation of an OCT pulse that implements a unique operation on
each NV orientation within a (110) diamond. The simultaneous success of each
operation showcases the ability for OCT pulses to perform both transition-
selective and orientation-selective operations within a single pulse. Images
generated in Mathematica.

##  4 Characterization of the NV Ensemble

###  4.1 The Sample and Experimental System Design

For all the experiments performed, a $500~{}\mu$m thick DNV-B1 (100) diamond
from Element Six was used, which contained an estimated 16 000 NV centers
within a focal volume of beam diameter 0.59 $\mu$m and depth of field 2.51
$\mu$m [47, 48]. This sample was chosen, as opposed to the ideal $300~{}\mu$m
thick sample, to keep the focal volume well out of range of the microstrips,
removing any reflected light from the microstrips. The Gaussian optics at the
site of the focal volume are shown in figure 8 in the supplementary
information. Extending beyond the sample, a description of the full optical
layout may also be found in the supplementary information. As the experiments
were performed at room temperature, the NVs were excited with off-resonant
green light, and the red light emission collected with an avalanche photo-
diode (APD).

###  4.2 First Calibration Experiment - Equal Fluorescence from All
Orientations

To remove any bias towards any one orientation, the fluorescence from each
orientation first had to be equalized. The orientation-dependent fluorescence
from the centers may be controlled by changing the incoming optical
polarization [31, 49, 50, 51]. Equation 8 describes how the output intensity
of the NV is related to how much the P.A.S. “z”-axis deviates from the
propagation axis of the incoming light, ($\theta$), and how much the NVs’
“x”-axis deviates from the polarization of the incoming light, ($\phi$). The
total emission is the sum of the emission from the $E_{y}$ and $E_{x}$ excited
states, where maximizing $E_{y}$ minimizes $E_{x}$, and vice-versa. $E_{y}$ is
dependent only on the $\phi$ angle, while $E_{x}$ is dependent on both $\phi$
and $\theta$ [31, 49, 50, 51]:

$\begin{split}IE_{y}(\phi)&=\sin(\phi)^{2}\\\
IE_{x}(\theta,\phi)&=\cos(\theta)^{2}\cos(\phi)^{2}\\\
ITot(\theta,\phi)&=\sin(\phi)^{2}+\cos(\theta)^{2}\cos(\phi)^{2}\end{split}$
(8)

(100) diamond is an experimentally convenient crystal as all NV orientations
deviate from the light propagation axis at the same angle ($\theta$), so
fluorescence may be optimized by adjusting only the $\phi$ parameter. Figure 5
shows the optically detected magnetic resonance-continuous wave (ODMR-CW)
spectra of the diamond with a static magnetic field added for convenience to
resolve the four orientations into eight peaks. ODMR-CW experiments were
performed to monitor relative fluorescence incrementally as a Half Wave Plate
(HWP) was rotated, beginning at a relative $0^{\circ}$. At $20^{\circ}$ and
$60^{\circ}$, the fluorescence favouring either of the two orientations may be
seen. At $0^{\circ}$ and $40^{\circ}$, a more even emission from each
orientation is indicated. The optimal value providing even fluorescence across
all orientations was found to be $42^{\circ}$.

Figure 5: ODMR-CW spectra as a function of incoming optical polarization,
dictated by the rotation of a HWP in Degrees. A static magnetic field was
added to resolve eight peaks from the four orientations. Changes in incoming
light polarization change the alignment of the light electric field with the
electric dipole of the NV, causing fluorescence to be favoured in some
orientations. For (100) diamond,a single polarization value could be found
with equal fluorescence from each NV orientation, removing bias in the control
measurement outcomes.

###  4.3 Determining a Phenomenological Control Hamiltonian

Equation 3 provides a formal description of the influence of the P.A.S.,
microwave spatial components, and AWG controls on the form of the control
Hamiltonian. However, accurately determining the parameters necessary to fully
specify the formal Hamiltonian proved difficult. Instead, the OCT experiments
performed in this work enlist a phenomenological control Hamiltonian (equation
9), that includes experimentally measured parameters. The two microstrips
provide the input control amplitudes ($\Omega_{1/2}$) and global control phase
($\Delta\theta$), recalling these are simply the polar coordinates of the
Cartesian controls shown in the _a priori_ Hamiltonian. The Hamiltonian also
contains the measured Rabi drive strength $(\Omega_{NV_{A/B}})$ for each of
the NV sub-ensembles pair (A) and (B) and the experimental phase value
$(\eta)$ [31].

$\begin{split}\mathcal{H}_{A/B}&=\Omega_{NV_{A/B}}(\frac{\Omega_{1}}{2}S_{x}+\frac{\Omega_{2}}{2}\cos(\Delta\theta)\cos(\eta)S_{x}+\frac{\Omega_{2}}{2}\cos(\Delta\theta)\sin(\eta)S_{y}\\\
&+\frac{\Omega_{2}}{2}\sin(\Delta\theta)\sin(\eta)S_{x}^{{}^{\prime}}+\frac{\Omega_{2}}{2}\sin(\Delta\theta)\cos(\eta)S_{y}^{{}^{\prime}})\end{split}$
(9)

A Dual Channel Rabi experiment was used to measure the strength of the Rabi
drive for each sub-ensemble, $\Omega_{NV_{A/B}}$. Figure 6 shows how
$\Omega_{NV_{A/B}}$ (“y-axis”) changes by varying the control phase
$\Delta\theta$. In this case, the phase of the second channel varied
$\theta_{2}=\Delta\theta$ (“x-axis”) while maintaining a fixed phase of the
first channel $\theta_{1}=0^{\circ}$ and fixed control amplitude
$\Omega_{1/2}=1$ [24, 31]. The error bars indicate the full width at half
maximum of the gathered spectra.

Figure 6: The Dual Channel Rabi Experiment shows the sub-ensemble Rabi
frequency dependence on the relative control phase. The high frequency sub-
ensemble (A) (-1,-1,-1)$\&$(1,-1,-1) is indicated with (red) and low frequency
sub-ensemble (B) (1,1,1)$\&$(-1,1,-1), with (black). For each data point, the
relative phase was changed between the two channels $\Delta\theta$ and
resulting Rabi frequencies $\Omega_{NV_{A/B}}$ gathered. The results yield a
very strong phase dependence on the measured Rabi frequency for each of the
sub-ensembles as a function of $\cos(\Delta\theta)^{2}$. For our OCT
experiments, the control phase values were fixed, and amplitude-only control
was used for pulse design.

The results show a strong dependence of the measured Rabi frequencies
$\Omega_{NV_{A/B}}$ on the relative phase $\Delta\theta$ as a
$\cos(\Delta\theta)^{2}$ function. The phase response is more dramatic for the
high-frequency (-1,-1,-1)$\&$(1,-1,-1) pair (A) (red) than for the low-
frequency (1,1,1)$\&$(-1,1,-1) pair (B) (black). To accommodate the
relationship between the input control phase and output $\Omega_{NV_{A/B}}$, a
map associating this behaviour would have to be included in optimization for
each input control phase ($\Delta\theta$). Our chosen alternative approach was
to fix the input control phase, resulting in a fixed $\Omega_{NV_{A/B}}$, and
only optimize the two input amplitudes ($\Omega_{1/2}$) using OCT.

##  5 Demonstrating Control of NV Ensembles

###  5.1 Demonstrating Orientation Selectivity With a Spin-locking Experiment

Preliminary control was demonstrated with a spin-locking experiment that
suppresses the evolution of each sub-ensemble selectively [31]. Only one
microwave channel is required to perform the spin-locking experiment. In this
experiment, the control Hamiltonian rotates one sub-ensemble to the ”x“-axis,
suppressing its evolution while allowing the other sub-ensemble to evolve, the
details of which are in the supplementary information (figure 12). The results
of the spin-locking experiment (black, solid) are plotted over the Rabi
spectra (black,dashed) in figure 7, with arrows indicating which sub-ensemble
was suppressed.

Figure 7: The Rabi frequency spectra (black, dashed) show two frequencies from
the two sub-ensembles of NV orientations in the (100) diamond. The spin-
locking results are overlaid (black, solid), indicating which of the two sub-
ensemble is being suppressed in the experiment with an arrow. There is a clear
selective suppression of either the low- or high-frequency peak for each
experiment. The spin-locking experiment provides a controls-based solution
comparable to the results obtained when optical polarization is changed,
suppressing the fluorescence of a chosen orientation.

There is a clear selective suppression for each of the sub-ensembles in the
spin-locking experiment. The ability to suppress the signal of each of the
sub-ensembles allows for each to be studied independently, providing a
controls-based solution as an alternative to changing the optical polarization
to suppress fluorescence from individual orientations.

###  5.2 Experimental Implementation of OCT

Expanding beyond the spin-locking experiments, a few proof of concept OCT
experiments were performed. The dual channel Rabi experiment yielded
$\Omega_{NVA}=2.64~{}$MHz and $\Omega_{NVB}=1.03~{}$MHz, with an experimental
phase value of $\eta=115^{\circ}$, at a fixed global control phase of
$\Delta\theta=270^{\circ}$. These values were used to optimize OCT pulses
using amplitude-only controls ($\Omega_{1/2}$ in equation 9). The resulting
optimized pulse shape is shown in figure 13. Pulses were optimized using a
state-to-state target similar to an Identity operation,
$\ket{0}\bra{0}\rightarrow\ket{0}\bra{0}$, and selective $\pi$-type operation
$\ket{0}\bra{0}\rightarrow\ket{+1}\bra{+1}$, respectively. The state-to-state
transfer could be achieved in 250 steps of 40 ns each, for a total pulse
length of $10~{}\mu$s. In contrast, 800 steps ($32~{}\mu$s long pulse) were
necessary to achieve a complete selective $\pi_{+}$ map under the same
experimental conditions.

The results of the experimental implementation of several different optimized
OCT pulses are shown in table 2 [31]. The experimental photon counts for each
pulse implementation are normalized to a reference count of the $\ket{0}$
state. In an ideal case, the Identity-like operation would yield a population
of 100$\%$ $\ket{0}$ and the $\pi$-like operation, $0\%$. The results show a
reasonable distinguishability between the behaviour of the two pulse types,
with consistent results optimizing over either sub-ensemble (A), (B), or both.

Table 2: Normalized photon count collected following implementation of six OCT pulses, and the corresponding population of the $\ket{0}$ state. These experiments represent an Identity $(\ket{0}\bra{0}\rightarrow\ket{0}\bra{0})$ and single transition $\pi$ pulse $(\ket{0}\bra{0}\rightarrow\ket{+1}\bra{+1})$ optimized for NV pair (A), (B), and both pairs (AB). Experiment | $\mathds{1}_{A}$ | $\pi_{+A}$ | $\mathds{1}_{B}$ | $\pi_{+B}$ | $\mathds{1}_{AB}$ | $\pi_{+AB}$
---|---|---|---|---|---|---
Normalized Counts | 0.94(0) | 0.91(7) | 0.94(0) | 0.91(9) | 0.93(9) | 0.92(5)
Population of $\ket{0}$ | 40$\pm$1.5$\%$ | 17$\pm$1.5$\%$ | 40$\pm$1.5$\%$ | 19$\pm$1.5$\%$ | 39$\pm$1.5$\%$ | 25$\pm$1.5$\%$

The limited Rabi drive strength for each of the NV sub-ensembles required the
use of long pulses that were sensitive to experimental unknowns, limiting the
contrast between the identity and $\pi$ pulses. To improve the results,
another set of pulses was optimized that accounted for a small variation in
the zero field splitting ($\approx 100$ kHz) while maintaining the same
$10~{}\mu$s pulse length. These robust pulses improved the population results
of the identity experiments to $53\%$, while leaving the $\pi$ pulse
performance unchanged [31]. The hyperfine interaction with the nitrogen
nuclear spin was also identified as a significant source of error. Simulations
of the experimentally implemented pulses that included the nitrogen hyperfine
interaction gave performance that more closely matched the experimental
results. Robustness to this hyperfine interaction was not included in
optimizations as the control amplitude for each of the ensembles (1.03 MHz
$\&$ 2.64 MHz) was too small to effectively account for the hyperfine
interaction (2.16 MHz).

##  6 Conclusion

This paper presented a controls based solution with a generalized control
Hamiltonian for understanding the dynamics of an ensemble of NVs within a
(100) and (110) single crystal diamond. We demonstrated primitive control of
NVs within a (100) diamond using a spin-locking experiment, then using
measured values gathered through characterization experiments, collective
control for all orientations of NVs with a phenomenological Hamiltonian was
demonstrated with distinguishable proof of concept Identity and $\pi_{+}$
experiments using OCT pulses.

These proof of concept experiments on the (100) diamond were completed with an
arbitrary NV focal volume, minimal distinguishability between the two control
fields and one central control frequency. In addition, early optimization with
a small static field showed a large improvement in the pulse success,
indicating the potential for success in future robustness optimizations.

Having an arbitrary focal volume did showcase the ability of the OCT pulses,
but having some guidance on the focal volume would improve the non-commutivity
between the pulses, extending their capabilities. Using a thinner diamond
would allow for the NV focal volume to be closer to the microstrips,
increasing the Rabi drive strength and reducing the length of the pulse,
allowing for better robustness to RF inhomogeneities and hyperfine splittings
with the nitrogen and nearby carbon nuclear spins. Robust OCT pulses can be
incorporated into existing chemical sensing schemes to enhance their
capabilities.

Without altering the experimental setup, a (110) diamond may be used, where
four unique orientations are desired. In this case, each orientation may be
selectively controlled to either sequentially or simultaneously detect complex
magnetic fields as desired by the experiment, further expanding the
applications of OCT controlled systems.

## Declarations

###  6.1 Funding

This research was undertaken thanks in part to funding from the Canada First
Research Excellence Fund (CFREF) and the funding collaboration with NSERC DND.
The authors declare to have no financial interests.

###  6.2 Conflict of interest

The authors declare that they have no conflict of interest.

###  6.3 Availability of data and materials

The datasets generated during and/or analysed during the current study are
available from the corresponding author on reasonable request.

## References

  * [1] 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.  Rev. Mod. Phys., 92(1):015004, March 2020.  Publisher: American Physical Society.
  * [2] L Rondin, J-P Tetienne, T Hingant, J-F Roch, P Maletinsky, and V Jacques.  Magnetometry with nitrogen-vacancy defects in diamond.  Rep. Prog. Phys., 77(5):056503, May 2014.
  * [3] David R. Glenn, Kyungheon Lee, Hongkun Park, Ralph Weissleder, Amir Yacoby, Mikhail D. Lukin, Hakho Lee, Ronald L. Walsworth, and Colin B. Connolly.  Single-cell magnetic imaging using a quantum diamond microscope.  Nature Methods, 12(8):736–738, August 2015.  Number: 8 Publisher: Nature Publishing Group.
  * [4] Zeeshawn Kazi, Isaac M. Shelby, Hideyuki Watanabe, Kohei M. Itoh, Vaithiyalingam Shutthanandan, Paul A. Wiggins, and Kai-Mei C. Fu.  Wide-Field Dynamic Magnetic Microscopy Using Double-Double Quantum Driving of a Diamond Defect Ensemble.  Phys. Rev. Applied, 15(5):054032, May 2021.  Publisher: American Physical Society.
  * [5] 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, April 2013.  Number: 7446 Publisher: Nature Publishing Group.
  * [6] Benjamin Rocco Moss.  Nitrogen Vacancy Diamond Quantum Sensing Applied to Mapping Magnetic Fields of Bacteria.  Master’s thesis, University of Massachusetts Boston, United States – Massachusetts, 2021.  ISBN: 9798516097881.
  * [7] Eisuke Abe and Kento Sasaki.  Tutorial: Magnetic resonance with nitrogen-vacancy centers in diamond—microwave engineering, materials science, and magnetometry.  Journal of Applied Physics, 123(16):161101, March 2018.  Publisher: American Institute of Physics.
  * [8] Mason C. Marshall, Reza Ebadi, Connor Hart, Matthew J. Turner, Mark J.H. Ku, David F. Phillips, and Ronald L. Walsworth.  High-Precision Mapping of Diamond Crystal Strain Using Quantum Interferometry.  Phys. Rev. Applied, 17(2):024041, February 2022.  Publisher: American Physical Society.
  * [9] Mason C. Marshall, David F. Phillips, Matthew J. Turner, Mark J. H. Ku, Tao Zhou, Nazar Delegan, F. Joseph Heremans, Martin V. Holt, and Ronald L. Walsworth.  Scanning X-Ray Diffraction Microscopy for Diamond Quantum Sensing.  Phys. Rev. Applied, 16(5):054032, November 2021.  Publisher: American Physical Society.
  * [10] Jeong Hyun Shim, Seong-Joo Lee, Santosh Ghimire, Ju Il Hwang, Kwang-Geol Lee, Kiwoong Kim, Matthew J. Turner, Connor A. Hart, Ronald L. Walsworth, and Sangwon Oh.  Multiplexed sensing of magnetic field and temperature in real time using a nitrogen vacancy spin ensemble in diamond.  Phys. Rev. Applied, 17(1):014009, January 2022.  Publisher: American Physical Society.
  * [11] Tatsuma Yamaguchi, Yuichiro Matsuzaki, Soya Saijo, Hideyuki Watanabe, Norikazu Mizuochi, and Junko Ishi-Hayase.  Control of all the transitions between ground state manifolds of nitrogen vacancy centers in diamonds by applying external magnetic driving fields.  Jpn. J. Appl. Phys., 59(11):110907, November 2020.  Publisher: IOP Publishing.
  * [12] Chen Zhang, Heng Yuan, Ning Zhang, Lixia Xu, Jixing Zhang, Bo Li, and Jiancheng Fang.  Vector magnetometer based on synchronous manipulation of nitrogen-vacancy centers in all crystal directions.  J. Phys. D: Appl. Phys., 51(15):155102, March 2018.  Publisher: IOP Publishing.
  * [13] Andreas F. L. Poulsen, Joshua D. Clement, James L. Webb, Rasmus H. Jensen, Kirstine Berg-Sørensen, Alexander Huck, and Ulrik Lund Andersen.  Optimal control of a nitrogen-vacancy spin ensemble in diamond for sensing in the pulsed domain.  arXiv:2101.10049 [physics, physics:quant-ph], January 2021.  arXiv: 2101.10049.
  * [14] 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 Sci., 2(2):024701, June 2020.  Publisher: American Vacuum Society.
  * [15] Romana Schirhagl, Kevin Chang, Michael Loretz, and Christian L. Degen.  Nitrogen-vacancy centers in diamond: nanoscale sensors for physics and biology.  Annu Rev Phys Chem, 65:83–105, 2014.
  * [16] Koji Kobashi.  Diamond Films: Chemical Vapor Deposition for Oriented and Heteroepitaxial Growth, Elsevier Science.  2010\.
  * [17] N. B. Manson, J. P. Harrison, and M. J. Sellars.  Nitrogen-vacancy center in diamond: Model of the electronic structure and associated dynamics.  Phys. Rev. B, 74(10):104303, September 2006.  Publisher: American Physical Society.
  * [18] J. A. Larsson and P. Delaney.  Electronic structure of the nitrogen-vacancy center in diamond from first-principles theory.  Phys. Rev. B, 77:165201, Apr 2008.
  * [19] Giulia Petrini, Ekaterina Moreva, Ettore Bernardi, Paolo Traina, Giulia Tomagra, Valentina Carabelli, Ivo Pietro Degiovanni, and Marco Genovese.  Is a Quantum Biosensing Revolution Approaching? Perspectives in NV-Assisted Current and Thermal Biosensing in Living Cells.  Advanced Quantum Technologies, page 2000066, 2020.  _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/qute.202000066.
  * [20] M. W. Doherty, F. Dolde, H. Fedder, F. Jelezko, J. Wrachtrup, N. B. Manson, and L. C. L. Hollenberg.  Theory of the ground-state spin of the nv- center in diamond.  Phys. Rev. B, 85:205203, May 2012.
  * [21] Ádám Gali.  Ab initio theory of the nitrogen-vacancy center in diamond.  Nanophotonics, 8(11):1907–1943, November 2019.  Publisher: De Gruyter.
  * [22] L. M. Pham, N. Bar-Gill, D. Le Sage, C. Belthangady, A. Stacey, M. Markham, D. J. Twitchen, M. D. Lukin, and R. L. Walsworth.  Enhanced metrology using preferential orientation of nitrogen-vacancy centers in diamond.  Phys. Rev. B, 86(12):121202, September 2012.  Publisher: American Physical Society.
  * [23] Thiago P. Mayer Alegre, Charles Santori, Gilberto Medeiros-Ribeiro, and Raymond G. Beausoleil.  Polarization-selective excitation of nitrogen vacancy centers in diamond.  Phys. Rev. B, 76(16):165205, October 2007.  Publisher: American Physical Society.
  * [24] Till Lenz, Arne Wickenbrock, Fedor Jelezko, Gopalakrishnan Balasubramanian, and Dmitry Budker.  Magnetic sensing at zero field with a single nitrogen-vacancy center.  Quantum Sci. Technol., 6(3):034006, June 2021.  Publisher: IOP Publishing.
  * [25] M. Mrózek, J. Mlynarczyk, D. S. Rudnicki, and W. Gawlik.  Circularly polarized microwaves for magnetic resonance study in the GHz range: Application to nitrogen-vacancy in diamonds.  Appl. Phys. Lett., 107(1):013505, July 2015.  Publisher: American Institute of Physics.
  * [26] Xiaoying Yang, Ning Zhang, Heng Yuan, Guodong Bian, Pengcheng Fan, and Mingxin Li.  Microstrip-line resonator with broadband, circularly polarized, uniform microwave field for nitrogen vacancy center ensembles in diamond.  AIP Advances, 9(7):075213, July 2019.
  * [27] Heng Yuan, Xiaoying Yang, Ning Zhang, Zhiqiang Han, Lixia Xu, Jixing Zhang, Guodong Bian, Pengcheng Fan, Mingxin Li, and Yuchen Liu.  Frequency-tunable and Circularly Polarized Microwave Resonator for Magnetic Sensing with NV Ensembles in Diamond.  IEEE Sensors Journal, pages 1–1, 2020.  Conference Name: IEEE Sensors Journal.
  * [28] Huijie Zheng, Arne Wickenbrock, Georgios Chatzidrosos, Lykourgos Bougas, Nathan Leefer, Samer Afach, Andrey Jarmola, Victor M. Acosta, Jingyan Xu, Geoffrey Z. Iwata, Till Lenz, Zhiyin Sun, Chen Zhang, Takeshi Ohshima, Hitoshi Sumiya, Kazuo Nakamura, Junichi Isoya, Jörg Wrachtrup, and Dmitry Budker.  Novel Magnetic-Sensing Modalities with Nitrogen-Vacancy Centers in Diamond.  Engineering Applications of Diamond, January 2021.  Publisher: IntechOpen.
  * [29] Huijie Zheng, Jingyan Xu, Geoffrey Z. Iwata, Till Lenz, Julia Michl, Boris Yavkin, Kazuo Nakamura, Hitoshi Sumiya, Takeshi Ohshima, Junichi Isoya, Jörg Wrachtrup, Arne Wickenbrock, and Dmitry Budker.  Zero-Field Magnetometry Based on Nitrogen-Vacancy Ensembles in Diamond.  Phys. Rev. Applied, 11(6):064068, June 2019.  Publisher: American Physical Society.
  * [30] Hincks, Ian.  Exploring Practical Methodologies for the Characterization and Control of Small Quantum Systems.  PhD Thesis, UWSpace, 2018.
  * [31] Liddy, Madelaine.  Optimal Control Theory Techniques for Nitrogen Vacancy Ensembles.  PhD Thesis, UWSpace, 2022.
  * [32] F. Poggiali, P. Cappellaro, and N. Fabbri.  Optimal control for one-qubit quantum sensing.  Phys. Rev. X, 8(2):021059, June 2018.  Publisher: American Physical Society.
  * [33] Kyryl Kobzar, Thomas E Skinner, Navin Khaneja, Steffen J Glaser, and Burkhard Luy.  Exploring the limits of broadband excitation and inversion pulses.  J Magn Reson, 170(2):236–243, Oct 2004.
  * [34] Soumyajit Mandal, Van D M Koroleva, Troy W Borneman, Yi-Qiao Song, and Martin D Hürlimann.  Axis-matching excitation pulses for cpmg-like sequences in inhomogeneous fields.  J Magn Reson, 237:1–10, Dec 2013.
  * [35] Navin Khaneja, Timo O. Reiss, Burkhard Luy, and Steffen J. Glaser.  Optimal control of spin dynamics in the presence of relaxation.  Journal of magnetic resonance, 162 2:311–9, 2002.
  * [36] Troy W Borneman, Martin D Hürlimann, and David G Cory.  Application of optimal control to cpmg refocusing pulse design.  J Magn Reson, 207(2):220–233, Dec 2010.
  * [37] Kyryl Kobzar, Sebastian Ehni, Thomas E. Skinner, Steffen J. Glaser, and Burkhard Luy.  Exploring the limits of broadband 90$\,{}^{\circ}$ and 180$\,{}^{\circ}$ universal rotation pulses.  Journal of Magnetic Resonance, 225:142–160, 2012.
  * [38] Kyryl Kobzar, Thomas E. Skinner, Navin Khaneja, Steffen J. Glaser, and Burkhard Luy.  Exploring the limits of broadband excitation and inversion: II. Rf-power optimized pulses.  Journal of Magnetic Resonance, 194(1):58–66, 2008.
  * [39] Troy W Borneman and David G Cory.  Bandwidth-limited control and ringdown suppression in high-q resonators.  J Magn Reson, 225:120–129, Dec 2012.
  * [40] I. N. Hincks, C. E. Granade, T. W. Borneman, and D. G. Cory.  Controlling quantum devices with nonlinear hardware.  Phys. Rev. Appl., 4:024012, Aug 2015.
  * [41] N. Boulant, J. Emerson, T. F. Havel, D. G. Cory, and S. Furuta.  Incoherent noise and quantum information processing.  J. Chem. Phys., 121(7):2955–2961, August 2004.  Publisher: American Institute of Physics.
  * [42] Marco A. Pravia, Nicolas Boulant, Joseph Emerson, Amro Farid, Evan M. Fortunato, Timothy F. Havel, R. Martinez, and David G. Cory.  Robust control of quantum information.  J. Chem. Phys., 119(19):9993–10001, November 2003.  Publisher: American Institute of Physics.
  * [43] Ralf Wunderlich, Robert Staacke, Wolfgang Knolle, Bernd Abel, Jürgen Haase, and Jan Meijer.  Robust nuclear hyperpolarization driven by strongly coupled nitrogen vacancy centers.  Journal of Applied Physics, 130(10):104301, September 2021.  Publisher: American Institute of Physics.
  * [44] 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, February 2005.
  * [45] Christopher Wood, Ian Hincks, and Christopher Granade.  Quantumutils for mathematica, 2014.
  * [46] A. Abragam.  The Principles of Nuclear Magnetism, Clarendon Press.  1961\.
  * [47] Element Six.  DNV-B1 3.0x3.0mm, 0.5mm thick, June 2020.
  * [48] Element Six.  Unlocking next generation quantum technologies, June 2020.
  * [49] Victor Marcel Acosta.  Optical magnetometry with nitrogen-vacancy centers in diamond.  PhD thesis, University of California, Berkley, Spring 2011.
  * [50] J R Maze, A Gali, E Togan, Y Chu, A Trifonov, E Kaxiras, and M D Lukin.  Properties of nitrogen-vacancy centers in diamond: the group theoretic approach.  New J. Phys., 13(2):025025, feb 2011.
  * [51] Amir Waxman.  Sensitive Magnetometry Based on NV Centers in Diamonds.  PhD thesis, University of the Negev, 2014.
  * [52] David S Simon.  Gaussian beams and lasers, Morgan and Claypool Publishers.  2053-2571. 2016.

##  7 Supplementary information

###  7.1 Mapping the Gaussian Beam in the Diamond Sample

In addition to the control field at the site of the NV focal volume shown in
figure 2, the Gaussian sites at the focal volume must be considered, and how
the intensity of the beam changes as the beam diverges from the focal volume
to the surface of the PCB board, as shown in figure 8. There should be a high
and uniform intensity at the focal volume, but the intensity should drop off
quickly so that there is no background signal picked up from reflecting off
the PCB board and microstrips.

The inset of figure 8 shows the intensity of the beam at the focal spot. With
a 100x objective, this focal spot is quite small with beam diameter 0.59(4)
$\mu$m and beam depth of field 2.51(4) $\mu$m, containing $\approx 16000$ NV
centers. As with all Gaussian beams, the intensity is halved at the Rayleigh
range ($Z_{R}$) away from the center and $\frac{1}{e^{2}}$ at the beam radius
($\omega_{o}$) away from the center [52]. Expanding beyond this, even at twice
each of these values, the intensity of the beam has reduced by -1dB of the
maximum intensity at the center of the focal volume. As the intensity dies off
very quickly away from the center of the focal spot, only the NVs inside the
focal spot are considered as the effective part of the ensemble.

The figure does show how the beam diverges well beyond the focal spot,
however, due to the Gaussian nature of the beam, the intensity of the beam
reduces quickly. Presented in a log scale, it is seen that at the point when
the beam hits the PCB board, its intensity is already reduced by -3.5 dB to -5
dB. This further motivates using a thicker diamond ($>300~{}\mu$m) and
objective with a shorter working distance ($160~{}\mu$m) to limit how close
the focal volume may be to the PCB board, thus reducing the intensity
sufficiently to make reflections off the PCB board negligible. To further
reduce the background signal from reflections, a knotch and long pass filters
are added inline with the emission path.

Figure 8: The simulated image shows the Gaussian beam being focused into the
diamond sample, indicating relative sizes of the diamond, PCB microstrips and
NVs within the spot size of the objective. While there is swelling of the
green light observed, the intensity of this quickly decays outside the focal
volume. At the point the intensity of the green light hits the PCB surface, it
is reduced by -3.5 dB to -5 dB from the maximum point at the focal point so
reflections off the PCB may be neglected. Image Generated in Mathematica.
Inset: The intensity of a Gaussian Beam at the focal volume of the objective.
The beam diameter of the 100x objective is twice the minimum beam waist,
$\omega_{o}$, 0.59(4) $mu$m. The depth of the field is twice the Rayleigh
length $Z_{R}$, 2.51(4) $\mu$m. At the Rayleigh length away, along the optical
axis, the intensity of the beam is 50$\%$(0.69 dB) of the intensity at the
maximum. At the edge of beam waist, the intensity is $\frac{1}{e^{2}}$ of the
maximum at the center. The intensity of the beam drops off very quickly
outside the depth of field and beam diameter, at a value of twice of each, it
is already at 1$\%$(-1 dB) of the maximum intensity at the center of the focal
volume. In this case only the NV centers within the focal volume are
considered an effective part of the ensemble.

###  7.2 Block Layout of the Optical Components

The block layout of the optical components in the NV ensemble setup is shown
in figure 9. This setup was designed to be easily adjusted to a single NV
confocal setup should the experimental need arise. The block layout contains
the laser box, switch arm, mode shaping arm, scanning optics and detection box
as the main modules.

The laser box contains the source laser generating a beam at 532 nm, The
switch arm contains an AOM as the fast optical switch in a double pass switch
configuration to increase the ON:OFF contrast. The mode shaping arm corrects
for spatial aberrations from the previous two modules and contains the half
wave plate which is used to change the incoming optical polarization, used to
equalize the fluorescence from the ensemble, shown in figure 5. Following the
mode shaping arm, the beam is directed to the objective with a dichroic
mirror, chosen to reflect green light on the excitation path and transmit red
on the emission path. The objective directs the green light to the sample,
mounted atop a stage and collects the fluorescent red light emitted from the
NVs, sending it to the detection box. The detection box contains a pinhole, a
spatial filter for the emitted light followed by an Avalanche Photo Diode
(APD), for photon detection. A more detailed account of the optical layout is
available in [31].

Figure 9: The block layout of the optical setup. The laser box generates a
continuous beam at 532nm. A double pass switch arm contains the AOM optical
switch, used for its fast switching times and large contrast ratio between the
ON and OFF intensity. The mode shaping arm corrects for beam shape aberrations
as well as sets the desired optical polarization of the beam. The scanning
optics focus the beam into the diamond sample, exciting the NVs with green
light. The detector box collects the emitted red photons from the sample.
Image generated in Inkscape.

###  7.3 The Block Layout of the RF Components

Figure 10 shows the block layout for the RF components of the dual microwave
system. The numbers shown in the layout are for indexing purposes to indicate
the flow of information, and channel association (1 or 2). For each component,
the figure indicates the output power [dBm] and any relevant power losses
affecting the output power [dB]. Beginning with the frequency synthesizer, a
central frequency at $2.87~{}$GHz is sent toward a power splitter, dividing
the signal into two channels. This central frequency is then mixed with the
envelopes sent by the four channel AWG into an IQ mixer. This signal which
contains the control amplitude and phase at the central frequency passes
through a switch, added for its increased isolation of the ON:OFF, and an
amplifier to increase the strength of the signal before reaching the PCB
sample board. The switch is placed before the amplifier in this case so as to
not exceed the operating power threshold of the switch after the signal is
amplified. With this configuration, there are two independent amplitude and
phase controls available for experimentation to create the circularly
polarized microwave control. For the best success of these dual-channel
setups, identical components were used in order to minimize any differences
between the two channels. A more detailed account of the complete RF signal
and complete list of part numbers and manufacturer may be found in [31].

Figure 10: The layout for a dual channel microwave control, capable of
implementing circularly polarized microwaves. The frequency synthesizer
provides the central frequency at $\omega_{T}$ (2.87 GHz), followed by a power
splitter which divides the signal into two channels. The IQ mixer for each
channel accepts the central frequency and combines with the amplitude and
phase control envelopes from the AWG. The switch provides good isolation
between the power between the ON and OFF state, while the amplifier boosts the
amplitudes sent to the PCB board. The sample board contains two input ports
for each channel, followed by two outputs and terminated into two attenuators.
Image generated in Inkscape.

Figure 11 shows the PCB board layout used in the experiments. There are two
input (2 and 4) and two output ports (1 and 3) on the PCB, done to minimize
the reflected power back to the amplifier and maximize the amount of power
delivered into the diamond sample. A schematic of the diamond sample ($4\times
4$ mm) is shown atop the two microstrips with the cross-section of the field
diagram shown in figure 2. The planar microstrips are 150 $\mu$m apart, 127
$\mu$m wide, 17.5 $\mu$m thick and 7.5 mm long to accommodate diamond samples
of larger size.

Figure 11: The schematic of the dual-channel PCB board with a diamond mounted.
The board was designed to have two inputs (ports 2 and 4) and two outputs
(ports 1 and 3), and terminating with external $50~{}\Omega$ loads. The ports
are labeled on the schematic above. The two microstrips are 150 $\mu$m apart,
127 $\mu$m wide, 17.5 $\mu$m thick and 7.5 mm long to accommodate diamond
samples of larger size. The diamond sits on top of both microstrip, shown in
the figure as a $4\times 4$ mm diamond sample in the schematic. Image Source:
Image courtesy of Hamid Mohebbi

###  7.4 Spin-locking Simulation

The procedure of the spin-locking experiment is shown in figure 12,
corresponding to the data for the spin-locking experiment shown in figure 7.
Recalling that the spin-locking experiment is used to suppress the evolution
of a chosen sub-ensemble and allow the evolution of another.

The figure shows how the low frequency sub-ensemble is suppressed while the
high frequency evolves freely. For each stage, the red arrow is the starting
state for each of the low and high frequency sub-ensemble, the dashed line
indicated the action being performed in each stage while the white arrow is
the direction of the control Hamiltonian. It shows the $\frac{\pi}{2}$ pulse,
the length of which is gathered from the Rabi experiment, to suppress the low-
frequency. This same pulse will rotate the high frequency by a full $\pi$.
Then pulsing the control Hamiltonian on the relative “+x” axis, suppresses the
evolution of the low-frequency sub-ensemble while the high-frequency rotates
freely. In the last stage, another $\frac{\pi}{2}$ is applied which rotates
each sub-ensemble back to the “z”-axis so a measurement may take place. The
same procedure may be applied to suppress the high-frequency sub-ensemble and
allow the low-frequency sub-ensemble to evolve.

Figure 12: The proof of concept for the spin-locking experiment is shown above
in a Bloch sphere representation. Both the low and high-frequency sub-
ensembles from the Rabi spectra begin in the $\ket{0}$ state (red arrows). A
square $\frac{\pi}{2}$ pulse targeted at the low-frequency pair is applied,
rotating the low-frequency to the $\frac{\ket{0}+\ket{\pm 1}}{\sqrt{2}}$ state
(+“x” axis), and the high-frequency to the $\ket{\pm 1}$ state. Applying a
control Hamiltonian along the +“x” axis (white arrow), will suppress the
evolution of the low-frequency pair, while the high-frequency pair may evolve
freely. After the evolution stage, another $\frac{\pi}{2}$ pulse is applied to
rotate the low-frequency peak to the $\ket{\pm 1}$ state while the high-
frequency peak returns to the $\ket{0}$ state. The Spin-lock experiment
measures the free evolution of the high-frequency while the low-frequency is
suppressed. The same procedure may be applied to suppress the high-frequency
peak while the low-frequency peak evolves. Image generated in Mathematica.

###  7.5 Sample OCT pulse

The GRAPE algorithm accepts the input control phase $\Delta\theta$, and
measured experimental values $\Omega_{NV_{A/B}}$ and $\eta$, then optimizes
over the free control parameters, $\Omega_{1/2}$ to arrive at the final pulse.
The figure shows a sample OCT pulse, optimizing over the control amplitude.
Each time step, the amplitude may range between $0\rightarrow 1$ for
optimization. The total length of the pulse ($10~{}\mu$s) is given by the
discrete time step value (40ns), and number of steps (250). To mitigate
hardware distortions, the pulse should be as smooth a possible, as is shown in
the example.

Figure 13: Sample pulse, showing the optimizing over the control amplitudes
$\Omega_{1/2}$ to create an OCT pulse. The OCT pulses accept the fixed control
phase $\Delta\theta$, and experimental values $\Omega_{NV_{A/B}}$ and $\eta$
within the control Hamiltonian and optimize using the free control amplitudes
$\Omega_{1/2}$ to create the pulse. Each pulse length is given by the time
step multiplied by the number of steps allotted, here being 40ns and 250 steps
to yield a pulse length of $10~{}\mu$s. To avoid hardware distortion issues,
the pulses should be as smooth as possible, a key factor in deciding the
length of the time step.

###  7.6 Bloch Trajectory of sub-ensemble pair B

Figure 14 shows the Bloch plot trajectory for the NV sub-ensemble B, the lower
frequency sub-ensemble, corresponding to the trajectory of sub-ensemble A
shown in figure 3 in the main text. The same trends are observed as with the
trajectory in sub-ensemble A, with a successful $\pi_{+}$ pulse demonstrated
for varying input states. A notable difference is the trajectory does appear
to be much slower, which is expected as the the NV envelope frequency
($\Omega_{NVB}$), guiding the pulse amplitude for this case is $1.03~{}$MHz
compared to the $2.64$ MHz of the high-frequency sub-ensemble.

Figure 14: The Bloch Plot trajectories shown for the (1,1,1)$\&$(-1,1,-1) sub-
ensemble corresponding to the same pulse optimized shown in figure 3 in the
main text. As with the optimizing over the high-frequency sub-ensemble pair A
shown in the main text, all the same successful transitions are observed for
the selective $\pi_{+}$ pulse. An interesting observation is as this is the
low-frequency pair, the trajectory does appear to be slower than the figure
shown in the main text, to be expected as this is the low frequency sub-
ensemble, so the amplitude envelope is less. Images generated in Mathematica.

###  7.7 The Complete Generalized Control _a priori_ Hamiltonian Model

The phenomenological Hamiltonian provided a convenient experimental model that
could be implemented for the proof of concept experiments. For a more complete
theoretical Hamiltonian, an _a priori_ model may be used. It clearly separates
the influence of the NV P.A.S. and microwave spatial components. This
Hamiltonian is excellent to use in early simulations to observe the
limitations on each of the NV P.A.S. and microwave spatial components and to
model potential errors.

To create the _a priori_ Hamiltonian, first a frame rotation must take place
so the Hamiltonian may be created with all the elements in the same frame.
There are three important frames to consider when describing the _a priori_
Hamiltonian: the lab frame, the diamond crystal frame, and the NV P.A.S. The
“z” axis of NV P.A.S. is defined as the vector between the Nitrogen and the
Vacancy within the diamond crystal forms the (P.A.S.). The diamond crystal “z”
axis is indicated by the vector perpendicular to the diamonds’ crystal frame.
The lab frame is defined by the optical “z” axis.

For the transformations, we may rotate either the microwave control field or
the operators to the NV P.A.S. This frame is chosen as this contains the
quantization access for the single NV or for a series of independent NVs in an
ensemble. We choose to rotate the operators so the configuration of the
microwave control field may be chosen at a later time.

$(R^{T}\cdot\vec{C}(t))\cdot\vec{S}=\vec{C}(t)(R\cdot\vec{S})$ (10)

$\vec{C}(t)$ is the vector describing the direction of the microwave field
applied. A field in the xz lab direction would be
$\vec{C}(t)=\\{C_{x}(t),0,C_{z}(t)\\}$ and $\vec{S}$ is the vector
representing the spin-1 operators $\vec{S}=\\{S_{x},S_{y},S_{z}\\}$.

A symbolic rotation matrix for factoring in the components of the NV P.A.S
into the Hamiltonian may be used to start, the numeric values for the rotation
matrix are displayed in figure 15 and may be subbed into the Hamiltonian when
required for calculations. Applying the rotation matrix to the spin operators
in their original frame expressed them in the rotated frame
($\vec{\tilde{S}}$) is shown below:

$R\vec{\tilde{S}}=\left(\begin{array}[]{ccc}R_{xx}&R_{xy}&R_{xz}\\\
R_{yx}&R_{yy}&R_{yz}\\\ R_{zx}&R_{zy}&R_{zz}\\\
\end{array}\right)\cdot(\tilde{S_{x}},\tilde{S_{y}},\tilde{S_{z}})^{T}$ (11)

Expressing the individual spin operators in the rotated frame as:

$\begin{split}\tilde{S_{x}}&\rightarrow(R_{xx}S_{x}+R_{xy}S_{y}+R_{xz}S_{z})\\\
\tilde{S_{y}}&\rightarrow(R_{yx}S_{x}+R_{yy}S_{y}+R_{yz}S_{z})\\\
\tilde{S_{z}}&\rightarrow(R_{zx}S_{x}+R_{zy}S_{y}+R_{zz}S_{z})\\\ \end{split}$
(12)

Applying the rotation to the control field in the lab frame, a general control
Hamiltonian with generic microwave field direction, in the NV frame is
expressed as:

$\begin{split}\mathcal{H}_{CTRL}&=\vec{C(t)}\cdot\vec{\tilde{S}}\\\
\mathcal{H}_{CTRL}&=C_{x}(t)(R_{xx}S_{x}+R_{xy}S_{y}+R_{xz}S_{z})\\\
&+C_{y}(t)(R_{yx}S_{x}+R_{yy}S_{y}+R_{yz}S_{z})\\\
&+C_{z}(t)(R_{zx}S_{x}+R_{zy}S_{y}+R_{zz}S_{z})\end{split}$ (13)

At this point, the control Hamiltonian and NV ground state Hamiltonian are
both expressed in the same NV frame. This general representation extends to
any single NV. Now that they are both in the same frame, the effective
Hamiltonian may be found for a single NV center.

####  7.7.1 Finding the Effective Control Hamiltonian for a Single NV along
any Principle Axis

Now that the control Hamiltonian has been expressed in the frame of the NV
P.A.S., the effective Hamiltonian may be found. The total Hamiltonian is the
summation of the ZFS of the NV center and microwave control Hamiltonian.
Recall that the rotation terms (xx,xy etc.) are unique for each NV
orientation.

$\begin{split}\mathcal{H}_{Tot}&=\Delta
S_{z}^{2}+C_{x}(t)(R_{xx}S_{x}+R_{xy}S_{y}+R_{xz}S_{z})\\\
&+C_{y}(t)(R_{yx}S_{x}+R_{yy}S_{y}+R_{yz}S_{z})+C_{z}(t)(R_{zx}S_{x}+R_{zy}S_{y}+R_{zz}S_{z})\end{split}$
(14)

The following equation is used to find the effective Hamiltonian:

$\mathcal{H}_{Eff}=U^{\dagger}(t)(\mathcal{H}_{Tot}-\mathcal{H}_{Rot})U(t)$
(15)

Where the rotation Hamiltonian $(\mathcal{H}_{Rot})$ is the P.A.S. of the NV
center set at the transmitter frequency $(\omega_{T})$:

$\mathcal{H}_{Rot}=\omega_{T}S_{z}^{2}$ (16)

And the matrix exponential of which is:

$U(t)=e^{-i\mathcal{H}_{Rot}t}=\mathds{1}-\left(1-e^{-i\omega_{T}t}\right)S_{z}^{2}$
(17)

The rotation Hamiltonian and its matrix exponential are substituted into
equation 15:

$\begin{split}\mathcal{H}_{Eff}&=\left(\mathds{1}-\left(1-e^{i\omega_{T}t}\right)S_{z}^{2}\right)\\\
&\big{(}(\Delta-\omega_{T})S_{z}^{2}\\\
&+C_{x}(t)(R_{xx}S_{x}+R_{xy}S_{y}+R_{xz}S_{z})\\\
&+C_{y}(t)(R_{yx}S_{x}+R_{yy}S_{y}+R_{yz}S_{z})\\\
&+C_{z}(t)(R_{zx}S_{x}+R_{zy}S_{y}+R_{zz}S_{z})\big{)}\\\
&\left(\mathds{1}-\left(1-e^{-i\omega_{T}t}\right)S_{z}^{2}\right)\end{split}$
(18)

Equation 18 is expanded. To simplify, recall the following spin-1 operator
relationships:

$\begin{split}&S_{z}^{2n}=S_{z}^{2}\\\ &S_{z}^{2n+1}=S_{z}\\\
&S_{z}^{2}S_{(x/y)}S_{z}^{2}=0\end{split}$ (19)

Some trigonometric identities and Euler’s formula may also be used to
simplify:

$\begin{split}(1-e^{i\omega_{T}t})(1-e^{-i\omega_{T}t})&=2-2\cos(\omega_{T}t)\\\
e^{i\pm\omega_{T}t}&=\cos(\omega_{T}t)\pm i\sin(\omega_{T}t)\\\ \end{split}$
(20)

Finally, using the commutators and anti-commutator relationships of the spin
operators:

$\begin{split}\\{S_{x/y/z},S_{z}^{2}\\}&=S_{x/y}\\\
\\{(R_{xx}S_{x}+R_{xy}S_{y}+R_{xz}S_{z}),S_{z}^{2}\\}&=(R_{xx}S_{x}+R_{xy}S_{y}+R_{xz}S_{z})\\\
\\{(R_{yx}S_{x}+R_{yy}S_{y}+R_{yz}S_{z}),S_{z}^{2}\\}&=(R_{yx}S_{x}+R_{yy}S_{y}+R_{yz}S_{z})\\\
\\{(R_{zx}S_{x}+R_{zy}S_{y}+R_{zz}S_{z}),S_{z}^{2}\\}&=(R_{zx}S_{x}+R_{zy}S_{y}+R_{zz}S_{z})\\\
[(R_{xx}S_{x}+R_{xy}S_{y}+R_{xz}S_{z}),S_{z}^{2}]&=R_{xx}[S_{x},S_{z}^{2}]+R_{xy}[S_{y},S_{z}^{2}]\\\
[(R_{yx}S_{x}+R_{yy}S_{y}+R_{yz}S_{z}),S_{z}^{2}]&=R_{yx}[S_{x},S_{z}^{2}]+R_{yy}[S_{y},S_{z}^{2}]\\\
[(R_{zx}S_{x}+R_{zy}S_{y}+R_{zz}S_{z}),S_{z}^{2}]&=R_{zx}[S_{x},S_{z}^{2}]+R_{zy}[S_{y},S_{z}^{2}]\\\
\end{split}$ (21)

Further expanding and simplifying using the above relationships, the effective
Hamiltonian for a general transmitter frequency $(\omega_{T})$, microwave
field direction $(C_{x},C_{y},C_{z})$ and NV orientation (xx,xy, etc.) is
found:

$\begin{split}\mathcal{H}_{Eff}&=(\Delta-\omega_{T})S_{z}^{2}\\\
&+(R_{xz}C_{x}+R_{yx}C_{y}+R_{zz}C_{z})S_{z}\\\
&+(R_{xx}C_{x}+R_{yx}C_{y}+R_{zx}C_{z})\left(\cos(\omega_{T}t)S_{x}-i\sin(\omega_{T}t)[S_{x},S_{z}^{2}]\right)\\\
&+(R_{xy}C_{x}+R_{yy}C_{y}+R_{zy}C_{z})\left(\cos(\omega_{T}t)S_{y}-i\sin(\omega_{T}t)[S_{y},S_{z}^{2}]\right)\\\
\end{split}$ (22)

The microwave controls $(C_{x},C_{y},C_{z})$ can now be expanded to give more
context for the experiments conducted and abilities with each set of controls.
From here, the “twisted” operators will be substituted in for the commutation
relationship, $S_{x/y}^{{}^{\prime}}=i[S_{y/x},S_{z}^{2}]$.

Consider the case where the microwave field is controlled by two independent
channels. Two independent channels were chosen as the combination of these
will yield circularly polarized microwaves, allowing single selective
transitions between the $\ket{0}\rightarrow\ket{+1}$ or $\ket{-1}$ states.

These two channels may both emit in the (x,y,z) directions. An example may be
two microstrips which each have components in multiple directions. Under the
assumption of two independent channels emitting along the (x,y,z) directions,
$(C_{x},C_{y},C_{z})$ may be expanded as:

$\begin{split}C_{x}&=C_{1}(t)w_{x1}+C_{2}(t)w_{x2}\\\
C_{y}&=C_{1}(t)w_{y1}+C_{2}(t)w_{y2}\\\
C_{z}&=C_{1}(t)w_{z1}+C_{2}(t)w_{z2}\\\ \end{split}$ (23)

The quantities $w_{x1/2}$ describes the x-component of the field for channels
1 and 2, respectively. This is similar for $w_{y1/2}$ and $w_{z1/2}$. These
fields are defined by the configuration of the control field, but may be
expressed in the general case above.

$C_{1/2}(t)$ represent the time dependent controls shaped by the AWG, IQ mixer
and set at the transmitter frequency. In an ideal case, $C_{1/2}(t)$ are shown
in equation 24. Here the AWG controls are shown in Cartesian coordinates
$I_{1/2}$ and $Q_{1/2}$, but this may also be represented by polar coordinates
with amplitude and phase control; $\Omega_{1/2}$ and $\theta_{1/2}$, where
$I_{1/2}=\Omega_{1/2}\cos(\theta_{1/2})$ and
$Q_{1/2}=\Omega_{1/2}\sin(\theta_{1/2})$.

$C_{1/2}(t)=I_{1/2}(t)\cos(\omega_{T}t)+Q_{1/2}(t)\sin(\omega_{T}t)$ (24)

To further simply, the squares of the cosine and sine functions may be
expanded:

$\begin{split}\cos^{2}(\omega_{T}t)&=\frac{1}{2}(1+\cos(2\omega_{T}t))\\\
\cos(\omega_{T}t)\sin(\omega_{T}t)&=\frac{1}{2}\sin(2\omega_{T}t)\\\
\sin^{2}(\omega_{T}t)&=\frac{1}{2}(1-\cos(2\omega_{T}t))\end{split}$ (25)

Expanding the controls for each channel, $(C_{x},C_{y},C_{z})$, into the
Hamiltonian in equation 22, and using the trigonometric identities listed
above yields the generalized effective Hamiltonian. In this instance, the
values for I and Q are being analyzed at each discrete time step, so the time-
dependency has been dropped.

$\begin{split}\mathcal{H}_{eff}&=(\Delta-\omega_{T})S_{z}^{2}\\\
&+\left(\cos(\omega_{T}t)(I_{1}w_{A1}+I_{2}w_{A2})+\sin(\omega_{T}t)(Q_{1}w_{A1}+Q_{2}w_{A2})\right)S_{z}\\\
&+\left(\frac{1}{2}(1+\cos(2\omega_{T}t))(I_{1}w_{B1}+I_{2}w_{B2})+\frac{1}{2}\sin(2\omega_{T}t)(Q_{1}w_{B1}+Q_{2}w_{B2})\right)S_{x}\\\
&-\left(\frac{1}{2}\sin(2\omega_{T}t)(I_{1}w_{B1}+I_{2}w_{B2})+\frac{1}{2}(1-\cos(2\omega_{T}t))(Q_{1}w_{B1}+Q_{2}w_{B2})\right)S_{y}^{{}^{\prime}}\\\
&+\left(\frac{1}{2}(1+\cos(2\omega_{T}t))(I_{1}w_{C1}+I_{2}w_{C2})+\frac{1}{2}\sin(2\omega_{T}t)(Q_{1}w_{C1}+Q_{2}w_{C2})\right)S_{y}\\\
&-\left(\frac{1}{2}\sin(2\omega_{T}t)(I_{1}w_{C1}+I_{2}w_{C2})+\frac{1}{2}(1-\cos(2\omega_{T}t))(Q_{1}w_{C1}+Q_{2}w_{C2})\right)S_{x}^{{}^{\prime}}\\\
\end{split}$ (26)

$w_{A1/2}$, $w_{B1/2}$ and $w_{C1/2}$ represent the microwave field components
and NV rotational terms, gathered to reduce the complexity of the Hamiltonian.

$\begin{split}w_{A1/2}&=xzw_{x1/2}+yzw_{y1/2}+zzw_{z1/2}\\\
w_{B1/2}&=xxw_{x1/2}+yxw_{y1/2}+zxw_{z1/2}\\\
w_{C1/2}&=xyw_{x1/2}+yyw_{y1/2}+zyw_{z1/2}\\\ \end{split}$ (27)

As the experiments are all performed in the absence of a magnetic field, the
center transmitter frequency $(\omega_{T})$, is set to the ZFS $(\Delta)$. All
resulting terms then proportional to $(2\Delta)$ may be dropped. The terms
proportional to $S_{z}$ also become negligible, as they would induce a Zeeman
splitting, proportional to the strength of the microwave controls, but
oscillating at 2.87 GHz, and so would be averaged out compared to the other
more slowly varying terms.

This yields the time-independent effective Hamiltonian for two independently
controlled channels for a generalized field in the $(x,y,z)$ directions. The
Hamiltonian is presented with letter terms $(A,B,C,D)$ for simplicity.

$\begin{split}\mathcal{H}_{eff}&=AS_{x}+BS_{y}^{{}^{\prime}}+CS_{y}+DS_{x}^{{}^{\prime}}\\\
&A=\frac{1}{2}(I_{1}w_{B1}+I_{2}w_{B2})\\\
&B=-\frac{1}{2}(Q_{1}w_{B1}+Q_{2}w_{B2})\\\
&C=\frac{1}{2}(I_{1}w_{C1}+I_{2}w_{C2})\\\
&D=-\frac{1}{2}(Q_{1}w_{C1}+Q_{2}w_{C2})\end{split}$ (28)

Finally, expanding the values for the microwave components $(w_{B1})$ etc.
yields the full Hamiltonian.

$\begin{split}\mathcal{H}_{eff}&=AS_{x}+BS_{y}^{{}^{\prime}}+CS_{y}+DS_{x}^{{}^{\prime}}\\\
&A=\frac{1}{2}(R_{xx}(I_{1}w_{x1}+I_{2}w_{x2})+R_{yx}(I_{1}w_{y1}+I_{2}w_{y2})+R_{zx}(I_{1}w_{z1}+I_{2}w_{z2}))\\\
&B=-\frac{1}{2}(R_{xx}(Q_{1}w_{x1}+Q_{2}w_{x2})+R_{yx}(Q_{1}w_{y1}+Q_{2}w_{y2})+R_{zx}(Q_{1}w_{z1}+Q_{2}w_{z2}))\\\
&C=\frac{1}{2}(R_{xy}(I_{1}w_{x1}+I_{2}w_{x2})+R_{yy}(I_{1}w_{y1}+I_{2}w_{y2})+R_{zy}(I_{1}w_{z1}+I_{2}w_{z2}))\\\
&D=-\frac{1}{2}(R_{xy}(Q_{1}w_{x1}+Q_{2}w_{x2})+R_{yy}(Q_{1}w_{y1}+Q_{2}w_{y2})+R_{zy}(Q_{1}w_{z1}+Q_{2}w_{z2}))\end{split}$
(29)

Equation 28 shows the basic structure with the letter format. Each pre-factor
$(A,B,C,D)$ is dependent on the AWG envelope of control $(I_{1/2},Q_{1/2})$,
direction and strength of the microwave field at the site of the NVs,
$(w_{x1/2},w_{y1/2},w_{z1/2})$ for each independent channel, and last by the
NV rotation term, ($R_{xx}$,$R_{xy}$,$R_{xz}$ etc.).

Although this Hamiltonian describes a single NV, from here it is clear to see
the difficulty in controlling ensembles of NV centers as the projection of the
effective Hamiltonian is scaled by the orientation of the NV center, and if
the volume of NVs is large, the microwave field strength and direction of each
also scales over the volume.

In the following section, the Hamiltonian will be manipulated, without loss of
generality to show how to account for the projection of the Hamiltonian into
each NV orientation in a more mathematically convenient way for achieving
single transitions.

####  7.7.2 Expressing the Control Hamiltonian with Pseudo Spin-1/2 Operators

To ease the calculations in solving for selective ground state transitions in
the Hamiltonian, the spin-1 operators may be written as a sum of pseudo
spin-$\frac{1}{2}$ operators. These are of course not true spin-$\frac{1}{2}$
operators, as the ground state $\ket{\pm 1}$ states share a space with the
same $\ket{0}$ state. Expressing the spin-1 operators in this form, allows for
the selective transitions between $\ket{0}\rightarrow\ket{+1}/\ket{-1}$ in the
absence of a magnetic field, to be found more easily.

The pseudo spin-$\frac{1}{2}$ operators are labelled as $S_{x}^{\pm}$ and
$S_{y}^{\pm}$ for the $\ket{+1}$ and $\ket{-1}$ pseudo sub-spaces,
respectively. The operators are shown below, recalling
$S_{x/y}^{{}^{\prime}}=i[S_{y/x},S_{z}^{2}]$:

$\begin{split}S_{x}^{+}&=\frac{1}{\sqrt{2}}(S_{x}+i[S_{y},S_{z}^{2}])\\\
S_{y}^{+}&=\frac{1}{\sqrt{2}}(S_{y}-i[S_{x},S_{z}^{2}])\\\
S_{x}^{-}&=\frac{1}{\sqrt{2}}(S_{x}-i[S_{y},S_{z}^{2}])\\\
S_{y}^{-}&=\frac{1}{\sqrt{2}}(S_{y}+i[S_{x},S_{z}^{2}])\\\
S_{z}^{+}&=\frac{1}{2}S_{z}+\mathds{1}_{3}-\frac{3}{2}S_{z}^{2}\\\
S_{z}^{-}&=\frac{1}{2}S_{z}-\mathds{1}_{3}+\frac{3}{2}S_{z}^{2}\\\
\end{split}$ (30)

In matrix form, the resemblance to the Pauli operators can be seen, as is the
intention.

$\begin{split}S_{x}^{+}&=\left(\begin{array}[]{ccc}0&0&0\\\ 0&0&1\\\
0&1&0\end{array}\right);S_{y}^{+}=\left(\begin{array}[]{ccc}0&0&0\\\ 0&0&-i\\\
0&i&0\end{array}\right);S_{z}^{+}=\left(\begin{array}[]{ccc}0&0&0\\\ 0&1&0\\\
0&0&-1\end{array}\right)\\\ S_{x}^{-}&=\left(\begin{array}[]{ccc}0&1&0\\\
1&0&0\\\ 0&0&0\end{array}\right);S_{y}^{-}=\left(\begin{array}[]{ccc}0&-i&0\\\
i&0&0\\\ 0&0&0\end{array}\right);S_{z}^{-}=\left(\begin{array}[]{ccc}1&0&0\\\
0&-1&0\\\ 0&0&0\end{array}\right);\end{split}$ (31)

The Hamiltonian in equation 29 has already been grouped in accordance to the
pseudo spin-$\frac{1}{2}$ operators, so substituting the pseudo
spin-$\frac{1}{2}$ operators, and collecting to isolate for these are trivial.
Re-arranging the pseudo spin-$\frac{1}{2}$ operators in the original spin-1
form, the following is substituted into the Hamiltonian:

$\begin{split}S_{x}&=\frac{1}{\sqrt{2}}(S_{x}^{+}+S_{x}^{-})\\\
S_{y}&=\frac{1}{\sqrt{2}}(S_{y}^{+}+S_{y}^{-})\\\
i[S_{x},S_{z}^{2}]&=\frac{1}{\sqrt{2}}(S_{y}^{-}-S_{y}^{+})\\\
i[S_{y},S_{z}^{2}]&=\frac{1}{\sqrt{2}}(S_{x}^{+}-S_{x}^{-})\end{split}$ (32)

Now re-arranging for the pseudo spin-$\frac{1}{2}$ operators, without loss of
generality, the Hamiltonian is written with the pseudo spin-$\frac{1}{2}$
operators. New pre-factors $(\tilde{A},\tilde{B},\tilde{C},\tilde{D})$ are
used to distinguish between the pre-factors for the Hamiltonian written in
equation 29:

$\begin{split}\mathcal{H}&=\tilde{A}S_{x}^{+}+\tilde{B}S_{y}^{+}+\tilde{C}S_{x}^{-}+\tilde{D}S_{y}^{-}\\\
\tilde{A}&=\frac{1}{2\sqrt{2}}(I_{1}w_{B1}+I_{2}w_{B2}-Q_{1}w_{C1}-Q_{2}w_{C2})\\\
\tilde{B}&=\frac{1}{2\sqrt{2}}(I_{1}w_{C1}+I_{2}w_{C2}+Q_{1}w_{B1}+Q_{2}w_{B2})\\\
\tilde{C}&=\frac{1}{2\sqrt{2}}(I_{1}w_{B1}+I_{2}w_{B2}+Q_{1}w_{C1}+Q_{2}w_{C2})\\\
\tilde{D}&=\frac{1}{2\sqrt{2}}(I_{1}w_{C1}+I_{2}w_{C2}-Q_{1}w_{B1}-Q_{2}w_{B2})\end{split}$
(33)

The full Hamiltonian written by expanding the terms $w_{B1/2}$ and $w_{C1/2}$,
is shown below:

$\begin{split}\mathcal{H}=&\tilde{A}S_{x}^{+}+\tilde{B}S_{y}^{+}+\tilde{C}S_{x}^{-}+\tilde{D}S_{y}^{-}\\\
\tilde{A}=&\frac{1}{2\sqrt{2}}(R_{xx}(I_{1}w_{x1}+I_{2}w_{x2})+R_{yx}(I_{1}w_{y1}+I_{2}w_{y2})+R_{zx}(I_{1}w_{z1}+I_{2}w_{z2})\dots\\\
&-R_{xy}(Q_{1}w_{x1}+Q_{2}w_{x2})-R_{yy}(Q_{1}w_{y1}+Q_{2}w_{y2})-R_{zy}(Q_{1}w_{z1}+Q_{2}w_{z2}))\\\
\tilde{B}=&\frac{1}{2\sqrt{2}}(R_{xy}(I_{1}w_{x1}+I_{2}w_{x2})+R_{yy}(I_{1}w_{y1}+I_{2}w_{y2})+R_{zy}(I_{1}w_{z1}+I_{2}w_{z2})\dots\\\
&+R_{xx}(Q_{1}w_{x1}+Q_{2}w_{x2})+R_{yx}(Q_{1}w_{y1}+Q_{2}w_{y2})+R_{zx}(Q_{1}w_{z1}+Q_{2}w_{z2}))\\\
\tilde{C}=&\frac{1}{2\sqrt{2}}(R_{xx}(I_{1}w_{x1}+I_{2}w_{x2})+R_{yx}(I_{1}w_{y1}+I_{2}w_{y2})+R_{zx}(I_{1}w_{z1}+I_{2}w_{z2})\dots\\\
&+R_{xy}(Q_{1}w_{x1}+Q_{2}w_{x2})+R_{yy}(Q_{1}w_{y1}+Q_{2}w_{y2})+R_{zy}(Q_{1}w_{z1}+Q_{2}w_{z2}))\\\
\tilde{D}=&\frac{1}{2\sqrt{2}}(R_{xy}(I_{1}w_{x1}+I_{2}w_{x2})+R_{yy}(I_{1}w_{y1}+I_{2}w_{y2})+R_{zy}(I_{1}w_{z1}+I_{2}w_{z2})\dots\\\
&-R_{xx}(Q_{1}w_{x1}+Q_{2}w_{x2})-R_{yx}(Q_{1}w_{y1}+Q_{2}w_{y2})-R_{zx}(Q_{1}w_{z1}+Q_{2}w_{z2}))\\\
\end{split}$ (34)

####  7.7.3 Substituting in the values for the NV P.A.S.

The values for the generic rotation matrix shown in equation 11, are shown in
figure 15, generated by performing the frame transformation procedure below.

  1. 1.

Normalize the starting vector being rotated (labelled $\vec{a}$)

  2. 2.

Find the cross product between the starting vector ($\vec{a}$) and the desired
vector ($\vec{b}$) to yield the rotation axis ($\vec{c}$)

  3. 3.

Find the dot product between $\vec{a}$ and $\vec{b}$ to yield the rotation
angle ($\theta_{(ab)}$)

  4. 4.

Create a rotation matrix, which rotates $\vec{a}$ about $\vec{c}$ by
$\theta_{(ab)}$ to arrive at $\vec{b}$

Using this technique, the rotation matrices for the diamond crystal to lab and
NV to crystal frame may be found. These matrices are listed below for each NV
orientation for the (100), (110) and (111) crystals. These three crystals are
shown as they are the common crystal orientations used for NV experiments, and
expressed here to show how this can be applied to any single crystal
orientation. These values may then be substituted into the control Hamiltonian
in equation 29 and LABEL:eq:27 for a specific NV orientation and crystal.

(a)

(b)

(c)

Figure 15: (a) and (b) The rotation vector and angle to rotate the NV (P.A.S.)
to the lab frame for all four orientations in each of the (100), (110) and
(111) diamond. (c) Rotation matrix from the lab frame to the NV frame for all
NVs in three crystals. NVs are labelled (1,1,1), (-1,-1,1), (-1,1,-1) and
(1,-1,-1). Diamonds are labelled (100), (110) and (111). Images generated on
Mathematica.

These rotation values may be substituted along with the microwave spatial
components corresponding to the field diagram in figure 2 to arrive at the
final _a priori_ Hamiltonian.