The negatively charged nitrogen-vacancy (NV^{−}) center in diamond is a model quantum system for university teaching labs due to its room-temperature compatibility and cost-effective operation. Based on the low-cost experimental setup that we have developed and described for the coherent control of the electronic spin [Sewani *et al.*, Am. J. Phys. **88**, 1156–1169 (2020)], we introduce and explain here a number of more advanced experiments that probe the electron–nuclear interaction between the NV^{−} electronic and the ^{14}N and ^{13}C nuclear spins. Optically detected magnetic resonance, Rabi oscillations, Ramsey fringe experiments, and Hahn echo sequences are implemented to demonstrate how the nuclear spins interact with the electron spins. Most experiments only require 15 min of measurement time and, therefore, can be completed within one teaching lab.

## I. INTRODUCTION

The recent progress in the field of quantum technologies—quantum computing, quantum communications, and quantum sensors—has led to considerable commercial interest from entities like the semiconductor industry, software companies, and consulting firms. Quantum technologies are predicted to constitute a ∼$10 billion market within the next decade,^{2} and the high demand for quantum-specialists, as reflected by the high number of current job advertisements,^{3} corroborates this prediction. Universities need to cater to this need and provide their graduates with a thorough understanding of quantum mechanics and solid-state physics, including experimental experience in how to perform quantum measurements and interpret results. However, these skills are difficult to convey in a university teaching lab, due to the sensitivity of quantum systems to environmental disturbances and the high cost of specialized measurement equipment.

As discussed amply in literature, the nitrogen vacancy (NV^{−}) center in diamond possesses an electronic spin that can be initialized and read out optically. It displays microsecond coherence times at room temperature in ambient conditions.^{4} This makes the NV^{−} center a model system for high-school or university teaching labs to perform magnetometry^{5–7} and coherent spin control experiments.^{1,7–10} Based on the same low-cost experimental setup that we have developed in Ref. 1, in combination with an off-the-shelf, commercially available, high-quality chemical vapor deposition (CVD) diamond sample from Element Six, we expand the portfolio of experiments to include the characterization of electron–nuclear spin coupling dynamics.

This paper is organized as follows: In Sec. II, we will give an overview of the learning outcomes that can be conveyed with the experiments in this paper. Section III will then introduce the NV^{−} Hamiltonian with a focus on the terms describing the nuclear spin of the ^{14}N nucleus and its interaction with the electronic spin, and Sec. IV will introduce the Rabi formula that describes the time evolution of a spin during spin resonance. In Sec. V, we will detail the changes made to the equipment with regard to Ref. 1, and in Sec. VI, we will present different experiments with a special emphasis on how the coupling of the electron spin to the ^{14}N nucleus manifests in the optically detected magnetic resonance (ODMR) spectrum (Subsection VI B), Rabi oscillations (Subsection VI C), and Ramsey fringes (Subsection VI D). Finally, we show how the coupling to the bath of ^{13}C nuclei manifests in the Hahn echo decay (Subsection VI E).

## II. LEARNING OUTCOMES

The experiments described below are a set of advanced experiments that build upon the basic ones described in Ref. 1. The basic experiments taught students fundamental concepts such as the NV^{−} center structure, the spin initialization and readout procedure, the features of the ODMR spectrum, the development of pulse sequences, the rotating frame, magnetic resonance, two-axes control, the Bloch sphere, and dynamical decoupling. We will assume knowledge of these concepts for this manuscript and build upon them in order for students to

develop a detailed understanding of the system's Hamiltonian and the ability to map the observed experimental features to its properties.

comprehend the effect of experimental non-idealities like power-broadening and spectral detuning.

observe the interaction between the NV

^{−}electronic spin and the^{14}N nuclear spin, mediated by the hyperfine interaction.experience how the electron–nuclear interaction manifests in both the frequency domain and the time domain, and how those are linked by the Fourier transform.

The concepts demonstrated with these experiments will provide students with an advanced understanding of quantum experiments and a detailed knowledge of electron–nuclear spin interactions. They are applicable to the state-of-the-art research on NV^{−} centers in diamond,^{11–13} other types of color centers in diamond^{14,15} and silicon carbide,^{16} donor spins in silicon,^{17–19} and even gate-defined quantum dots.^{20}

## III. THE NV^{−} CENTER IN DIAMOND

The NV^{−} center in diamond consists of a substitutional nitrogen atom adjacent to a vacant lattice site and exists along four different crystallographic orientations ($[111],[111\xaf],\u2009[1\xaf11\xaf]$, and $[11\xaf1]$).^{1,4,5} These four orientations are, in principle, equivalent but lead to different alignments of the NV^{−} center axes with respect to an externally applied static or oscillating magnetic field. The natural abundance of ^{14}N is 99.6%, and its nuclear spin number is *I* = 1, which means that the electron spin in almost all NV^{−} centers is coupled to a nuclear spin. We, therefore, need to extend the ground state Hamiltonian of the NV^{−} center to account for the coupled ^{14}N nuclear spin. The static Hamiltonian $H0$ contains three main terms:

where $HS$ is the electron spin Hamiltonian, $HI$ is the nuclear spin Hamiltonian, and $HSI$ describes the interaction of the electron spin with the nuclear spin.

The electron spin Hamiltonian

corresponds to the well-known Hamiltonian from Ref. 1, where $D\u22482.87$ GHz is the zero-field splitting of the ground state $|g\u27e9$ and **S** is the vector of electron spin matrices $[Sx,Sy,Sz]$ for an *S* = 1 system. The electron gyromagnetic ratio, which defines the magnitude of the Zeeman splitting, is given by $\gamma e=28$ GHz/T, and $B0$ is the external magnetic field vector. As in Ref. 1, we write the Hamiltonians in units of frequency, as this is more relevant to experiment.

The nuclear spin Hamiltonian

is the corresponding term for the ^{14}N nuclear spin. $P\u2248\u22125.01$ MHz is the nuclear quadrupole moment of ^{14}N, **I** is the vector of nuclear spin matrices $[Ix,Iy,Iz]$ for *I* = 1, and $\gamma n=3.077$ MHz/T is the nuclear gyromagnetic ratio of ^{14}N.^{21–23} Since $\gamma n$ is roughly a factor 10 000 smaller than $\gamma e$, the interaction between the nuclear spin and the external $B0$ field is not observed in our experiments as it would require a field of several 100 mT to be resolved.

The final term in $H0$ describes the interaction of the NV^{−} electron spin with the ^{14}N nuclear spin:

where $A||=2.14$ MHz and $A\u22a5=2.7$ MHz are the parallel and perpendicular components of the hyperfine tensor with respect to the NV^{−} center axis, respectively.^{21}

In Fig. 1(a), we show a schematic of the energy levels of the system (not to scale) according to the Hamiltonian $H0$ in Eq. (1). We start with the bare ground state energy level $|g\u27e9$ of the NV^{−} center on the left side. Turning on the zero-field splitting *D* then lifts the degeneracy between the different *S* = 1 levels, by raising the $ms=\xb11$ levels by *D* = 2.87 GHz above the *m _{s}* = 0 level. Next, we include the electron Zeeman interaction as given by $\gamma e\u2009B0\xb7S$. Assuming that $B0$ is applied along the

*z*-axis, the Zeeman interaction raises the $ms=+1$ level by $2\gamma e\u2009Bz$ above the $ms=\u22121$ level. Finally, we include the

^{14}N nuclear spin. The quadrupole component

*P*lifts the degeneracy between the different

*I*= 1 nuclear spin levels by raising the

*m*= 0 level by 5.01 MHz above the $mI=\xb11$ levels [see Eq. (3)], and the hyperfine interaction between electron spin and nuclear spin further splits the $mI=+1$ and $mI=\u22121$ levels by $|2A|||$ for the $ms=\xb11$ electron spin states [see Eq. (4)]. The nuclear spin Zeeman interaction as defined by $\gamma n\u2009B0\xb7I$ in Eq. (3) is not included in this schematic as it is too small to be observed in our experiments.

_{I}## IV. RABI FORMULA

One of the learning outcomes is the understanding of experimental non-idealities. A very common non-ideality is a driving field that is detuned in frequency from the spin resonance transition and that is strong in power. This will lead to non-perfect rotations of the spin and the power-broadening of the ODMR resonance lines, which prevents the observation of fine features of the spectrum at high driving powers. The effect of both can be easily understood via the Rabi formula, which describes the probability of flipping a spin (or any two-level system) as a function of pulse time when a coherent driving pulse is applied,^{24}

where *t* is the length of the driving pulse, $\Delta =\nu MW\u2212\nu res$ is the frequency detuning between the frequency of the driving field $\nu MW$ and the resonance frequency of the spin transition $\nu res$, and $\Omega R$ is the rotation frequency of the spin while it is driven—the so-called Rabi frequency.^{25} In general, $\Omega R=1/2\gamma e\u2009B1$ for a spin-1 system, where *B*_{1} is the amplitude of the oscillating magnetic field provided by an antenna.^{26} Note that this expression is different from that of a spin-1/2 system for which $\Omega R=12\gamma e\u2009B1$.

Equation (5) can be considered in two parts. The first part is the envelope $\Omega R2/(\Omega R2+\Delta 2)$, which describes the amplitude of the Rabi oscillations. If the amplitude is plotted as a function of the frequency detuning Δ, the result is a Lorentzian lineshape that has a half-width at half-maximum (HWHM) of $\Delta HWHM=\Omega R$. This means that for a detuning of $\Delta =\Omega R$, the spin can still be rotated with 50% amplitude, clearly showing how a high Rabi frequency caused by a large *B*_{1} amplitude leads to a large linewidth in the ODMR spectrum.

The second part of Eq. (5) is the time-dependent quantity $\u2009sin2(12\Omega R2+\Delta 2\u20092\pi \u2009t)$, which describes the actual time evolution of the spin during the Rabi oscillations. The frequency of the Rabi oscillations is given by $\Omega Reff=\Omega R2+\Delta 2$,^{27} an expression that reduces to $\Omega Reff=\Omega R$ for the resonant case with Δ = 0. A profound consequence on experiments being performed at a frequency detuning $\Delta \u22600$ is that the Rabi oscillations are faster and have a smaller amplitude than in the resonant case. This can be visualized by imagining a state on the Bloch sphere that starts at the south pole and rotates about different axes (see Fig. 2). For a rotation axis along the equator of the Bloch sphere, the path that the state would describe on the Bloch sphere would take it all the way to the north pole (i.e., large amplitude), as seen in Fig. 2(a). However, when the rotation axis cants closer to one of the poles, the path that the state describes on the Bloch sphere would not take it very far away from the south pole (i.e., small amplitude), as seen in Fig. 2(b).

## V. EQUIPMENT

The experimental setup used for the experiments in this manuscript is almost identical to the one introduced in detail in Sec. IV of Ref. 1. A few improvements have been introduced to enable the observation of nuclear interactions in the experiments. First, while a photodiode is sufficient to perform the measurements presented here and was, in fact, used for acquiring the data presented in Fig. 1(d), the signal-to-noise ratio can be improved by using an avalanche photodiode (APD), e.g., Excelitas Technologies SPCM-AQRH. As with the photodiode, the APD can simply be connected to the lock-in amplifier input (in voltage mode), where the low-pass filter will average over the short voltage pulses. When these experiments were implemented in the teaching labs at UNSW Sydney, students performed all experiments using standard photodiodes.

Second, as shown in Fig. 1(c), we have added a pair of homemade electromagnetic coils, powered by a DC lab power supply, to generate a well-defined and homogeneous *B*_{0} field. Each coil is constructed from a reel and an L-shaped mount (see Fig. 8 in the Appendix). A hole at the center of the reel allows the addition of a core (in our case, a supermendur cylinder) to further increase the magnetic field. The advantage over permanent magnets is that the magnetic field strength can be easily tuned by adjusting the current going through the coils, and the magnetic field direction is known as well. In the Appendix, we present more details on the design and geometry of the homemade electromagnets. A low-cost, commercial solution is the Adafruit Industries 3875 electromagnet (see, e.g., Digi-Key 1528-2691-ND). An alternative way to measure a more homogeneous ensemble of NV^{−} centers would be to interchange the multi-mode fiber for detection with a single-mode fiber to collect signal from a smaller sample volume.

The sample used for the experiments presented here is a commercially available, off-the-shelf, $\u27e8100\u27e9$-oriented CVD diamond sample from Element Six^{28} and is used without any processing. The dimensions of the sample are $2.6\xd72.6\xd70.25$ mm, and the nitrogen concentration is <1 ppm. In Appendix C of Ref. 1, there is a comparison between this sample and a high-pressure, high-temperature (HPHT) diamond sample that was used for the experiments in Ref. 1. The CVD sample has a $\u223c1000$ times lower PL signal, and while the spin signal decreases proportionally, we obtain high-quality data with only $\u223c10$ times longer measurement times. In contrast, the CVD sample has a much longer coherence time than the HPHT sample, on the account of the lower N concentration, which allows the observation of effects originating from coupling to nuclear spins. More recently, we have also started using a commercially available sample from Element Six with an NV center density of $\u223c300$ ppb, optimized for quantum experiments.^{29} The ODMR signal from this sample is over $50\xd7$ higher than the signal obtained from the CVD sample;^{28} this larger density sample was used for the experiments in Fig. 4(a).

## VI. EXPERIMENTS

All experiments described here are based on the electron spin resonance (ESR) technique, which allows us to coherently control the electron spin of the NV^{−} center and perform different types of measurements depending on the exact pulse sequence. More precisely, the type of ESR experiment that we perform here is termed ODMR, since the electron spin state is read out (and initialized) via optical means, i.e., laser excitation and spin-dependent photon emission via photoluminescence (PL). The exact process was already described in Ref. 1 and many other publications.^{4,5,7,8}

As introduced in Ref. 1 and can be seen in Fig. 1(a), there are a number of different ESR transitions that can be driven with an oscillating or rotating magnetic field *B*_{1}. For $B0=0$ T and neglecting the nuclear spin, all transitions are degenerate and centered around *D* = 2.87 GHz. When the magnetic field is turned on, the Zeeman splitting [Eq. (2)] lifts this degeneracy and leads to different resonance frequencies for $ms=0\u2194ms=\u22121$ and $ms=0\u2194ms=+1$. When the interaction with the ^{14}N nuclear spin is included, there are six possible transitions—two each for $mI=\u22121$ (red arrows), *m _{I}* = 0 (orange arrows), and $mI=+1$ (green arrows). These transitions will keep the nuclear spin state unchanged but modify the electron spin state.

### A. Magnetic field dependence

We start by measuring the ODMR spectrum of the diamond sample as a function of magnetic field *B*_{0}. The CVD diamond chip has {100} faces, i.e., perpendicular to the $\u27e8100\u27e9$ directions, and the four orientations of NV^{−} centers are along the [111], [1$1\xaf1\xaf$], [$1\xaf11\xaf$], and [$1\xaf1\xaf1$] directions (see Fig. 3). The *B*_{1} field created by the printed-circuit-board antenna is applied along the [001] direction, and therefore, perpendicular to the sample surface. The *B*_{0} field created by the coils of the electromagnet is applied parallel to the sample surface. By rotating the CVD sample on the sample holder, different *B*_{0} directions with respect to the crystallographic axes can be created. More specifically, when the sample is mounted in a square orientation [i.e., like *□*, as shown in Fig. 3(a)], the *B*_{0} field acts along the [100] direction. This results in all four NV^{−} orientations experiencing the same effective angle between their NV^{−} axes and *B*_{0} and having the same two ODMR frequencies. However, when the sample is mounted in a diamond orientation [i.e., like $\u22c4$, as shown in Fig. 3(b)], the *B*_{0} field acts along the [110] direction, resulting in the same effective angle for the [111] and [$1\xaf1\xaf1$], and the [1$1\xaf1\xaf$] and [$1\xaf11\xaf$] orientations, respectively, and a total of four ODMR frequencies. In order to lift the degeneracy of all four NV^{−} orientations and see eight different transitions appear, *B*_{0} needs to be additionally rotated out of the sample plane.

We mount our sample roughly in the diamond orientation (i.e., like $\u22c4$), i.e., with *B*_{0} directed along the [110] direction; however, we introduce a slight misalignment and let students work out the exact orientation of the magnetic field. They can achieve this by recording *B*_{0}-dependent ODMR spectra and mapping the observed splittings onto the calculated transition energies from Hamiltonian $HS$ [Eq. (2)] using MATLAB.

We plot such a magnetic field map in Fig. 1(d). Here, the magnitude of *B*_{0} can be increased without altering the magnetic field direction by increasing the current through the electromagnet (see top *x*-axis) from 0 to 1.0 A in 21 steps. For each *B*_{0} magnitude, ODMR spectra were recorded to build up the 2D ODMR map. Students then fit the simple electron spin Hamiltonian $HS$ to the data to work out the coil constant that describes the relationship between current and *B*_{0} field. The dashed lines in Fig. 1(d) show the best fit for these data. The fit indicates that *B*_{0} is applied along the [0.56 0.83 0.03] direction, and the coil constant is 11.9 mT/A.

Note that the resistance of the electromagnetic coils is about 15 Ω, and that it increases when the coils heat up at larger driving currents. It is, therefore, important to use a current source to control the magnetic field. Furthermore, the coils will also heat up the diamond sample and, therefore, the NV^{−} center environment. At a high current, the ODMR spectrum will shift according to the temperature dependency of the zero-field-splitting $dD/dT=\u221274.2$ kHz/K.^{30} For our experimental setup, a current of 1 A heats up the diamond sample by $\u223c40$ K and shifts the zero-field splitting by $\u223c3$ MHz.

In the teaching labs at UNSW Sydney, students recorded eleven ODMR spectra for electromagnet currents between 0 and 0.5 A in 0.05 A steps. Each spectrum was measured from 2.65 to 3.09 GHz in 221 steps with a wait time per point of 600 ms using the photodiode. This resulted in a total measurement time of $\u223c25$ min. While the measurements were running, the students were given a prepared MATLAB script to examine the relationship between the coil constant and the magnetic field orientation. The students were then able to iteratively extract the relevant *B*_{0} parameters by fitting their values to the measurement data, comfortably within the allocated time frame of the lab. This exercise addresses the first learning outcome in Sec. II.

### B. Spectral signature of hyperfine-coupled ^{14}N

Having mapped out the Zeeman splitting of the *S* = 1 NV^{−} center electron spin in Fig. 1(d), we can now take a closer look at the ODMR spectrum to examine the spectral signature of the hyperfine-coupled ^{14}N nuclear spins. Owing to the optical properties of the NV^{−} center, the electron–nuclear spin interactions for the native ^{14}N nucleus can be seen directly in the ODMR spectrum. The ^{14}N hyperfine interaction tensor [see Eq. (4)] splits each electron energy level [see Fig. 1(a)], causing the electron spin transitions to become nuclear spin dependent, with a 2.16 MHz splitting in between the different *I _{z}* projections. The different colored arrows in Fig. 1(a) represent the allowed electron spin transitions for the different nuclear spin orientations $mI=\u22121$ (red),

*m*= 0 (orange), and $mI=+1$ (green). These splittings can be resolved with a high-quality, low-concentration NV

_{I}^{−}center ensemble sample ($\u22641$ ppm

^{31}) with a high ODMR frequency resolution and a low microwave power.

^{32}

In Fig. 3(c), we show the ODMR spectrum at a magnetic field of $B0=1.3$ mT along the [0.67, 0.74, and 0.02] direction (as estimated from the spectrum). The field is only slightly misaligned from the [110] crystallographic axis [see also the inset in Fig. 3(c)], leading to similar Zeeman splittings and overlapping transitions for the $[111]$ and $[1\xaf1\xaf1]$, and the $[11\xaf1\xaf]$ and $[1\xaf11\xaf]$ NV^{−} orientations, respectively. All the coherent control measurement results in Secs. VI C, D, and E (i.e., Figs. 4, 6, and 7) are taken based on this field strength and orientation. Each peak in Fig. 3(c) displays a triplet structure that corresponds to the three different nuclear spin orientations. In Secs. VI C, D, and E, we will examine closely what effect the presence of the hyperfine lines has in coherent control experiments such as Rabi oscillations, Ramsey oscillations, and Hahn echoes.

From the Rabi formula (see Sec. IV), we know that a lower microwave (MW) power results in a narrower HWHM of the peaks in the spectrum. We map out this dependency in Fig. 4(a), where we plot five ODMR spectra recorded for different MW powers (open circles), together with a fit to the sum of three Lorentzian peaks with equal width and area (solid lines). At the lowest MW power, the three hyperfine peaks are clearly separated, while the power broadening at the higher powers leads to an overlap of the individual peaks.

We, therefore, need to work with low MW powers if we want to resolve the hyperfine splitting without power broadening. This requires a balance between resolution and signal strength; we noticed that it is advantageous to work at low magnetic fields where the quenching of the photoluminescence is insignificant, and the electron spin transitions from two different NV^{−} orientations with slightly different angles overlap. For all following experiments, however, we choose a MW power that leads to some overlap between peaks [similar to the +3 dBm curve in Fig. 4(a)] in order to observe effects of simultaneously driving neighboring transitions.

In principle, it is also possible to work with NV^{−} centers of a single orientation. To achieve this, a slightly misaligned and higher magnetic field is needed to split the electron spin transitions associated with the four different NV^{−} orientations.^{33} Figure 4(d) shows an example spectrum of the electron spin transitions between *m _{s}* = 0 and $ms=+1$ at $B0=14.3$ mT. The three different nuclear spin states can be clearly resolved and are labeled accordingly. We fit the spectrum with the sum of three Lorentzian peaks with equal amplitude and HWHM shown as black line, with the individual Lorentzian peaks show as red lines.

### C. Rabi oscillations in the presence of ^{14}N

Applying a microwave pulse in resonance with one of the three hyperfine lines (caused by the ^{14}N nuclear spin) induces coherent electron spin oscillations between the *m _{s}* = 0 and $ms=\xb11$ spin eigenstates, a phenomenon known as Rabi oscillations. However, it is important to realize that the microwaves are simultaneously driving the detuned hyperfine transitions, due to the finite linewidth of the individual lines as well as the power broadening as described by the Rabi formula [e.g., see overlap of peaks in Figs. 4(a), 4(c), and 4(d)].

Figure 4(b) shows a Rabi oscillation experiment, driven with the microwave frequency in resonance with the *m _{I}* = 0 transition [middle peak of the left triplet in Fig. 4(a)], and the data are fitted to the sum of two exponentially decaying sinusoids $A\alpha \u2009sin\u2009(2\pi f\alpha )\u2009exp\u2009(\u2212\tau /T\alpha )+A\beta \u2009sin\u2009(2\pi f\beta )\u2009exp\u2009(\u2212\tau /T\beta )$ (black line). The frequencies for the two sinusoids correspond to the on-resonance drive of the

*m*= 0 transition and the detuned drive of the $mI=\xb11$ transitions. The two oscillation frequencies become apparent when taking the fast Fourier transform (FFT) of the Rabi oscillation experiment data [see inset of Fig. 4(b)], showing peaks at $\Omega Rres\u22480.7$ MHz and $\Omega Rdet\u22482.3$ MHz.

_{I}According to the Rabi formula [Eq. (5)], the Rabi oscillation frequency is given by

where $\Omega Rres$ is the on-resonance Rabi oscillation frequency and Δ is the detuning. $\Omega Rres$ is given by

where *B*_{1} is the oscillating magnetic field component perpendicular to the NV^{−} axis delivered by the antenna.^{34} Therefore, the Rabi frequency of $\Omega R=0.667\xb10.005$ MHz in Fig. 4(b) corresponds to a field amplitude of $B1=0.034$ mT, and we keep it fixed to this value for all coherent control experiments. The faster frequency of $\Omega Rdet=2.35\xb10.06$ MHz in Fig. 4(b) corresponds to Rabi oscillations on the detuned hyperfine transitions and agrees well with the one calculated using Eq. (6), where $\Delta A=2.16$ MHz is the detuning between adjacent hyperfine peaks: $\Omega Rdet=(\Omega Rres)2+\Delta A2=(0.667\u2009MHz)2+(2.16\u2009MHz)2=2.26$ MHz. The Rabi coherence time extracted from the on-resonance component is $T2R=3.96$*μ*s, which is most likely limited by the inhomogeneity of the *B*_{1} field over the sample area.^{26}

The effect of power broadening and cross-talk between the different hyperfine lines can be well visualized in a so-called Rabi chevron experiment, where the MW frequency and the pulse length are both swept—or, in other words, a Rabi oscillation measurement is performed for various MW frequencies. Note that due the large number of data points, a Rabi chevron is usually outside of the scope of a teaching lab. Figure 4(c) shows such a measurement for the same triplet of peaks as in Figs. 4(a) and 4(b). Each of the three hyperfine lines shows its own chevron fringes, overlapping with the neighboring lines, and leading to the deviation from a single, decaying sinusoid in Fig. 4(b).

In principle, a simultaneous drive of all three hyperfine lines with similar strength can be achieved by applying a MW drive with stronger power to increase the Rabi oscillation frequency beyond the hyperfine coupling (2.16 MHz).^{26} However, in our experiments, the MW power was purposefully kept low, so that the effect of hyperfine transitions can be observed. This allows students to develop an intuitive understanding of the consequences and origin of power broadening, fulfilling the second learning outcome in Sec. II.

The Rabi experiment discussed in this section is the gateway between performing spin resonance spectroscopy and applying discrete gate operations in pulse sequences. Extracting the Rabi frequency $\Omega R=0.667$ MHz allows us to calibrate the lengths of our MW pulses to perform controlled rotations around the Bloch sphere. Here, a *π*-pulse corresponds to a MW pulse of correct length $\tau \pi =0.75$ *μ*s to rotate the electron spin $180\xb0$ around the Bloch sphere, e.g., from *m _{s}* = 0 to $ms=\u22121$. A $\pi /2$-pulse of length $\tau \pi /2=0.38$

*μ*s rotates the electron spin by $90\xb0$, e.g., from the

*m*= 0 state to the $|+y\u27e9=1/2(|0\u27e9+i|\u22121\u27e9)$ superposition state at the equator of the Bloch sphere. Once the pulse lengths have been calibrated, experiments using pulse sequences, such as the coherence times measurements in Secs. VI D and E, can be implemented. See also Ref. 1 for a more detailed discussion and visualizations on spin rotations.

_{s}### D. Ramsey fringes in the presence of ^{14}N

A Ramsey experiment measures the free-induction decay or $T2*$ coherence time of a spin or a spin ensemble. The $T2*$ time is affected not only by noise during the pulse sequence but also by detunings between the transition and the MW frequency. This is because the sequence does not contain any refocusing or echo pulses, in contrast to the Hahn echo and Carr–Purcell–Meiboom–Gill (CPMG) sequences discussed in Sec. VI E.

Figure 5 shows the pulse sequence that we use in our experiments and the outputs of the individual channels (CH0–CH3) of the Pulse Blaster. The spins are initialized into the $|0\u27e9$ state by the first laser pulse and read out by the second laser pulse (CH1). The MW pulse sequence (CH2 and CH3) is applied only during the first half-cycle for the lock-in amplifier (CH0), so that the lock-in detection scheme is sensitive to changes in the photoluminescence caused by the MW pulse sequence (see also Ref. 1). The first microwave $\pi /2$-pulse, applied along the *X*-axis, rotates the NV^{−} electron spins from $|0\u27e9$ to the *Y*-axis of the Bloch sphere, corresponding to the $|+y\u27e9=1/2(|0\u27e9+i|\u22121\u27e9)$ superposition state in the rotating frame. We then let the spins dephase freely for a duration *τ*, before applying a second microwave $\pi /2$-pulse along the *X*-axis to transfer the NV^{−} spin polarization from $|+y\u27e9$ to $|\u22121\u27e9$ for readout. A free induction decay curve can be recorded by varying the free precession time *τ*, and the resulting data show an exponential decay in $|\u22121\u27e9$ population as a function of *τ* with decay time $T2*$ caused by decoherence and inhomogeneities.^{34} For NV^{−}, the main inhomogeneities come from the variations in local strain and electric fields as well as temporal and spatial fluctuations of the surrounding ^{13}C nuclear spin bath.^{4} In addition, a constant frequency detuning between the spins and the MW drive will lead to a sinusoidal modulation of the data. This is because the spins precess at the speed of the detuning in the reference frame of the MW source, causing them to rotate from $|+y\u27e9$ toward $|+x\u27e9$ or $|\u2212x\u27e9$ and onward, depending on the sign of the detuning. As the second $\pi /2$-pulse in the sequence maps $|+y\u27e9\u2192|\u22121\u27e9,\u2009|+x\u27e9\u2192|+x\u27e9,\u2009|\u2212y\u27e9\u2192|0\u27e9$, and $|\u2212x\u27e9\u2192|\u2212x\u27e9$, the constant detuning manifests as a sinusoidal oscillation in the $|\u22121\u27e9$ population at the end of the sequence. As a consequence, a Ramsey sequence is often used for the accurate estimation of shifts in the spin qubit resonance frequency, as is important in magnetometry experiments.^{35}

In Fig. 6(a), we show in blue the Ramsey data obtained for driving the NV^{−} in resonance with the *m _{I}* = 0 transition [same as the Rabi oscillations in Fig. 4(b)]. The data show the exponential decay superimposed with a sinusoidal modulation. We fit the data to the function $exp\u2009(\u2212\tau /T2*)\u2211i=1n[Ai\u2009sin\u2009(2\pi fi)]$, where

*n*corresponds to the number of expected transitions.

^{36}Looking at the corresponding FFT of the data in Fig. 6(c), we can clearly see two peaks. The peak at low frequencies indicates a slight detuning of our MW source to the

*m*= 0 transition frequency. The smaller peak at $\u223c2$ MHz corresponds to the signal from the detuned $mI=\xb11$ hyperfine lines, which are detuned from the

_{I}*m*= 0 transition by $\Delta A=2.16$ MHz.

_{I}In Fig. 6(b), we show very similar data with the Ramsey experiment performed in resonance with the $mI=\u22121$ transition. The data now show two discrete modulation frequencies: one for the *m _{I}* = 0 electron spin subsystem that is detuned by Δ

_{A}and a second one for the $mI=+1$ subsystem that is detuned by $2\Delta A$. The two frequency components can be clearly seen as peaks in the Fourier-transform of the decay data in Fig. 6(d).

For both Ramsey experiments in Figs. 6(a) and 6(b), we also show data that are obtained by applying the second microwave $\pi /2$-pulse along the *Y*-axis (purple data). This modifies the mapping of the spin before readout to $|y\u27e9\u2192|y\u27e9,|x\u27e9\u2192|0\u27e9,\u2009|\u2212y\u27e9\u2192|\u2212y\u27e9$, and $|\u2212x\u27e9\u2192|\u22121\u27e9$. As the projection pulse along the *Y*-axis (purple data) is shifted by $\pi /2$ in phase with respect to the projection pulse along the *X*-axis (blue date), the sinusoidal modulations are also shifted in phase by $\pi /2$ as seen in Figs. 6(a) and 6(b). The possibility to modify the projection axis by adjusting the phase of the MW source forms the basis for quantum state tomography^{37} and allows the extension of the teaching labs to include further experiments.

### E. Hahn echo in the presence of ^{13}C

The Hahn echo experiment is designed to cancel out constant detunings and frequency offsets by adding an extra *π*-pulse to the sequence. The *π*-pulse inverts the spins halfway through the precession and as such refocuses variations in their Larmor precession frequency.^{38} We have already introduced this experiment in Ref. 1 for the purpose of dynamical decoupling, where it helps to improve the transverse relaxation time of the relevant spins, allowing the coherence time to be extended beyond the free induction decay time.

The MW pulse sequence we implement for the Hahn echo measurement is $X\pi /2\u2212\tau \u2212X\pi \u2212\tau \u2212X\pi /2$. In this sequence, the electron spins are initialized in the $|0\u27e9$ state and rotated into the superposition state $|y\u27e9=1/2(|0\u27e9+i|\u22121\u27e9)$ using a MW $\pi /2$-pulse. The spins are then left to freely precess for a length of time *τ*, after which they are inverted on the Bloch sphere with a *π*-pulse. The spins are again left to precess for the same amount of time, causing them to refocus before being rotated back into the $|0\u27e9$ state with another $\pi /2$-pulse for optical readout. The spin signal is then measured as a function of the free precession time *τ*, and the $T2Hahn$ coherence time is given as the time constant of the exponential decay of the signal.

The Hahn echo can also be used to reveal interactions between spins—in this case, the hyperfine coupling to the ^{13}C nuclei in proximity to the NV spins that have a natural abundance of 1.1%. The randomly distributed ^{13}C nuclei of the diamond lattice produce a local magnetic field that is modulated by their Larmor precession frequencies, effectively resulting in an oscillating background magnetic field. Since the Hahn echo sequence can only remove slow fluctuations in detuning, the Larmor precession of the nuclei will lead to gradual decoherence of the electron spin. However, if the refocusing pulse occurs after exactly one period of nuclear spin precession, the background field modulation in both free precession intervals is exactly the same and the coherence reappears.

In Fig. 7(a), we present the Hahn echo signal measured at a magnetic field of $B0=1.3$ mT. From the exponential decay, we extract $T2Hahn=11.7\xb10.2$ *μ*s. Upon further investigation, a measurement at a higher magnetic field of $B0=5.84$ mT reveals the presence of the above-mentioned coherence revival within the Hahn echo signal, as shown in Fig. 7(b). The decay and revival in Fig. 7(b) are attributed to the weak hyperfine coupling to the ^{13}C spins near the NV center lattice sites.^{39} The signal revival at $2\tau \u223c30$ *μ*s corresponds to a frequency of $\u223c66.7$ kHz, which is consistent with the $fC=\gamma CB0=62.5$ kHz Larmor precession frequency of the spin-$12$ nuclei with $\gamma C=10.705$ MHz/T and $B0=5.84$ mT.^{39,40} The black line is a fit of the spin signal to two inverted Gaussian peaks whose amplitude follows an exponential decay $\u221d\u2009exp\u2009[\u2212(2\tau /T2Hahn)]$, which gives $T2Hahn=63\xb110$ *μ*s. According to Ref. 40, the $T2Hahn$ of an NV^{−} ensemble can be as long as 600 *μ*s at room temperature. However, the coherence time reduces when the magnetic field is not parallel to the NV^{−} axis, as is the case in our samples and experiments.

As the coherence revival rate is linked to the Larmor precession frequency of the ^{13}C nuclei, and therefore, proportional to the applied magnetic field, this revival is not present in Fig. 7(a) where the lower magnetic field of $B0=1.3$ mT would have led to a revival at $2\tau =144$ *μ*s, longer than the $T2Hahn$ coherence time.

## VII. CONCLUSION

Using the cost-effective, room-temperature teaching setup described in Ref. 1, along with some small improvements (electromagnet and lower NV^{−} density diamond sample), we have presented here a set of more advanced experiments that aim to provide students with an in-depth understanding of physical concepts that are important for various quantum technologies. The experiments are designed to highlight the interaction of the NV^{−} centers with surrounding nuclear spins via the hyperfine interactions. The experiments allow the students to gain a better understanding of experimental imperfections as well as experience the manifestation of spin–spin interactions with the intrinsic ^{14}N nuclear spin and the bath of surrounding ^{13}C nuclear spins. These interactions become visible in the presented Rabi oscillation, free induction decay, and Hahn echo experiments.

Despite the weaker signal intensity of the lower-density NV^{−} diamond sample used here, the experiments work robustly on a standard desk in room light and have partially been implemented in a fourth-year undergraduate course at UNSW Sydney. Furthermore, the possibility for students to design their own pulse sequences and collect measurement data in real-time makes this setup also an interesting option for more complex experiments in an undergraduate thesis.

## ACKNOWLEDGMENTS

The authors would like to thank Jean-Philippe Tetienne (RMIT), Marcus Doherty (ANU), and Damian Kwiatkowski (TU Delft) for useful discussions. The authors acknowledge support from the School of Electrical Engineering and Telecommunications at UNSW Sydney and the Australian Research Council (No. CE170100012). H.V. acknowledges support from the Sydney Quantum Academy. H.R.F. acknowledges support from an Australian Government Research Training Program Scholarship. J.J.P. is supported by an Australian Research Council Discovery Early Career Research Award (No. DE190101397). A.L. and C.A. acknowledge support through the UNSW Scientia Program.

### APPENDIX: DESIGN OF THE ELECTROMAGNET

## References

^{−}centers in diamond in a quantum teaching lab

_{3}dielectric resonator at cryogenic temperatures

^{−}diamond magnetometry