Quantum error correction of spin quantum memories in diamond under a zero magnetic field

Fault-tolerant quantum memory plays a key role in interfacing quantum computers with quantum networks to construct quantum computer networks. Manipulation of spin quantum memory generally requires a magnetic field, which hinders the integration with superconducting qubits. Completely zero-field operation is desirable for scaling up a quantum computer based on superconducting qubits. Here we demonstrate quantum error correction to protect the nuclear spin of the nitrogen as a quantum memory in a diamond nitrogen-vacancy center with two nuclear spins of the surrounding carbon isotopes under a zero magnetic field. The quantum error correction makes quantum memory resilient against operational or environmental errors without the need for magnetic fields and opens a way toward distributed quantum computation and a quantum internet with memory-based quantum interfaces or quantum repeaters. The efficacy of quantum error correction of spins in a diamond nitrogen-vacancy that uses magnetic fields depends on spin’s location in the lattice. Here, an alternative, zero-field approach relying on geometric phase is demonstrated in a three-qubit system.

N uclear spins around a nitrogen-vacancy (NV) center 1-3 in diamond (Fig. 1a) have long coherence times: over 10 seconds for nitrogen and carbon nuclear spins 4,5 and 1.9 min for carbon nuclear spin pairs 6 . Thus, such spins are promising as quantum memories for quantum repeaters 7 and quantum computers 8 . However, changes in magnetic fields such as external noise fields or hyperfine fields by the electron spin due to optical excitation cause either a bit-flip or phase-flip error. To avoid such errors, various kinds of quantum error correction (QEC) 9 have been demonstrated [10][11][12] . Waldherr et al. 10 demonstrated QEC with nitrogen and two carbon nuclear spins, Taminiau et al. demonstrated QEC with an NV electron and two carbon nuclear spins 11 , and Cramer et al. demonstrated a stabilizer code with three carbon isotopes 12 . However, these demonstrations were carried out under relatively strong magnetic fields such as 6200 Gauss with individual error corrections 10 or 403 Gauss with repetitive error corrections based on dynamical decoupling 11,12 . Under the magnetic fields, an increase in the fidelity of the controlled-phase (C-Z) gate by increasing the external magnetic field strongly depends on the carbon position relative to the NV center unless the field is well aligned to the hyperfine field (see discussion section and Supplementary Note 1) (Fig. 1b, c). In contrast, the fidelity can be increased independent of the carbon position under a zero magnetic field, where the hyperfine field uniquely defines the quantization axis, which allows time-reversal operation in any timing, resulting in high fidelity single nuclear spin manipulation conditioned by the NV electron, as discussed later. The application of an external magnetic field also limits the integration with other physical qubits. For example, superconducting qubits, which we believe are the most promising candidates for quantum computers, become unstable by the application of a magnetic field due to the penetration of magnetic flux into the superconductor or the Josephson junction. The accessible magnetic field is~100 Gauss even in the plane of the superconducting loop 13-17 unless using exotic junctions such as semiconductor nanowires. Although a flux qubit relies on applying external magnetic fields, it is usually <1 Gauss to introduce a half flux in the loop to stabilize the qubit, and the application of higher magnetic fields beyond a half-flux field reduces the supercurrent in the junction 18 . A zero magnetic field is also advantageous for qubit integration because a spatially uniform magnetic field can be easily obtained compared to individually tuned magnetic fields. A flux qubit working under a completely zero magnetic field with a ferromagnetic π-shifted Josephson junction, which does not require any precise tuning of the flux in a qubit loop by individual coil currents, is under development toward large-scale integration of quantum computers with flexible layout 19,20 . To further extend the scale of quantum computers in size and that of quantum communications 21 in distance, it is desirable to use spins in diamond, which serve as quantum interfaces [22][23][24][25] with long-time memory and excellent optical accessibility for connecting Fig. 1 Carbon spin manipulation with and without magnetic field. a Schematic structure of a nitrogen-vacancy center in diamond, where carbon (C) adjacent to a vacancy (e) is replaced by impurity nitrogen (N), whose spin error is protected by two carbon isotope spins serving as ancilla qubits for quantum error correction. The green-colored 13 C atoms' placement is just an artistic choice. b Quantization axis of carbon nuclear spins, which is determined by the hyperfine field by the electron spin as well as the external magnetic field if applied. c Simulated Rabi frequency dependence of the fidelity (F) of the holonomic controlled-phase gate based on the geometric phase between two carbon nuclear spins ( 13 C 1 , 1.14 MHz; 13 C 2 , 0.33 MHz) under a zero magnetic field (blue line), 100 Gauss (green line), 1000 gauss (red line), and 10000 Gauss (orange line). The angle between the external and hyperfine magnetic fields is set at 45 degrees for both carbon nuclear spins. Under a magnetic field, the fidelity is limited by the influence of the two quantum axes, but under a zero magnetic field, the fidelity improves by decreasing the Rabi frequency. The nitrogen nuclear spin is not considered here because the quantization axis does not change with the presence of a magnetic field. d Energy level diagram of the relevant spin system containing one nitrogen and two carbon isotopes together with an optically detected magnetic resonance spectrum relating to the |0⟩ s −|±1⟩ s transition. PL denotes photoluminescence. D 0 ¼ 2:877 MHz is the zero-field splitting. Hyperfine splittings are observed ( 14 N,2.2 MHz; 13 C 1 ,1.14 MHz; 13 C 2 ,0.33 MHz). The energy levels inside the blue rectangles are used in this study. quantum computers to optical quantum networks 26 . Li et al. 27 recently demonstrated coherent coupling of a single NV center spin to a superconducting flux qubit via a nanomechanical resonator and Scarlino et al. demonstrated coherent coupling of a semiconductor double quantum dot charge qubit to a superconducting transmon qubit via a microwave photon 28 , which also operate under a zero magnetic field. Furthermore, it is essential to provide error tolerance not only to the NISQ (noisy intermediatescale quantum) 29 based on stabilizer codes such as surface codes [30][31][32][33][34][35] but also to the quantum interface, which should also work under a zero magnetic field for stable and reliable operations with flexible layout. In this report, we first demonstrate the quantum operation of the electron and nuclear spins and their correlated operations based on the geometric phase in the absence of a magnetic field. We then demonstrate the most fundamental three-qubit QEC 36 for either a bit-flip or phase-flip error using three nuclear spins on nitrogen and two carbon isotopes in the vicinity of an NV center.

Results
Physical system. The ground state electrons in a negatively charged NV center constitute a spin-1 triplet system represented by m s = 0, ±1, and form a V-type three-level system under a zero magnetic field. The degenerate m s = ±1 levels are used as a processor qubit (this is called a geometric qubit [37][38][39][40][41][42][43][44][45] ) and m s = 0 as an ancilla. Although a degenerate qubit based on m s = ±1 cannot be manipulated by a microwave field, it can be manipulated by a polarized microwave field via the ancilla state m s = 0 43 . A nuclear spin of nitrogen impurity, which is a component of the NV center, also constitutes a spin-1 system, where the m I = ± 1 levels are degenerate, as is the electron spin under a zero magnetic field. The m I = 0, −1 levels are used as a memory qubit represented by |0⟩ (m I = 0) and |1⟩ (m I = −1) in this demonstration. Carbon isotopes ( 13 C) with a spin-half nuclear spin are quantized along the hyperfine field by the electron spin to form eigenstates represented by |0⟩ ðm I ¼ À1=2Þ and |1⟩ ðm I ¼ 1=2Þ. We use two carbon nuclear spins coupled to the processor electron spin as auxiliary memory qubits. All nuclear spins can be individually manipulated with the help of hyperfine interactions with the electron spin, as indicated by the ODMR (optically detected magnetic resonance) measurement (Fig. 1d).
Entanglement generation of three qubits. We first evaluate the microwave intensity and the angle between microwaves irradiating through two crossed wires placed on the sample to perform universal quantum operations of a degenerate twolevel subsystem of spin-1 triplet electrons called a geometric qubit 43 . During nuclear spin manipulation, we set the electron spin state into |+1⟩ S by using a microwave with a right-circular polarization, which eases individual manipulation of the nitrogen and carbon nuclear spins. Figure 1c shows that the fidelity is increased by decreasing the Rabi frequency, although it is limited in practice since the manipulation time cannot exceed T 2 *. In this demonstration, however, we obtained higher fidelity by extending the manipulation time to the effective T 2 * induced by weakly coupled carbons with hyperfine couplings below 0.1 MHz by using the GRAPE (gradient ascent pulse engineering)-optimized waveform 46 considering two strongly coupled carbons. Figure 2a shows the quantum circuit that generates entanglement between three nuclear spins (one nitrogen and two carbons) known as the GHZ state 1 ffiffi 2 p ðj000i N;C 1 ;C 2 þ j111i N;C 1 ;C 2 Þ. The necessary operational elements for the demonstration are state initialization, universal quantum gate, and state measurement of nuclear spins. The three nuclear spins are first initialized into j000i N;C 1 ;C 2 (see Supplementary Note 2). Carbon nuclear spins are initialized by probabilistic projection by conditional electron rotation (so-called measurement-based initialization) with a high fidelity of more than 99%. On the other hand, the nitrogen nuclear spin is deterministically initialized with about 95% fidelity since the measurement-based initialization allows only about 90% fidelity (see Supplementary Note 3, 4) due to the depolarization during the optical excitation for the electron spin measurement. The Hadamard gate, which makes a superposition of the basis states, of the nuclear spins is implemented by applying a π/2 pulse of a radio wave that resonates with the hyperfine splitting of the corresponding carbon nuclear spin (Fig. 2b). The correlated operation between the three nuclear spins is implemented by applying the holonomic C-Z gate based on the geometric phase 43,[47][48][49] with the help of the electron spin because the direct interaction between nuclear spins is too weak. This is achieved by a 2π rotation in the Bloch sphere spanned by |+1⟩ S and |0⟩ S of the electron spin conditioned by the nuclear spin state, adding a π phase only for j110i N;C 1 ;C 2 and j101i N;C 1 ;C 2 (e.g., ðj110i N;C 1 ;C 2 ! Àj110i N;C 1 ;C 2 Þ (Fig. 2c). Finally, after the generation of the GHZ state, the joint states of the three nuclear spins are measured by a single-shot measurement (Fig. 2d), confirming the classical correlation of entanglement with 78% fidelity. Although the quantum correlation is not measured since the measurement time is unrealistic, it should have about the same fidelity as the classical correlation since we confirmed that the two-spin entangled state has about the same fidelity as the classically correlated state (see Supplementary Note 6). The probability of j111i N;C 1 ;C 2 is smaller than that of j000i N;C 1 ;C 2 because the nitrogen nuclear spin is likely depolarized into |0⟩ N during the optical excitation to read out the electron spin state.
Quantum error correction. The QEC codes implemented in this demonstration are fundamental building blocks of Shor's QEC code 36 . Although complete QEC is achieved by a nine-qubit code, we demonstrate a three-qubit code that can correct either a bitflip error (Fig. 3a) or a phase-flip error (Fig. 3b), which are otherwise identical except for the Hadamard gates inserted immediately after encoding and before decoding. In this experiment, the error that occurs on the nitrogen nuclear spin is protected by two carbon nuclear spins. Although an error occurring on any single qubit after encoding is corrected, errors occurring on multiple qubits cannot be corrected. Figure 3 shows whether the bit-flip and phase-flip errors can be corrected by intentionally inserting an error in the encoded nitrogen nuclear spin. The carbon nuclear spins are prepared into j00i C 1 ;C 2 and the nitrogen nuclear spin is prepared into one of |ψ⟩ = |0⟩, |1⟩, |+⟩, |−⟩, |+i⟩, |−i⟩. The encoding and decoding are configured with the same gates as the three-qubit entanglement shown in Fig. 2. The quantum Toffoli gate for the QEC is also configured with the combination of Hadamard gates and the holonomic C-Z gate that adds the π phase only for j111i N;C 1 ;C 2 . Quantum tomography measurements on the nitrogen nuclear spin state after the QEC showed that the state fidelities against bit-flip and phase-flip errors are, respectively, 75.4% and 74.6% on average (see Supplementary Note 5) (Fig. 3c, d).

Discussion
To evaluate the usefulness of the QEC, we measure the state fidelity of the nitrogen nuclear spin when the probability of a single intentionally generated error is varied, both with and without the QEC (Fig. 4a). The initial state of the nitrogen nuclear spin is fixed at |+⟩ N , and only the nitrogen nuclear spin is subjected to phase errors. Without QEC, the fidelity degrades in proportion to the error probability. The 10% deviation from the ideally obtained fidelities with error probabilities of both 0 and 1 should be due to state preparation and measurement (SPAM) errors. On the other hand, with QEC, the fidelity is constant regardless of the error probability. Although the fidelity is inferior to that without QEC due to operational errors for an error probability below 0.15, it exceeds that without QEC as expected for an error probability over 0. 15. The operational error should be caused mainly by environmental carbons whose hyperfine couplings are smaller than 0.1 MHz, which cannot be distinguished by ODMR measurement (Fig. 1d). Figure 4b shows the dependence of the fidelity of the encoding (decoding) operation on the hyperfine coupling in the presence of another carbon in addition to the two carbons used in the experiment. From the results of the experiment such as ODMR measurement and Rabi oscillation (see Supplementary Note 7), the hyperfine coupling is estimated to be in the range of 0.06-0.12, resulting in fidelity degradation of~10% in addition to a SPAM error of 10%. The fidelity can be improved by initializing undetected carbons using dynamical decoupling with radio frequency (DDRF) 5,50,51 . Even higher fidelity can be obtained by optimizing the waveform of the microwaves to be robust against unknown hyperfine coupling in a specific range.
Finally, we compare our results with previous related experiments [10][11][12] . The most relevant experiment was given by Waldherr et al. 10 , which demonstrated QEC with nitrogen and two carbon nuclear spins as in our demonstration but at 6200 Gauss. The situation in Fig. 4a in our demonstration exactly corresponds to that in Fig. 3b in ref. 10 , and the obtained fidelities are about the same within error bars. This means that we successfully excluded magnetic fields to achieve the same level of QEC without the necessity of a precise field alignment along the NV axis. Other relevant experiments were given by Taminiau et al. 10 , which demonstrated QEC with an NV electron and two carbon nuclear spins, and Cramer et al. 12 , which demonstrated stabilizer code with three carbon isotopes, both with dynamical decoupling schemes at 403 Gauss. Although these experiments cannot be directly compared with our experiments since they protect different spins from ours, their fidelities are relatively lower than ours possibly because the carbon isotopes used in their experiments were not properly oriented along the external magnetic field. It is shown in Fig. 2a in Methods of ref. 10 that usable carbon isotopes are limited to around six at 403 Gauss and to~9 at 10 T with hyperfine of over 20 kHz 11,52 . To overcome this limitation, Bradley et al. 5 developed a more elaborate DDRF method 5,50,51 . Although this method enables the detection of carbon isotope spins with a weak or negligible perpendicular hyperfine component as shown in Fig. S3 in this reference, the angle between the external and hyperfine fields must be within around 10 −2 (0.6 degrees) to achieve infidelity of 10 −4 at 403 Gauss 5 , which is still consistent with our simulation shown in Fig.1c and Fig. 1 in SI. On the other hand, although we can only manipulate strongly coupled carbons due to the limitation from T 2 * in the current scheme, we can also manipulate weakly coupled carbons limited by T 2 instead of T 2 *. The combination of robust dynamical decoupling in three-level systems under low magnetic fields developed by Vetter et al. 53 and nuclear spin manipulation with radiofrequency synchronized with the decoupling developed by Bradley et al. 5 , enables the implementation of two-qubit gates between an electron and a weakly coupled carbon under a zero magnetic field. With the increase in Fig. 2 Three-qubit entanglement generation. a Quantum circuit for entanglement generation between three nuclear spins, one nitrogen, and two carbon isotopes. This is equivalent to the quantum circuit of encoding in three-qubit quantum error correction in Fig. 3. H, X, and Y, respectively, denote Hadamard, Pauli-X, and Pauli-Y gates. b Pulse sequence in the experiment. Nuclear spin manipulation is performed by radiofrequency (RF), and the geometric phase manipulation between the electron (e), nitrogen (N), and carbon (C) is performed by microwaves (MW) using the GRAPE algorithm. RO, Init, E y , and A 1 , respectively, denote readout, initialize and two orbital excited states. c Conceptual diagram of the holonomic controlled-phase gate in the encoding. The π phase is given to j110i N;C 1 ;C 2 and j101i N;C 1 ;C 2 . D 0 is the zero-field splitting and HF N is the hyperfine (HF) splitting between the electron and the nitrogen. d Classical evaluation of the GHZ entanglement generation for three qubits. Correlations are confirmed by measuring the z axis for all nitrogen and carbon nuclear spins. Since the quantum correlation of three qubits can be measured with the same technique as the quantum correlation of two qubits, it was not measured in consideration of the experimental time.
operatable carbon isotopes, we expect to realize Shor's nine-qubit QEC code even under a zero magnetic field.
In conclusion, we demonstrated a three-qubit QEC against either a bit-flip or phase-flip error by introducing the holonomic C-Z gate of three nuclear spins around an NV center in diamond under a zero magnetic field. This demonstration is applicable to the construction of a large-scale distributed quantum computer and a long-haul quantum communication network by connecting quantum systems vulnerable to a magnetic field, such as superconducting qubits with spin-based quantum memories. Because of the manipulation error in addition to the state preparation and measurement error, the fidelity without QEC is higher for p < 0.15, while the fidelity with QEC is higher for p > 0.15. Error bars are defined as the standard deviation of the photon shot noise. b Estimated fidelity degradation of quantum encoding (decoding) operations as a function of the hyperfine coupling with another carbon that cannot be detected by optically detected magnetic resonance. The holonomic controlled-phase (C-Z) gate with the GRAPE-optimized pulse in the coding (decoding) operation is applied to a certain state, and the operational fidelity is simulated by the trace inner product between the generated state and the ideal state. Since the holonomic C-Z gate is optimized in the Hamiltonian with two carbons ( 13 C 1 , 1.14 MHz; 13 C 2 , 0.33 MHz), the presence of the third carbon degrades the operational fidelity. N init. state N init. state

Methods
We use a single naturally occurring NV center in a high-purity type IIa chemicalvapor deposition-grown diamond with crystal orientation of <100> produced by Element Six. The diamond is cooled to 5 K to prolong the electron spin coherence. To achieve a zero magnetic field, the residual magnetic field including the geomagnetic field is canceled out by a three-dimensional coil. The currents of the three coils are adjusted by monitoring the spin-echo coherence time, which reaches its maximum at a zero magnetic field. Two orthogonal copper wires are attached to the sample surface to apply microwaves with arbitrary polarization. The optical system consists of a homemade confocal microscope system. A green laser (515 nm) is used for charge and electron spin initialization by nonresonant excitation, and two red lasers (637 nm) are used for further electron spin initialization with the |A 1 ⟩ state and spin measurement using the |E y ⟩ state by resonant excitation.

Data availability
Data are available from the corresponding authors upon reasonable request.

Code availability
All codes used to produce the findings of this study are available from the corresponding author upon request.