Optimal control theory techniques for nitrogen vacancy ensembles in single crystal diamond

Nitrogen vacancy centre 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.


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 transitionselective π operations, respectively, over all NV orientations in the ensemble.
2 Modelling the NV Ensemble

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) (∆ ≈ 2.87 GHz) [18,19].Generally, an NV Hamiltonian will also include a transverse ZFS due to crystal strain, E(S 2 x − S 2 y ), an electron Zeeman interaction, γ e B • S, nuclear Zeeman interactions for both the nitrogen and nearby carbon-13 nuclei, γ N/C B • I N/C , nitrogen and carbon hyperfine interactions, A N/C S • I N/C , and a nitrogen nuclear quadrupole interaction, QI 2 N z .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: 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].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 |±1 ground spin states, resulting in unique splittings of the |0 ↔ |+1 and |0 ↔ |−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].

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 µm wide, and 17.5 µm tall, with a spacing of 150 µ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 µ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 µm working distance results in the focal area being 70 µ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, η = 90 • , shown by solving for η in the control Hamiltonian in equation 3.However, even with suboptimal 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, CH 1 (gray), and CH 2 (red), at the location of the NV focal volume (blue arrow), with η 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 µm thick diamond is shown, which combined with the 160 µm working distance of the objective, places the focal volume ≈ 70µm away from the microstrips (WD limit), reducing the reflected light from the microstrips.Image generated in Mathematica.

NVs
The following microwave field components may be substituted into the control Hamiltonian in equation 3: Where µ 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.

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: 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 = i[S y/x , S 2 z ], 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.

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-tostate 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-tostate transfer is given a target fidelity or state overlap (0.99), internal Hamiltonian (∆S 2 z ), 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.

Defining Transition-Selective Maps
To aid finding and visualizing intuitive solutions, pseudo spin- 1  2 operators may be used in place of standard spin-1 operators [46].These are not true spin- 1  2 operators, as the |±1 states share a space with the same |0 state, but conveniently represent the pulse action over states of interest.The pseudo spin- 1  2 operators are labelled as S ± x/y/z for the |0 , |+1 and |0 , |−1 state pairs, respectively.Expressions for pseudo spin- 1  2 operators in terms of spin-1 operators are shown below, with the matrix forms found in equation 31 of the supplementary information.
The pseudo spin-1 2 operators obey the standard commutation relations of the Pauli operators (i.e.[S ± x , S ± y ] = 2iS ± z ), allowing for maps to be constructed in the same fashion as for spin-1 2 particles.As such, the OCT maps may be defined with the general unitary operator in equation 7, where (α) is the rotation angle, (n) is the unit vector defining the rotation axis, and S ± defines the total list of operators, S ± = {Sx ± , Sy ± , Sz ± }.The (+) or (-) operators are chosen depending on which state transitions are desired, the matrix form of the positive operator shown as an example.

Transition-Selective OCT Pulse
As an example of optimizing a transition-selective OCT pulse, consider a selective π +/y pulse on the (100) diamond that enacts a π y rotation in the positive pseudo-subspace and an identity operation in the negative: (α = π, 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 ± , respectively through (X/Y /Z) 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 subensemble (B) is shown in figure 14.The mapping of the selective π + pulse is clearly seen with the starting states of |0 and |+1 in the positive Bloch spheres, rotating to |+1 and |0 , respectively.The shared |0 state may also be observed with the negative Bloch sphere.The correct operation of the intended identity pulse, beginning in the |−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.

Orientation-Selective OCT Pulse
While the (100) diamond is an excellent candidate for demonstrating collective control with two subensembles 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.

The Sample and Experimental System Design
For all the experiments performed, a 500 µ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 µm and depth of field 2.51 µm [47,48].This sample was chosen, as opposed to the ideal 300 µ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).

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, (θ), and how much the NVs' "x"-axis deviates from the polarization of the incoming light, (φ).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 φ angle, while E x is dependent on both φ and θ [31,49,50,51]: (100) diamond is an experimentally convenient crystal as all NV orientations deviate from the light propagation axis at the same angle (θ), so fluorescence may be optimized by adjusting only the φ 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 • .At 20 • and 60 • , the fluorescence favouring either of the two orientations may be seen.At 0 • and 40 • , a more even emission from each orientation is indicated.The optimal value providing even fluorescence across all orientations was found to be 42

Normalized Counts
Half Wave Plate at 60°F igure 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.

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 (Ω 1/2 ) and global control phase (∆θ), 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 (Ω N V A/B ) for each of the NV sub-ensembles pair (A) and (B) and the experimental phase value (η) [31].
A Dual Channel Rabi experiment was used to measure the strength of the Rabi drive for each sub-ensemble, Ω N V A/B .Figure 6 shows how Ω N V A/B ("y-axis") changes by varying the control phase ∆θ.In this case, the phase of the second channel varied θ 2 = ∆θ ("x-axis") while maintaining a fixed phase of the first channel θ 1 = 0 • and fixed control amplitude Ω 1/2 = 1 [24,31].The error bars indicate the full width at half maximum of the gathered spectra.For each data point, the relative phase was changed between the two channels ∆θ and resulting Rabi frequencies Ω N V 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(∆θ) 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 Ω N V A/B on the relative phase ∆θ as a cos(∆θ) 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 Ω N V A/B , a map associating this behaviour would have to be included in optimization for each input control phase (∆θ).Our chosen alternative approach was to fix the input control phase, resulting in a fixed Ω N V A/B , and only optimize the two input amplitudes (Ω 1/2 ) using OCT.

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.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.

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 Ω N V A = 2.64 MHz and Ω N V B = 1.03 MHz, with an experimental phase value of η = 115 • , at a fixed global control phase of ∆θ = 270 • .These values were used to optimize OCT pulses using amplitude-only controls (Ω 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, |0 0| → |0 0|, and selective π-type operation |0 0| → |+1 +1|, respectively.The state-to-state transfer could be achieved in 250 steps of 40 ns each, for a total pulse length of 10 µs.In contrast, 800 steps (32 µs long pulse) were necessary to achieve a complete selective π + 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 |0 state.In an ideal case, the Identity-like operation would yield a population of 100% |0 and the π-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.
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 π pulses.
To improve the results, another set of pulses was optimized that accounted for a small variation in the zero field splitting (≈ 100 kHz) while maintaining the same 10 µs pulse length.These robust pulses improved the population results of the identity experiments to 53%, while leaving the π 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).

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 π + 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.

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) µm and beam depth of field 2.51(4) µm, containing ≈ 16000 NV centers.As with all Gaussian beams, the intensity is halved at the Rayleigh range (Z R ) away from the center and 1 e 2 at the beam radius (ω 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 µm) and objective with a shorter working distance (160 µ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.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, ω o , 0.59(4) mum.The depth of the field is twice the Rayleigh length Z R , 2.51(4) µm.At the Rayleigh length away, along the optical axis, the intensity of the beam is 50%(0.69dB) of the intensity at the maximum.At the edge of beam waist, the intensity is 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.

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].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.

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].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 × 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 µm apart, 127 µm wide, 17.5 µm thick and 7.5 mm long to accommodate diamond samples of larger size.

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 subensemble, 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 π 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 π.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 π 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 lowfrequency sub-ensemble to evolve.

Low Frequency High Frequency
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 |0 state (red arrows).A square π 2 pulse targeted at the low-frequency pair is applied, rotating the low-frequency to the |0 +|±1 √ 2 state (+"x" axis), and the high-frequency to the |±1 state.Applying a control Hamiltonian along the +"x" axis (white arrow), will suppress the evolution of the lowfrequency pair, while the high-frequency pair may evolve freely.After the evolution stage, another π

Sample OCT pulse
The GRAPE algorithm accepts the input control phase ∆θ, and measured experimental values Ω N V A/B and η, then optimizes over the free control parameters, Ω 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 → 1 for optimization.The total length of the pulse (10 µ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.The OCT pulses accept the fixed control phase ∆θ, and experimental values Ω N V A/B and η within the control Hamiltonian and optimize using the free control amplitudes Ω 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 µ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.

Bloch Trajectory of sub-ensemble pair B
Figure 14 shows the Bloch plot trajectory for the NV sub-ensemble B, the lower frequency subensemble, 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 π + 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 (Ω N V B ), guiding the pulse amplitude for this case is 1.03 MHz compared to the 2.64 MHz of the high-frequency sub-ensemble.

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.
C(t) is the vector describing the direction of the microwave field applied.A field in the xz lab direction would be C(t) = {C x (t), 0, C z (t)} and S is the vector representing the spin-1 operators 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 ( S) is shown below: Expressing the individual spin operators in the rotated frame as: 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: 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.

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.
The following equation is used to find the effective Hamiltonian: Where the rotation Hamiltonian (H Rot ) is the P.A.S. of the NV center set at the transmitter frequency (ω T ): And the matrix exponential of which is: The rotation Hamiltonian and its matrix exponential are substituted into equation 15: Equation 18 is expanded.To simplify, recall the following spin-1 operator relationships: Some trigonometric identities and Euler's formula may also be used to simplify: Finally, using the commutators and anti-commutator relationships of the spin operators: Further expanding and simplifying using the above relationships, the effective Hamiltonian for a general transmitter frequency (ω T ), microwave field direction (C x , C y , C z ) and NV orientation (xx,xy, etc.) is found: 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 = i[S y/x , S 2 z ].
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 |0 → |+1 or |−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: 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; Ω 1/2 and θ 1/2 , where To further simply, the squares of the cosine and sine functions may be expanded: 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.
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.

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-1 2 operators.These are of course not true spin-1 2 operators, as the ground state |±1 states share a space with the same |0 state.Expressing the spin-1 operators in this form, allows for the selective transitions between |0 → |+1 / |−1 in the absence of a magnetic field, to be found more easily.
The pseudo spin-1 2 operators are labelled as S ± x and S ± y for the |+1 and |−1 pseudo sub-spaces, respectively.The operators are shown below, recalling S x/y = i[S y/x , S 2 z ]: In matrix form, the resemblance to the Pauli operators can be seen, as is the intention.
The Hamiltonian in equation 29 has already been grouped in accordance to the pseudo spin-1 2 operators, so substituting the pseudo spin- 1  2 operators, and collecting to isolate for these are trivial.Re-arranging the pseudo spin- 1  2 operators in the original spin-1 form, the following is substituted into the Hamiltonian: (-1, 1, -1) (1, -1, -1) 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.

Figure 1 :
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.

Figure 3 :
Figure 3: Bloch sphere representations of the action of a transition-selective OCT pulse, optimized to implement a selective π + operation.The "z"-axis for the positive and negative spheres correspond to the |0 and |+(−1) states.The positive "x"-axis corresponds to the |0 +|±1 √2

Figure 4 :
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.

Figure 6 :
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 ∆θ and resulting Rabi frequencies Ω N V 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(∆θ) 2 .For our OCT experiments, the control phase values were fixed, and amplitude-only control was used for pulse design.

Figure 7 :
Figure 7: The Rabi frequency spectra (black, dashed) show two frequencies from the two subensembles 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.

5 Figure 8 :
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, ω o , 0.59(4) mum.The depth of the field is twice the Rayleigh length Z R , 2.51(4) µm.At the Rayleigh length away, along the optical axis, the intensity of the beam is 50%(0.69dB) of the intensity at the maximum.At the edge of beam waist, the intensity is 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.

Figure 9 :
Figure9: 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.

Figure 10 :
Figure10: The layout for a dual channel microwave control, capable of implementing circularly polarized microwaves.The frequency synthesizer provides the central frequency at ω 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 :
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 Ω loads.The ports are labeled on the schematic above.The two microstrips are 150 µm apart, 127 µm wide, 17.5 µ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 × 4 mm diamond sample in the schematic.Image Source: Image courtesy of Hamid Mohebbi

Figure 13 :
Figure13: Sample pulse, showing the optimizing over the control amplitudes Ω 1/2 to create an OCT pulse.The OCT pulses accept the fixed control phase ∆θ, and experimental values Ω N V A/B and η within the control Hamiltonian and optimize using the free control amplitudes Ω 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 µ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.

Figure 14 :
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 figure3in 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 π + 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.

θ
angle we rotate our C vec for NV to Lab Frame