Error Corrected Spin-State Readout in a Nanodiamond

Quantum state readout is a key component of quantum technologies, including applications in sensing, computation, and secure communication. Readout fidelity can be enhanced by repeating readouts. However, the number of repeated readouts is limited by measurement backaction, which changes the quantum state that is measured. This detrimental effect can be overcome by storing the quantum state in an ancilla qubit, chosen to be robust against measurement backaction and to allow error correction. Here, we protect the electronic-spin state of a diamond nitrogen-vacancy center from measurement backaction using a robust multilevel 14N nuclear spin memory and perform repetitive readout, as demonstrated in previous work on bulk diamond devices. We achieve additional protection using error correction based on the quantum logic of coherent feedback to reverse measurement backaction. The repetitive spin readout scheme provides a 13-fold enhancement of readout fidelity over conventional readout and the error correction a 2-fold improvement in the signal. These experiments demonstrate full quantum control of a nitrogen vacancy center electronic spin coupled to its host 14N nuclear spin inside a ~25 nm nanodiamond, creating a sensitive and biologically compatible platform for nanoscale quantum sensing. Our error-corrected repetitive readout scheme is particularly useful for quadrupolar nuclear magnetic resonance imaging in the low magnetic field regime where conventional repetitive readout suffers from strong measurement backaction. More broadly, methods for correcting longitudinal (bit-flip) errors described here could be used to improve quantum algorithms that require nonvolatile local memory, such as correlation spectroscopy measurements for high resolution sensing.


Introduction
Quantum devices rely on the readout of a quantum system after a period of controlled evolution or interaction with other systems. High readout fidelity is critical to such devices, because it enables heralded state initialization 1-3 , quantum error correction 4 , and improved sensitivity of quantum sensors 5,6 . Weak signals are typical for quantum systems and limit the information that can be gained about the state of the system in one readout step. In addition, all quantum measurements exhibit backaction, which changes the device's state during readout. In the absence of backaction, namely for an ideal quantum non-demolition measurement, the problem of a weak signal could be overcome by multiple repeated readout steps. In this article, we describe and demonstrate an error correction protocol that protects spin memories from measurement backaction in the form of depolarization due to spin-spin interactions.
We choose to implement our protocol in a nitrogen-vacancy center (NV) in diamond, a versatile system for quantum sensing, due to the ease of controllability of its electronic spin and the in-built multi-level local nuclear memory: the three spin states of the nitrogen-14 nuclear spin (see illustration in Fig. 1a). The NV center has emerged as a promising candidate for quantum information 7,8 and sensing 6,[9][10][11] applications because its electronic spin has a long coherence time at room temperature and can be easily initialized, readout and controlled with optical and microwave (MW) fields. However, room-temperature optical readout using the NV center's spin-dependent fluorescence yields only ≈ 0.02 detected photons in typical experiments like ours before the spin state is repolarized, leading to a low readout fidelity. Recent experiments on bulk-diamond NV centers overcome this poor readout by using nearby hyperfine-coupled nuclear spins as memory qubits to store and repetitively readout the NV center's electronic-spin state 3,5,[12][13][14][15][16] . Other techniques 17 -predominantly excitation of optical cycling transitions 18,19 -can also improve readout fidelity, but such techniques are not widely used in room-temperature sensing experiments as they require additional lasers, cryogenic temperatures, or sensitive electrical measurements. The fidelity 3 achievable with the nuclear-spin repetitive readout technique is limited by measurement backaction in the form of nuclear spin depolarization that occurs when the NV center is optically excited. Here we show that our error correction protocol can partially reverse this depolarization and improve readout fidelity by using the NV electronic spin as an ancilla qubit to control the host 14 N nuclear spin. Crucially, our protocol does not require measurement, which has low fidelity for our system, because we use the quantum logic of coherent feedback 20,21 to perform error correction. We demonstrate that this protocol can enhance the repetitive readout fidelity of a nitrogen-vacancy (NV) center electronic spin by more than 50% in the regime where backaction is strong.
We apply our protocol to an NV center in a high-purity nanodiamond ( Fig. 1a) with typical diameter of 25 nm 22 . Building upon our recent demonstration of preparation, readout and coherent control of a 13 C nuclear spin in a nanodiamond 23 , here we demonstrate repetitive readout of a 14 N nuclear spin in a nanodiamond. These techniques, which have been widely used in bulk NV center experiments, enable a wide range of nuclear-spin assisted measurements and enhanced sensitivity 5,13,24 . By combining nuclear spin-assisted readout with the small size of these nanodiamonds we hope to enhance NV sensors for applications such as scanning magnetometry, interferometry of mechanical motion 25 , and intracellular nanoscale measurements 26,27 .

Coherent Control and Repetitive Readout of a Host 14 N nuclear spin in a Nanodiamond
Figure 1b presents the NV electronic spin ( = 1) and the 14 N nuclear spin ( = 1) hyperfine levels in the ground-state manifold, including the electronic microwave (MW) and nuclear radio frequency (RF) transitions, and the optically induced spin flip-flop transitions, ± that occur between the electronic and nuclear spin in the electronic excited state. In order to drive direct coherent rotations that target individual hyperfine energy levels, NV center electronic-spin coherence times T2 * ≳ 1 μs are required so that the hyperfine transitions are well resolved 7,28,29 . Here, we are able to 4 reach this regime by using high-purity nanodiamond crystals with a relatively low nitrogen defect concentration of 50 ppm 22 .
where o is the optical pumping rate induced by laser excitation, ≈ 2 is the electron g-factor, is the Bohr magneton, and es and es are the perpendicular component of the hyperfine interaction and the electronic-spin zero-field energy splitting of the NV center's optical excited state, respectively 31,32 . The ± transitions are strongest near the excited state level avoided crossing (ESLAC) at 0 = ∓ ESLAC = ∓ es ( ) ⁄ = ∓51 mT due to the strong spin mixing (Fig. 1d inset).
In the moderate-field regime where 0 ≈ ESLAC , the − transitions are 10 3 times stronger than the + transitions, as shown in Fig. 1d. This imbalance between + and − together with the optical electronic spin polarization into |0⟩ e creates the dynamic nuclear polarization seen in the middle green curve of Fig. 1c. In contrast, in the low-field regime ( 0 ≪ ESLAC ), + and − are comparable, and polarization does not occur, as shown in the top black curve of Fig. 1c.
In the high-field regime where 0 ≫ ESLAC the ± transition strengths have similar magnitude and are much weaker overall, which reduces the steady state degree of polarization and the rate of polarization. To polarize the nuclear spin in this regime we transfer electron spin polarization onto the nuclear spin using repeated SWAP operations, which exchange the electronic and nuclear spin states and are created by direct RF rotations (see Supplementary Note 1) of the nuclear spin and hyperfine selective MW pulses 31,33 . Figure 1c shows 85% polarization into |0⟩ n reached at 244 mT (bottom blue curve), indicating that a high degree of nuclear spin polarization can be reached in nanodiamond-hosted NV centers in the high-field regime.
In this high-field regime, the slow ± flip-flop transitions make it possible to perform repetitive readout of the nuclear spin state with weak measurement backaction 3 , as described earlier.
We use the protocol shown in Fig. 2a to characterize repetitive readout of the NV center's electronic spin state after it has been stored in the nuclear spin. After initializing the system into the state |0⟩ e |+1⟩ n , we use the MWB transition (see Fig. 1b) to either prepare the electronic spin state in |−1⟩ e or leave it in |0⟩ e . A CNOT gate created by two RF pulses maps the electronic spin state onto a nuclear spin state so that |0⟩ e |+1⟩ n → |0⟩ e |+1⟩ n and |−1⟩ e |+1⟩ n → |−1⟩ e |−1⟩ n . Finally, the nuclear spin state is measured by repetitive readout of the ODMR on the MWE transition. We store the original electronic spin state in the {|±1⟩ n } code space because this mapping provides a slow loss of relative polarization due to the buffer |0⟩ n state 3 . We quantify the repetitive readout by the total number of detector counts, 0 and 1 , that are collected when the electronic spin is initialized into the |0⟩ e or |−1⟩ e state, respectively. The figure of merit for this readout scheme is the readout fidelity 6,34 , 6 This takes into account both shot noise and spin-projection noise and quantifies the efficiency of a readout scheme, approaching unity for an ideal projection-limited readout.
As shown in Fig. 2b, the repetitive readout protocol can improve readout fidelity by more than a factor of 10 from = 0.03 for a single electronic-spin readout to = 0.4 for = 2300 repetitive nuclear spin readouts. The cumulative signal 0 − 1 increases linearly with repeated readout steps initially but saturates exponentially with a characteristic scale 1/~1 700 (Fig. 2b inset). This saturation occurs because information about the nuclear spin state is lost to measurement backaction induced by the ± transitions. As the cumulative signal saturates and the shot noise increases with √ , the readout fidelity decreases for large numbers of readouts as shown in the main plot of Fig. 2b.
These results are consistent with a model that includes only the depolarization errors due to the ± flip-flop transitions during optical readout without any additional depolarization mechanisms (Supplementary Note 2). We thus predict that repetitive readout in our nanodiamonds is limited only by this flip-flop interaction occurring in the electronic excited state, and that working in an even higher-field regime ( 0 ≫ ESLAC , with reduced ± rates) would lead to additional enhancements in repetitive readout fidelity, including single-shot readout 3 .

Error-Corrected Repetitive Readout
We now present an error correction protocol which can improve repetitive readout fidelity by correcting errors caused by the ± transitions. We take advantage of the error imbalance between the weak + and strong − transitions in the moderate-field regime (Fig. 1d) to design a classical error correction protocol using the three nuclear-spin states as our logical storage space.
The frequent − type flip-flop errors from |−1⟩ n to |0⟩ n can be corrected by periodically performing coherent feedback to transfer any population residing in |0⟩ n back into the |−1⟩ n state (see illustration in Fig. 3a, top panel). The feedback procedure may actually create an additional error if a 7 + type flip-flop from |+1⟩ n to |0⟩ n has occurred, but this type of flip-flop error is rare because + is weak.
We implement this protocol using the pulse sequence shown in Fig. 3a, bottom panel. This protocol follows that of conventional repetitive readout, but after an error-correction period of r nuclear-spin readouts, we use a combination of a MW and a RF pulse to create a SWAP gate in the This combination of r readout steps and one error correction sequence is repeated until total readouts have been performed. Fig. 3c shows a comparison of the readout fidelity with and without error correction when working in the moderate-field regime ( 0 = 82 mT) and using frequent error correction ( r = 5). Without error correction, the repetitive readout fidelity reaches a maximum of = 0.08 for = 120 readouts, much lower than the high-field fidelity presented earlier due to the strong flip-flop error rate − in this moderate-field regime. The error correction protocol improves repetitive readout fidelity by 57 ± 8% to = 0.13 for = 235 readouts. This improvement is equivalent to increasing the NV center brightness by 250 ± 25%. As shown in Fig.   3c, decreasing the error-correction period r improves readout fidelity because lower repumping periods reduce the probability of an uncorrectable double-error (|−1⟩ n → |0⟩ n → |+1⟩ n ) occurring between error correction sequences. The improvement in readout fidelity scales as r −1/2 for small r . This scaling is an intrinsic feature of the protocol and can be explained by a simple model that assumes ideal error correction operations (Supplementary Note 2).
The solid curve in Fig. 3c shows  Fig. 3c is the electronic-spin polarization fidelity, which we extract as |0⟩ e = 0.81, consistent with previous studies 12, 35,36 . The model shows that this low electronicspin polarization fidelity reduces the readout fidelity achievable through the error correction protocol by roughly 30% compared to the ideal scenario in which |0⟩ e = 1. This reduced performance is due to the finite probability of the system occupying the |−1⟩ e |−1⟩ n state before the error correction operation, which causes the SWAP gate to induce an error by transferring the system into the |0⟩ n state. The sub-unity charge state fidelity (ratio of the neutrally charged NV 0 and the negatively charged NVpopulation after optical excitation), estimated at 0.75 from our nuclear spin Rabi oscillation data 12 , also reduces the corrected readout fidelity by roughly 10% because the error correction sequence has no effect in the NV 0 state. The model further predicts an improvement in readout fidelity of around 100% over conventional repetitive readout for r = 1.
We also perform error-corrected repetitive readout measurements in the high-field regime at 0 = 244 mT and observed a 7% improvement in readout fidelity due to error correction (Supplementary Note 4). The smaller improvement is expected as our scheme targets only − type errors and thus operates most effectively in the moderate-field regime where the error imbalance − + 9 is large. Similar error correction protocols with a larger logical storage space would enable the correction of more types errors.
Using the model described above, we can quantitatively predict the performance of the protocol under different magnetic field conditions. To do so, we fit Equation 1 to the measured depolarization rates + and − (Supplementary Note 3) to estimate those rates as a function of the applied magnetic field 0 . For simplicity, we assume all other parameters in the model do not change with applied magnetic field. Figure 4 shows the calculated and measured improvement in readout fidelity from error correction, for different error-correction periods . In the low and high magnetic field regimes, the similarity between the depolarization rates + and − reduces the improvement from error correction as described above. The reduced improvement around 0 ≈ ESLAC is caused by the fast error rates caused by strong spin mixing. Excluding this regime near ESLAC , at moderate fields 0 ≈ 20 to 140 mT the estimated improvement can reach more than 1.5-fold for frequent error-correction.

Discussion
The improvements in readout fidelity achieved with repetitive readout (in the high-field regime) and error corrected repetitive readout (in the moderate-field regime) come at the cost of a longer readout time. Reaching the optimal readout fidelity in the high-field repetitive readout measurements (Fig. 2b) requires a 3.2 ms long measurement. The error-corrected protocol requires 30 μs per correction sequence, dominated by the RF pulse ring-down time, 20 μs, which could be reduced with improved engineering of the RF-signal delivery system. For long measurements such as 1 -or 2 -sensing schemes the longer readout length may not be prohibitive. Indeed, nanodiamondhosted NV centers have most widely been applied to relaxometry measurements that detect changes in the electronic-spin 1 , which can exceed 1 ms in nanodiamonds [37][38][39] . This suggests that practical nanodiamond-NV sensors could benefit from the readout enhancing techniques described here.
We emphasize that our error correction protocol reverses depolarization that is intrinsic to the physics of the NV center and is thus also applicable to NV centers in bulk diamond. The long 2 time (> 10 ms) accessible in bulk diamond NV centers means that error correction could improve the sensitivity of NV-based magnetometry measurements. In particular, the techniques described here enable high fidelity repetitive spin readout in the moderate magnetic-field regime, increasing the sensing range of the NV center. Lower magnetic field nuclear magnetic resonance (NMR) detection with NV centers could be used to study nanoscale chemical structures in the limit where Here, we overcome measurement backaction by using a simple error-correction code to protect longitudinal information stored in the 14 N memory from bit-flip errors. Such classical errorcorrection codes may prove useful to other quantum information protocols that rely on quantumaddressable classical memories. As a near-term example, recent quantum correlation spectroscopy 24,43 experiments on NV centers achieve high resolution measurement of nuclear magnetic resonance signals by storing classical information in the 14 N nuclear spin state for long correlation waiting periods. However, to prevent the NV electronic spin from dephasing target spins during the waiting period, the NV must be optically pumped, which reduces the 14 N classical storage time. The error-correction protocol described here could be used to extend the classical storage time, and hence improve spectral resolution of these measurements.

Methods
We used a homebuilt confocal microscope (NA = 0.9 Nikon air objective) with galvanometer mirror scanning to isolate individual nanodiamond-hosted NV centers. A 532 nm laser was This inductor was fabricated by electron beam deposition of 2 nm of titanium and 200 nm of gold through a steel shadow mask, followed by electrodeposition of silver and a protective layer of gold to a total thickness of roughly 3 μm on a 500 μm thick intrinsic silicon substrate mounted on an aluminum heatsink. This system enables us to apply π rotations of the NV electronic spin in less than transitions are driven with 399 ns π-pulses to minimize the probability to drive nearest neighbor transitions.
We note that in our implementation of the repetitive readout protocol, the NV electronic spin is sometimes left in the |−1⟩ e state after the CNOT gate, which inverts the usual relationship between the fluorescence signal and the initial electronic-spin state that is being readout. However, this has a small effect on our overall measurement because the electronic spin repolarizes after only a few readout cycles.
The nanodiamonds were purchased from Nabond Technologies Co. and dispersed in a solution of 10 mg of nanodiamond powder to 25 mL of ethanol via sonication. This solution was deposited on the sample using an Omron U22 nebulizer. This method produces a well dispersed distribution of nanodiamond locations and allows individual addressing by the confocal microscope.
Previous work has shown these nanodiamonds have a typical diameter of (23 ± 7) nm 22 .
Approximately 1% of the NV centers detected with our confocal microscope show the coherence required to resolve the hyperfine coupling in ODMR measurements ( 2 * ≳ 1 μs).
The static magnetic field was created by a large axially magnetized (Ø 5 X 4) cm neodymium permanent magnet mounted on a two-axis rotation mount, centered on the sample. This setup can produce fields up to 0.25 T limited by the size of the sample heatsink, which prevents the magnet from being placed closer to the sample. Magnetic field alignment was performed by using ODMR measurements to monitor the diagnostic parameter MWA ± MWB , which displays an extremum as a function of magnetic field orientation when the field is aligned. The + (−) condition is chosen for magnetic fields below (above) the ground-state anti-crossing. Based on our calibration, we estimate that using this method we can reduce the off-axis component of the magnetic field to less than 50 μT.