Harnessing the power of quantum systems based on spin magnetic resonance: from ensembles to single spins

Abstract Quantum computation provides great speedup over its classical counterpart for certain tasks. Spin system is one of the most important candidates to realize quantum computations. The initialization, readout and quantum gate operations of spin-qubits can be accomplished by advanced spin resonance techniques, which include nuclear magnetic resonance, electron paramagnetic resonance and optically detected magnetic resonance. This review aims to summarize recent experimental progresses in spin-based quantum computing. Preserving quantum states, precise quantum operations, quantum algorithms and quantum simulations on spin systems are reviewed. The fast improvement of quantum technology motivated by quantum computations results in recent progress in spin magnetic resonance in nanoscale. This review also introduces the achievements in nanoscale magnetic resonance with Nitrogen vacancy centers in diamonds. Graphical Abstract


Introduction
Quantum computations promise exponential speedup of certain calculations with the help of quantum parallelism [1]. To achieve the practical quantum computations, there are a vast range of physical systems proposed as candidates [2], which include photons, trapped ions, nuclear spins in liquids, atoms in optical lattices, single molecular magnets, superconducting circuits and electron spins in solids, such as phosphorus doped in silicon and nitrogen-vacancy centers in diamonds. Here we review recent significant progresses of quantum computations based on spin systems, which employ the electron and nuclear spins as spin-qubits. Once immersed in a external magnetic field, spin-qubits can be identified through their Larmor frequencies. Radio-frequency (RF) and microwave (MW) pulses are applied to manipulate the evolution of the spinqubits. Advanced pulse technologies developed in nuclear magnetic resonance (NMR) and electron paramagnetic resonance (EPR) have been applied on spinqubits to preserve quantum states and to realize high-fidelity quantum gates. Electron spin-qubits can be controlled to realize fast quantum gates, while nuclear spin-qubits can serve as good quantum memories due to their long coherence times. Quantum state tomography (quantum process tomography) provides full information about the quantum states (gates). Based on these progress, quantum algorithms and quantum simulations have been successfully demonstrated in spin systems.
The review is organized as follows. In Section 2, we introduce recent progress in quantum computations on the nuclear spin in liquids. Quantum algorithms are realized, including prime factoring, machine learning, solving linear equation and solving ground state problems. We also discuss results of quantum simulations with bulk nuclear spins. In Section 3, we focus on hybrid electronnuclear spin systems. One of the main obstacles toward practical quantum computations is the decoherence effect. We developed dynamical decoupling (DD) techniques to overcome this effect. Not only coherence of single spinqubits but also entanglement of multiple qubits can be preserved by DD. We also demonstrate the high-fidelity quantum gates in the presence of external noises. Experimental quantum error correction (QEC) and quantum algorithms are realized in these hybrid electron-nuclear spin systems. In Section 4, we survey the recent results of nanoscale magnetic resonance based on Nitrogen vacancy (NV) centers in diamonds. We also discuss the potential application of this technology in biology.

Quantum computations based on nuclear spin systems
As a potential and promising computing style in the future, quantum computing has attracted tremendous attention from both theorists and experimentalists in the past two decades [1,2]. However, to date there is still no exceptionally appropriate physical candidate or even widely accepted underlying computation model, due to the gigantic obstacles on the road leading to quantum computers in practice. As these obstacles, for instance, individual control ability or decoherence effect, are prohibited to be circumvented by regular means or current technologies, the enthusiasm in building large-scale quantum computers is slightly tempered at present. Nevertheless, there are still numerous reachable and practical short-term goals to accomplish, such as quantum simulation tasks which are able to outperform the classical counterpart with reasonable sources, or accurate control techniques in multiple-qubit systems which serve as basic blocks in future quantum computers.
NMR, a traditional system for spectroscopy study, becomes one of the most successful architectures for the new-rising quantum computing since 1997 [3,4]. It utilizes bulk nuclear spins in molecules placed in around 10 T magnetic environment, meaning that the Larmor frequencies for these spins are in the magnitude of a few hundred MHz. Hence, the control of these spins merely demands RF pulses, whose technique is well-developed and more accurate compared to the microwave engineering. As a result, the advanced techniques in pulse optimizations and circuit simplifications [5] make NMR the largest test-bed with the universal control on the largest number of qubits [6], as well as several ideas originating from NMR have been exported to other systems. Therefore, in spite of the difficulty in initialization and scalability, NMR remains indispensable in quantum computation, and it is helpful to review the aspect of NMR quantum computing when talking about the power of spin magnetic resonance.
The structure of this section is organized as follows: we firstly introduce the basics of NMR quantum computing by describing how NMR satisfies the requirements of a quantum computer, and show some useful techniques which also aids other quantum systems; we then review recent experiments in realizing quantum algorithms in NMR, including the factoring algorithm, searching algorithm, and machine learning algorithm; finally, we present the experimental progress using NMR quantum simulators, which are designed for particular purposes such as the problems in quantum chemistry and condensed matter physics.

NMR basics and technologies
To judge whether a physical system is appropriate or not to serve as a quantum computer, DiVincenzo has proposed five well-accepted criteria [7]. Simply speaking, a physical system should be capable in all the five following aspects: well-defined qubits, initialization, universal set of quantum gates, measurement, and long coherence time. NMR satisfies all the above requirements completely or partially, which will be interpreted one by one in the following.

Well-defined qubits
A two-level quantum system can be encoded as a qubit, where the two energy levels are usually labeled as |0 and |1 , forming the +1 and −1 eigenstates of σ z , respectively. In NMR, a spin-1/2 particle placed in a z-direction magnetic field will have a spin-up component | ↑ and spin-down component | ↓ due to the Zeeman splitting, which naturally forms a qubit. The 1 H, 13 C and 19 F nuclei are the most common spin-1/2 particles in conventional NMR, and are thus used in vast majority of NMR quantum information processing (QIP) experiments. Explicitly, the internal Hamiltonian of the nucleus in a B 0 magnetic field is where is set to be 1, δ is the chemical shift due to the partial shielding of B 0 , and I z = σ z /2 is the angular momentum operator. For a heteronuclear system, spins can be distinguished straightforwardly as they have distinct γ and thus very different (hundreds of MHz) Larmor precession frequency ω 0 = (1 − δ)γ B 0 . For a homonuclear system, spins experience different chemical environments and thus can be addressed by the distinct δ. This chemical shift difference is usually ranging from tens of Hz to a few KHz. Beyond the addressability, the spins can talk to each other via the couplings. In liquid-state NMR, which is a good testbed for QIP, the dipolar couplings are averaged out due to rapid tumbling, leaving only J-couplings which range from a few Hz to hundreds of Hz. Under the weak coupling approximation of ω ij 0 2π |J ij |, which always holds for heteronuclear spins and moderately distinct homonuclear spins, this J-coupling interaction terms is simply H J = 2π J ij I i z I j z , which only shifts the energy levels of the systems but does not change the eigenstate forms.
In total, the NMR internal Hamiltonian for an n-spin system consists of H 0 and H J is Generally, the H 0 term determines the addressability of the system and the H J term enables the implementation of controlled-NOT (CNOT) gates as will be discussed later. The Hamiltonian in Equation (2) defines most of the liquid-state NMR experiments in QIP. In this section, we will only consider this simple form unless otherwise specified.

Initialization
The QIP tasks often requires some desired quantum operations applied on a fixed initial state, for example, the pure state |00... . Initialization is such a process to create the system from the thermal equilibrium to |00... . In NMR, the Boltzmann distribution indicates that to achieve such a pure state requires extremely low temperature ∼mK at around 10 T magnetic field which is usually equipped by a commercial spectrometer. Obviously, the extremely low temperature condition is impractical to satisfy for a liquid-state NMR sample. To avoid these technical limitations, a pseudo-pure state (PPS) [3,4] approach at room temperature is proposed for the initialization purpose alternatively, instead of creating the truly pure state.
An n-qubit PPS is where I is the identity matrix and ∼ 10 −5 is the polarization at room temperature. Basically, the PPS is still a highly mixed state for the sake of the large identity part, but it behaves almost the same as a real pure state |00... because the identity neither evolves under unital operations nor is observable in NMR detection. The only exception is T 1 process, which brings the system from the current state back to thermal equilibrium state and is not a unital channel. However, it is usually much less dominant than T 2 process which causes loss of coherence in NMR, as being discussed later.
There are a few ways to prepare the PPS from the thermal equilibrium state, where all of them involve nonunitary transformations, such as classical addition in temporal averaging [8], gradient field in spatial averaging [3], and phase cycling in cat-state method [9]. However, none of them is efficient in scalability due to exponential signal loss, which prevents NMR quantum computers scaling to large sizes. It is worthy mentioning that a recent method utilizing the relaxation process and nuclear Overhauser effect can achieve the PPS with improving the signal strength by reasonable amount [10], but it still lacks of scalability. A promising solution to this problem is to extend the liquid state NMR to solid state NMR or EPR, as discussed in Section 3.

Universal gate set
It is proved that any unitary operation can be decomposed into a finite set of elementary gates with arbitrary accuracy [1]. Particularly, in NMR it is able to realize arbitrary single-qubit rotations along the x and y axis and the CNOT gates, which form a universal set of quantum gates. The realization of singlequbit rotations relies on the external Hamiltonian of the RF pulse in the x − y plane, which can be described as where B 1 is the amplitude of the pulse, ω rf is the frequency, t is the time, and φ is the phase. In a single-spin or heteronuclear system, we can always set ω rf the same as the Larmor frequency of that spin and consider the spin dynamics in the rotating frame instead of the lab frame. It is convenient to use the rotating frame in NMR QIP as the spin does not process along z axis. If we apply a sufficiently strong RF pulse or so-called hard pulse which is much larger than the J-coupling terms, both of the two terms in the internal Hamiltonian in Equation (2) will vanish. So the unitary propagator of the single-spin or heteronuclear system is dominated by the external Hamiltonian, with the form in the rotating frame By choosing appropriate B 1 , φ and t, one can design a pulse to implement arbitrary angles along arbitrary axis in the x−y plane. For the control of a homonuclear system with multiple spins, the hard pulse is not enough as it controls spins globally. To achieve individual controls, one can use a so-called soft pulse which has longer duration and smaller amplitude. They are usually discretized into tens to hundreds of segments in regular Gaussian or Hermitian shapes, and in each segment the amplitude B 1 remains a constant. The long soft pulses have much better selectivity in the frequency domain, which in principle can excite the desired spin without affecting the others much. However, as the soft pulse is long, the internal Hamiltonian evolution in Equation (2) cannot be neglected and the relaxation effect becomes more dominant. To solve the first issue, the unwanted chemical shift evolutions and Bloch-Siegert shift can be tracked and corrected via some pulse compiling program [11,12], while the J-coupling evolutions can be suppressed by designing self-refocused soft pulses. In contrast, the second problem is the primary drawback of implementing abundant soft pulses because the relaxation time scales are difficult to be extended drastically.
To realize a two-body quantum gates in NMR, one has to make use of the interaction terms, i.e. the J-couplings. Consider the simplest scenario that in a 2-qubit homonuclear system, the internal Hamiltonian only contains the Jcoupling term via setting the double-rotating frame to remove the chemical shift terms. A concatenation of three operations exactly implements a controlled-phase gate -the second qubit gains a phase when the first qubit is in |1 , and does nothing if the first qubit is in |0 . Based on the controlled-phase gate, the NMR circuit to realize the CNOT gate is further designed as (pulse applied from right to left) In a large system, in order to implement a specific U(1/2J), we have to construct refocusing schemes to remove the unwanted chemical shift evolutions and other J-couplings. Typically, this refocusing purpose is accomplished via inserting a series of π pulses in appropriate positions during the free evolution, where the inserting positions can be determined from a Hadamard matrix with respect to the number of spins [13,14]. However, this refocusing approach is not scalable when increases the size of the system. An alternative way is to use the sequence compiler [11], which will track the errors of single-qubit rotations and unwanted couplings, and optimize the desired unitary operation into the implementable NMR sequence in a scalable way. Although any quantum circuit can be decomposed into a series of single-qubit rotations and CNOT gates, the decomposition procedure is often difficult in multi-qubit systems. Moreover, the direct decomposition of a complex quantum circuit is highly possible to involve numerous elementary gates, leading to severe accumulation of errors. A remarkable progress in NMR QIP to tackle the above problem is the development of GRadient Ascent Pulse Engineering (GRAPE) technique [15] -a method to obtain pulses with ultra-high precision inspired by the optimal control theory. To date, GRAPE technique is not only playing an important role in NMR experiments including conventional NMR spectroscopy, but also exported successfully to other platforms such as electron spin resonance (ESR), NV centers and superconducting circuits.
The GRAPE pulses can roughly be divided into two categories: state-to-state GRAPE pulses and universal GRAPE pulses. The state-to-state GRAPE pulse is designed for a specific purpose, that it can engineer the quantum system from a given input state to a desired output state, but does not care about the form of the propagator. The universal GRAPE pulse is to calculate a pulse which can realize a given quantum gate universally which can be applied to any input or output state. Obviously, a universal GRAPE pulse is more functional, but in most cases the computation process is more difficult compared to the state-tostate GRAPE pulse which only aims to a specific quantum state. In the following, we just describe the idea of universal GRAPE pulses, and the idea of state-to-state GRAPE pulse can be developed analogously.
Given the theoretical unitary operation U th for n qubits, a universal GRAPE algorithm attempts to find a shaped NMR pulse with the unitary operator U exp , so that the fidelity of U th and U exp defined by is higher than the preset value. This GRAPE pulse is discretized into N segments, and in each segment the RF field remains unchanged. For convenience, let us consider a homonuclear system in the rotating frame with the reference frequency ω rf . For the mth segment of the GRAPE pulse, the external Hamiltonian in Equation (4) where t is the length of each segment. Hence, the total unitary U exp = U M U M−1 · · · U 1 . The optimization process starts with a random or given group of B x and B y as the initial guess. The fidelity F is calculated and the next B m x and B m y are changed through where L is a tunable parameter to determine the moving distance of the gradient. This alteration of B x and B y is repeated iteratively, until F reaches the preset fidelity, which means a high-fidelity GRAPE pulse is obtained to implement U th . The GRAPE pulse can further be designed to be robust to the RF inhomogeneities and internal Hamiltonian inhomogeneities [11], i.e. when B 1 and B 0 field are not constants along the NMR sample, the GRAPE pulse can still mimic the target unitary precisely. Moreover, the shape of the GRAPE pulse can be modulated to be friendly to the spectrometer. For instance, the amplitude of the pulse can be varied smoothly without critical jumps, and the beginning and end of the pulse can be fixed at zero amplitude.
The major drawback of the GRAPE algorithm is the efficiency. It requires a lot of matrix multiplications during the optimization process, which is intractable by a classical computer when the system size goes relatively large. A possible solution is to separate the entire system into many small subsystems, and calculate the pulse based on the subsystems correspondingly [11]. The performance of this subsystem approach is better when the NMR sample is easy to separate in geometry, i.e. the interactions between subsystems are not large, otherwise one still needs to consider the interactions between subsystems whose complexity are similar to that of a full system GRAPE.
Another drawback of GRAPE is the potential discrepancies between the experimental and ideal pulses when they are applied in practice. Actually for any type of pulses they have such problems, but GRAPE pulses are generally more sensitive to the nonlinearity of the spectrometer than the traditional soft pulses. The shape of a GRAPE pulse is random to some extent even when it is designed to be smooth, in particular compared to a regular soft pulse of Gaussian or Hermitian shape. Therefore, a GRAPE pulse suffers the nonlinearity much in general, especially when the pulse is long or the dimension is large. One suggested solution is to rectify the pulse using a feedback control [16][17][18], that is, trying the original pulse and measuring its performance in the lab, then going back and altering the original pulse correspondingly based on the measured performance. This rectification procedure can be repeated iteratively, until the measured pulse and the calculated GRAPE pulse have acceptable match.

Measurement
NMR is an ensemble system, indicating that NMR QIP is not able to provide projective measurements. By contrast, the measurement in NMR is based on an ensemble averaging result, that is, in each experiment one can obtain the expectation values of several observables (typically the Pauli operators for simplicity) via analyzing the spectrum. The apparatus to accomplish this measurement procedure is an RF coil, which is positioned in the vicinity of the sample and perpendicular to the B 0 (z-direction) field. This RF coil can detect the transversal magnetization of the ensemble system. The detected signal in time domain is then transformed to the frequency domain via Fourier transform, by which the NMR spectra come out. During the detection, the nuclei in the sample experience decoherence, which leads to a decay called free induction decay (FID) in the time domain. When FID is transformed to the signal in the frequency domain, the NMR peaks will be broadened according to the amount of decoherence. Generally speaking, this averaging measurement in NMR cannot provide some information required by quantum mechanics, so NMR is not a suitable testbed in verifying some quantum mechanical foundations. However, the bulk identical copies of spins indeed consume shorter time that using a single shot to extract the expectation values of desired observables. This advantage supports many quantum simulation tasks that require quantum state tomography, as we will discuss later.
It is straightforward to understand the NMR averaging measurements in the QIP point of view. A peak in the spectrum corresponds to an allowed transition between two energy levels of a spin. If this spin has couplings with other n spins, the single peak will be splitted into 2 n peaks, while each peak corresponds to the up or down states of the other n spins. For example, in a three-spin system with positive couplings, the peak located at the smallest frequency of spin a is generated due to the state of the other two spins being in |00 . Hence, the absorption and dispersion parts of this peak represent the operators respectively. Similarly, the other three peaks of spin a are related to the |01 , |10 , and |11 states of spins b and c, respectively. By measuring the amplitudes and phases of these four peaks of spin a, one can obtain all single-coherent terms of a, and so on for spins b and c. To read out other Pauli operators, it is sufficient to rotate them to the observable single-coherent terms through local pulses prior to this measurement stage. Therefore, full state tomography can be implemented in NMR QIP using the above way [19,20].

Decoherence
Finishing complicated QIP tasks within the decoherence time is a fundamental challenge for most quantum systems. A quantum system is so fragile as it interacts with the environment continuously and irreversibly. The decoherence mechanism is often described by the amplitude damping with time scale T 1 and phase damping with time scale T 2 . T 1 originates from spin-lattice interaction, which is the time scale to bring back the current state to thermal equilibrium state in NMR. In a well-prepared sample, T 1 can exceed 10 s, so that it is not the bottleneck of NMR QIP. T 2 originates from spin-spin interaction, which is the time scale to kill the coherence in the current state in NMR. In a good NMR sample, T 2 can be close to 1 s. Considering that the length of a CNOT gate in NMR is around tens of ms (≈ 1/2J), this T 2 time scale is also sufficient for a lot of operations.
The crucial relaxation parameter in NMR is T * 2 , which involves T 2 plus the inhomogeneity of the B 0 field. Typical T * 2 may be down to tens of ms, which is critical to the realization of QIP tasks. As B 0 inhomogeneity can be regarded as a classical distribution of internal Hamiltonians, one can optimize the GRAPE pulses to be robust to this internal Hamiltonian drift. Moreover, a RF selection technique [21] can be employed before the main body of the NMR sequence to prolong the T * 2 time, by selecting a small portion of the sample which feels much better homogeneous B 0 .

Quantum algorithms
Similar to classical algorithms which can solve problems via a step-by-step procedure on a classical computer, a quantum algorithm is also designed to solve some specific problem using a step-by-step procedure, but on a quantum computer [22]. Almost all quantum algorithms utilize the inherent quantum properties such as superposition and entanglement, among which the most famous ones are Shor's algorithm [23,24] for factorizing large numbers and Grover's algorithm [25] for searching a database.
NMR is a good testbed for these quantum algorithms due to its high controllability and long coherent time. In this Section, we will briefly review the recent progress of implementing quantum algorithm in NMR systems, including the factoring algorithms and searching algorithms.

Factoring algorithms
As perhaps the most famous application of quantum computing, Shor's factoring algorithm [23] is one main reason to arise the subsequent passion and investment in quantum computing worldwide. Before Shor's algorithm, the various modern cryptographic schemes which rely on the difficulty of finding prime factors of a large number [26], were thought to be absolutely safe due to the nonexistence of efficient algorithms on a classical computer. By contrast, Shor's algorithm provides an efficient way to solve this problem in a quantum manner which is exponentially faster than the classical counterpart, and risks the security of financial and military systems.
NMR is always one pioneer to demonstrate these factoring protocols, and three experiments are worthwhile to mention here. The first one is the factorization of 15, the simplest nontrivial example of this problem. Although simple, Shor's algorithm still requires seven qubits and numerous quantum gates, which used to be a daunting challenge in the early era of experimental quantum computation. NMR is the first platform to tackle this problem, that Vandersypen et al. [27] used a seven-qubit sample consisting of five 19 F and two 13 C spins and around 300 shaped pulses to demonstrate 15 = 3 × 5. This seems a small step toward Adapted from Ref. [30].
the goal of attacking financial institutions, but a big leap in terms of controlling multiple qubits experimentally. While Shor's algorithm is based on the circuit model of quantum computing, extending it to more complex demonstrations is incredibly hard with current techniques. An alternative model proposed by Farhi et al. [28] called adiabatic quantum computing is likely to provide a simpler tool, as only three qubits are required to factorize 21. The experiment [29] was done in a three-qubit NMR system with heteronuclear spins 19 F, 13 C and 1 H, and the total experimental time is merely ∼ 50 ms. In comparison, the previous experiment of factoring 15 takes about ∼ 720 ms which suffers more severe decoherence effect. However, the proof of the complexity of this adiabatic algorithm is still open.
As an natural extension of the work beyond factoring 21, the above adiabatic algorithm was applied to factor 143 later [30], as shown in Figure 1. The original protocol by Schaller and Schuützhold [31] was modified and improved to be implemented in a four-qubit liquid-crystal sample. In the adiabatic algorithm, since the correct solution is encoded as the ground state of a particular Hamiltonian, the spectrum of this Hamiltonian grows exponentially with the size of the number to be factored. In this work, Xu et al. [30] simplified the mathematical equations which governs the Hamiltonian and thus suppressed the exponential growth of the spectrum. It is even possible to factor a much large number using the same strategies [32], but the time complexity of the adiabatic algorithm is still to be explored.

Searching algorithms
Searching algorithms are probably the second major class of quantum algorithms behind factoring algorithms. Among them, Grover's algorithm [25] is the first and most impactful one that locates the unique input to an oracle which produces a particular output. Unlike Shor's factoring algorithm, Grover's algorithm provides only a quadratic speedup, and the probability of finding the right answer is less than one but can be improved by increasing the repetition times. Even though, when the searching database is fairly large, the speedup is Notes: It can be seen that the handwritings 6 and 9 have been successfully recognized by the quantum vector machine. Adapted from Ref. [45]. still considerable. The simplest case of Grover's algorithm was demonstrated in the early age by the homonuclear [33] and heteronuclear [20] NMR systems, which are followed by many implementations in more complex cases [34][35][36][37].
Besides Grover's algorithm, other searching algorithms were also experimentally demonstrated in NMR, such as the Bernstein-Vazirani algorithm [38,39] and quantum-walk searching algorithm [40], and Hogg's algorithm [41,42]. We direct readers who are interested in these algorithms and implementations to the references for details.

Machine learning algorithms
In the era of big data, machine learning is gaining more and more exposure to the public, especially when AlphaGo beats the 9-dan professional Lee Sedol without handicaps in a five-match Go game [43]. Although classical machine learning algorithms such as deep learning have already made remarkable progress and are impacting on our daily life, the huge computational resources required by classical machine learning are not easy to circumvent. Quantum machine learning [44], in principle, is able to be exponentially faster by utilizing quantum parallelism. In particular, a simple problem about handwriting recognition has been programmed in NMR [45].
In the four-qubit NMR quantum processor, the machine was firstly asked to learn the standard fonts of character 6 and 9. Then, a series of the handwritten images of character 6 or 9 are provided to the machine for recognition, i.e. to determine which character group it belongs to. As a prototype, the input is actually a preprocessed vector formed by the features of each image, not the true image itself. The recognition results from the machine is in Figure 2, in which the directions of the NMR peaks point out the learning result. This work exhibits a simple but interesting result, given that a quantum processor with capacity of 60-300 qubits is able to learn the entire classical information generated each year [46].

Quantum simulations
For the purpose of simulating the behaviour or dynamics of a quantum system, obviously a classical computer would be impractical when the size of the quantum system is large enough. The idea of quantum simulation is to use a quantum system to mimic the target system straightforwardly, perceived by Feynman in 1982 [47]. Note that a quantum computer is already a universal quantum simulator [48]. Nonetheless, due to the difficulty in building a quantum computer, researchers attempted to design some problem-specific quantum simulator to solve particular problems in an analog way. Moreover, it is proposed that by 30-100 qubits one can beat the classical computers in solving some quantum chemistry problems [49], which seems very promising and attracting for experimentalists.
In this Section, we will introduce how quantum simulation is applied to quantum chemistry and condensed matter physics in NMR systems. These applications cover only part of current experimental progress in quantum simulation, and we suggest readers refer to [50] for other applications and realizations in other systems.

Simulating quantum chemistry
Quantum chemistry aims to develop methods to calculate molecular energies and dynamics. Although involving the Born-Openheimer approximation that separates electronic and nuclear motions apart, the exact solution of the Schrödinger equation is still exponentially hard with the growing size of the molecule. Hence, it is intuitive to adopt the quantum simulation idea, as the molecule to be simulated is intrinsically quantum [51].
One possible application is simulating a molecular system and calculate its energies. Based on an iterative phase estimation algorithm, Aspuru-Guzik et al. [49] devised a protocol to solve this fundamental problem in computational quantum chemistry in a quantum manner. The first implementation occurred in a photonic system [53], but the ground state preparation step was lacking. Soon after, a full implementation of this protocol including all the algorithmic steps was executed in NMR [52]. As a proof-of-principle demonstration, the ground state energy of the molecular hydrogen was obtained to a 45-bit precision as shown in Figure 3. Scaling this protocol to larger molecules confronts two potential difficulties: the efficient decomposition of the evolution operator governed by the molecular Hamiltonian, and the complexity of adiabatic state preparation. The first issue was addressed in [53], and the second one was analyzed in a numerical way up to 128 qubits [54].
The molecular energies can be regarded as stationary molecular properties. Beyond that, quantum simulation can further be applied to molecular dynamical properties, that is, to simulate the chemical reaction dynamics. Proposed by Kassal et al. [55], the simulation of the molecular motions turns out more challenging. As an important role in understanding reaction mechanisms and in controlling the reactions, traditional calculations of chemical reactions is also approaching a bottleneck due to the limitation of classical computing. Quantum simulation indeed offers a promising way, but the physical implementation is of great challenge. The only experiment to date about simulating the chemical reaction dynamics was carried out in NMR [56], where a laser-driven isomerization model was considered. Despite a prototype, the experiment has involved thousands of gates in realizing the evolutions of the kinetic and potential energy operator. Thus, the GRAPE optimization [15] was utilized to achieve remarkable agreement between the predictions and experimental results.

Simulating condensed matter physics
Condensed matter physics contains a large set of problems that quantum simulation can tackle directly or indirectly. Some solid quantum computing candidates have already owned similar or adjustable Hamiltonian compared with the target problem to be simulated, so that they can be subtly designed to meet the requirements of the simulation procedure. For instance, the atoms in optical lattices has a similar Hamiltonian form to the Bose-Hubbard model [57], and so does the ion traps to the Dirac equation [58]. Different from these examples, the natural Hamiltonians in NMR are almost fixed, so the convenient way of simulating condensed matter physics in such systems is digital, which focuses on the realization of unitary operators with the given NMR Hamiltonian. In this Section, we will introduce some typical works which simulate important condensed matter physics problems using the NMR system.
The form of the NMR Hamiltonian makes it more straightforward to simulate the spin chain models and its phase transitions. One example is the simulation of the quantum phase transition in a Heisenberg spin chain model [59]. By varying the strength of the magnetic field and measuring the amount of entanglement, the ground state of the system was observed to be transformed from a product state to an entangled state, and back to another product state. Later, a system with competing one-, two-, and three-body interactions was also simulated [60]. The experiment detected a novel and distinct phase transition under three-body interactions, which is qualitatively different from the states characterized by twospin correlations. Moreover, a more general case that the ground state can be a product state, GHZ state, or a W state depending on the type and strength of the spin-spin interactions was also investigated in NMR [61].
Other than quantum phase transitions, there exists other related works such as the ground-state geometric phase [62] or the calculation of the eigenvalues and eigenstates in a Heisenberg model [63]. A notable recent work is the compressed quantum simulation, by which one can merely use O( log (n)) qubits to simulate a certain n-qubit system faithfully [64]. The NMR experiment was to simulate a one-dimensional spin chain, and five qubits were used to predict the property of ground-state magnetization in a 32-spin Ising model [65]. Due to the great save in number of qubits, this experiment marks an important step toward the simulation of large-scale quantum systems.
Topological orders describe the quantum phases of matter in strongly correlated quantum systems, and are beyond the traditional Landau symmetrybreaking theory. In NMR, the experiments about simulating the topologically ordered systems include: Wen-plaquette spin model with different topological orders and the adiabatic transition between two Z 2 topological orders [66], the interaction-induced topological transitions in a one-dimensional Heisenberg spin model [67], and the identification of distinct topological orders by measuring the modular matrices [68,69]. All of the above experiments demonstrate the remarkable advantage of NMR systems in controllability and accuracy, which is highly suitable to test more complex quantum phenomena in condensed matter physics.

Quantum computations based on hybrid electron-nuclear spin systems
In this section, we review the recent experimental results in quantum computations in hybrid electron-nuclear spin systems, including NV centers in diamonds, phosphorus doped in silicon and single molecular magnets. The electron spins has much higher gyromagnetic ratios than those of nuclear spins. Therefore, the electron spin can be driven by MW pulses to realize fast gate operations and can serve as processing quantum bits. In Ref. [70], the gate operation can be performed as fast as Gigahertz. However the electron spins suffer from much severe decoherence effect than nuclear spins. This decoherence may be due to the couplings to the nearby spins, local magnetic field fluctuations and phonon scattering by spin-orbital interactions. The coherence time of electron spin is relative shorter than that of nuclear spin. On the other hand, the nuclear spins have long coherence time due to their weak couplings to the environment. Thus nuclear spins serve as good quantum memories. The disadvantage of nuclear spins is slow gate operations. It has been shown that the hyperfine couplings between electron and nuclear spins can accelerate the gate operations of nuclear spins [71]. Herein, we focus on the decoherence effect, which is one of the most important obstacles toward practical quantum computations. To overcome this problem, there are several strategies proposed, including reducing the nuclear spins in the environment, cooling the temperatures and performing dynamical decoupling operations.

Protecting quantum states
Decoherence effect is one of the main obstacles toward practical quantum computations. For the electron spin qubit, the couplings between the electron spin and the nearby nuclei cause the decay of the electron spin coherence. Such coupling is understood as classical noises, such as spectral diffusion theories, which are widely studied in ESR spectroscopy. In this section, we discuss the experimental effort to protect quantum states in the presence of noise, which is key issue for quantum memories.
When the qubit is subjected to the noisy environment, the total Hamiltonian can be expressed as H = H S + H SB + H B + H C , where H S = 2π 0 S z is the system Hamiltonian and 0 is the off-resonance frequency. H SB stands for the qubit-environment coupling and H B is the environmental Hamiltonian. Herein, we describe the environment as a nuclear spin bath and the coupling as a pure dephasing interaction H SB = 2π k b k S z I k z , where I k z is the spin operator of the kth nuclear spin and the b k is the strength of the hyperfine interaction between the qubit and the kth nuclear spin. The term H C describes a general singlequbit unitary operation on an electron-spin qubit in the rotating frame as H C = 2πω 1 n · S, where S = (S x , S y , S z ) is the spin vector operator of the qubit, n is a three-dimensional vector, and the strength ω 1 is a real parameter. The hyperfine interaction between the electron spin qubit and the nuclear spins results in a random local magnetic field (Overhauser field) δ = k b k I k z of typical strength the order of magnitude of about several MHz in solids, which depends on the samples. This thermal distribution of the Overhauser field will result rapid FID of the electron spin coherence. There are also dynamical fluctuations of the local Overhauser field driven by pair-wise nuclear-spin flip-flop [72]. Because the dynamical fluctuations in δ are much slower than a typical gate time, the fluctuation δ can be taken as a random time-independent variable.
We consider the on-resonance case with zero-value of off-resonance frequency 0 in the absence of the control Hamiltonian. If the quantum states is subject to the noisy environment, it will undergo the evolution governed by the Hamiltonian H = 2πδS z . Due to the nuclear spins flip, the qubit experiences a different δS z in every experiment once a new trail is started. When we average over many trails to set up the statistics, δS z will cause the decay of the coherence. This process is known as the FID. The corresponding decay time is named as T * 2 . In a single trail, the decay of the electron spin coherence may caused by the dynamical fluctuation of the nuclear spins and the corresponding decay time is known as T 2 , which is usually longer than T * 2 . These decoherence effect will cause the lose of coherence.
To preserve the electron spin coherence, the strategy of dynamical decoupling [73][74][75] can be utilized. The idea of dynamical decoupling originated in spin echo [76] in NMR, in which the effect of static part of δS z is canceled by a single flip of the spin with a π pulse. The coherence time can be prolonged from T * 2 to T 2 with spin echo. To further prolong the coherence time, multiple π pulses can be applied periodically. The dynamical decoupling with periodic multiple π pulses is called PDD. As errors are inherently introduced by the controlling π pulses, it is desirable to minimize the number of π pulses for a given order of decoupling precision. The minimization of π pulses can be achieved with the optimal sequence discovered by G. S. Uhrig [75,77]. For a pure dephasing model, the sequence of Uhrig dynamical decoupling (UDD) contains N π pulses applied at to eliminate the coupling up to O(t N+1 ). For comparison, the PDD has the periodic timing t j = t(2j−1)/(2N). Note that the sequences of UDD are identical to those of PDD when N = 1 and 2. The pulse sequences of UDD and PDD are shown in Figure 4(a). Experimental preservation of electron spin coherence with dynamical decoupling has been investigated in γ -irradiated malonic acid single crystals [78]. The γ -irradiation may remove one hydrogen atom from a methylene group (-CH 2 ) and create a radical (-CH), which provides an unpaired carbon valence electron. The coherence decay of the unpaired-electron spin is investigated both under UDD and PDD. Figure 4(b) shows the experimental results of the coherence decay under N-pulse UDD and PDD, with N = 1, 2, . . . , 7. It is shown that UDD outperforms PDD in preserving the spin coherence. The coherence time is prolonged to about 30 µs with UDD, which is about 3 orders longer than T * 2 , which is about 40 ns.
Dynamical decoupling can also be applied to protect quantum states of a multi-qubit system [79,80]. Especially in the hybrid electron-nuclear spin system, experimental preservation of two-qubit pseudoentanglement with dynamical decoupling has been demonstrated [81]. The experiment was implemented on the system of phosphorus doped in silicon, which is an attractive candidate for spin-based quantum computing. The system contains an electron spin coupled with a nuclear spin. MW and RF pulses can be applied to manipulate the electron and nuclear spins, respectively. Starting from the equilibrium state, pseudo-entangled states are prepared by applying appropriate MW and RF pulses together with waiting times. In the experiment, two pseudo-entangled states corresponding to | = ( ↑↑ + | ↓↓ )/ √ 2 and | = (| ↑↓ + | ↓↑ )/ √ 2 are prepared, where | ↑ (| ↓ ) is the spin-up (spin-down) state of the electron or nuclear spin. Decoherence will destroy the pseudo-entangled states and cause degradation of the pseudoentanglement. The degree of pseudoentanglement is quantified by the concurrence C [82]. Figure 5(a) shows experimental results of Dynamical decoupling can be utilized to preserve the pseudoentanglement. Because T * 2 of the electron spin (denoted by T * 2e hereafter, T * 2e = 0.2 µs) is much shorter than that of the nuclear spin (denoted by T * 2n hereafter, T * 2n = 30 µs), it is sufficient to only apply the DD sequence on the electron spin to preserve the pseudoentanglement on a much longer timescale. Figure 5(b) shows the concurrence decay when PDD2 is applied on the electron spin. The decay rate is greatly suppressed compared to that without dynamical decoupling ( Figure 5(a)). The concurrence decay with PDD2 can be well fitted by where T decay1 = 27.673 µs, T decay2 = 23.554 µs for | , and T decay1 = 30.051 µs, T decay2 = 22.357 µs for | . The cubic exponential term with T decay2 is caused by the electron spin decoherence due to spin diffusion of the 29 Si spin bath [83]. The linear exponential term with T decay1 is caused by both the nuclear spin dephasing and the electron spin decoherence [84]. Since T decay1 is comparable with the nuclear spin dephasing time T * 2n but smaller than the electron spin decoherence time T 2e = 60 µs measured with the Hahn echo sequence, T decay1 is mainly limited by the nuclear spin dephasing. To preserve the pseudoentangled states even longer, the suppression of the nuclear spin dephasing is also needed. In this experiment, although the DD sequence is applied only on the electron spin, the lifetime of the pseudoentangled states is extended about 2 orders longer than that without dynamical decoupling.
The dynamical decoupling technique described above can also be applied to other spin systems, such as NV centers in diamonds [85,86]. Though it is demonstrated in spin ensembles in the above examples, the dynamical decoupling is also suitable for individually accessing single spins. A natural application of dynamical decoupling is to protect quantum memory in quantum computation. In addition, motivated by the mechanism of decoherence suppression, the dynamical decoupling technique has been applied to nanoscale sensing of magnetic signals (Section 4).
In addition to dynamical decoupling, several efforts have been made to develop other strategies to prolong the coherence time. For example, by synthesizing ultrapure isotopically controlled samples to reduce the concentration of other paramagnetic defects and nuclear spins, millisecond coherence times of electron spins in NV centers have been observed [87]. By combining the dynamical decoupling technique with cooling the temperature, the coherence time of NV center electron spins has been prolonged to approach one second [88]. Recently, a novel strategy has been proposed to improve the coherence time of NV center by coupling it with another system [89].

Protecting quantum gates
Quantum computation requires not only high fidelity quantum memory but also high fidelity quantum gates. In addition to loss of coherence, the decoherence effect will cause degradation of gate fidelity as well. To illustrate this, consider the case to realize a target single-qubit gate R φ (θ ), which denotes the rotation of an angle θ around the axis in the equatorial plane with azimuth φ. For simplicity, we consider the on-resonance case ( 0 = 0) and set φ = 0. Without considering the qubit-environment coupling, the target gate can be realized by appropriate duration of evolution under the Hamiltonian H ideal = 2πω 1 S x , where ω 1 is the strength of the control (microwave) field. Due to the inevitable qubitenvironment coupling, the electron-spin qubit is subjected to the Hamiltonian H prac = 2π(δS z + ω 1 S x ), where δ is the random Overhauser field resulted from the interaction between the electron spin qubit and the nuclear spin bath as described in Section 3.1. The error term δS z in the Hamiltonian renders the realized gate apart from the target. Due to the nuclear spins flip, the value of δ changes in every new trail of experiment, leading to different gate realized for different trails. When averaging over many trails to set up the statics, we will obtain a nonunitary process on average rather than the target unitary gate.
Since dynamical decoupling has been demonstrated to protect quantum states against decoherence, it is expected that decoherence during quantum gates can also be suppressed by dynamical decoupling. Indeed, the protection of quantum states can be reconsidered as protection of an identity gate, which is a special case of the gate protection. It is a nontrivial challenge to combine dynamical decoupling with general quantum gates, due to the noncommutability between quantum gates and the DD pulses. Recently, this problem has been experimentally investigated [90][91][92]. It is shown that decoherence-protected quantum gates can be realized by appropriate integration of the gates with dynamical decoupling. The strategies utilized in these experiments require instantaneous control pulses with unbounded strength in principle. The disadvantages of unbounded control pulses may be avoided by adopting the schemes of dynamically corrected gates [93][94][95][96][97]. Specially, a type of DCG named SUPCODE [97], has been experimentally implemented to suppress decoherence during quantum gates to the limit set by T 1ρ [98].
The SUPCODE is a class of pulse sequences which was originally proposed to suppress the fluctuations in the magnetic field gradient during quantum gates in the system of singlet-triplet spin qubit in a semiconductor double quantum dot [97]. It was soon experimentally demonstrated that SUPCODE can be utilized to suppress the fluctuation of the Overhauser field δ on the electron spin qubit [98]. The N-piece SUPCODE sequence contains N pieces of pulses. With each piece of pulse realizing an evolution operator containing δ, the total N pieces generate the target gate with the error δ suppressed to a certain order. Taking the five-piece SUPCODE as an example, the sequence for a target gate R 0 (θ ) is τ 1 − R 0 (θ/2) − τ 3 − R 0 (θ/2) − τ 1 , where τ 1 = csc θ(1 − 2 cos θ 2 + cos θ + 4 − 8 cos θ 2 + 4 cos θ + θ sin θ) and τ 3 = −2(τ 1 cos θ 2 + sin θ 2 ) are waiting times (in unit of 1/(2πω 1 )) without control pulse, θ ∈ (2π , 3π). The sequence generates a gate of which the fidelity with the target gate only contains sixth and higher orders of δ/ω 1 . Note that the target gates R 0 (θ ) when θ ∈ (0, π) can be realized with the five-piece SUPCODE sequence of R 0 (θ + 2π), and R 0 (π ) can be realized by repeating the five-piece SUPCODE sequence of R 0 (2.5π) twice.
The experiment was implemented on the single electron spin of an NV center in diamond [99]. The NV center consists of a substitutional nitrogen atom with an adjacent vacancy cite in the diamond crystal lattice. As an important candidate for quantum computation [100], a single NV center provides a spin register composed of an electron spin, a host nitrogen nuclear spin, and several 13 C nuclear spins. The ground state of the NV center electron spin is a triplet state 3 A 2 , with three sublevels |m S = 0 and |m S = ±1 . The electron spin can be pumped into the 3 E excited state with a laser pulse. The decay from 3 E to 3 A 2 with fluorescence emission is spin preserving. The other competing decay pathway is non-radiative via intermediate dark states [101,102]. The non-radiative decay from 3 E to the dark states is slower for |m S = 0 than for |m S = ±1 [103,104], leading to different fluorescence emission of the |m S = 0 and |m S = ±1 states. The difference of the non-radiative decay rate also leads to optical spin polarization into |m S = 0 at room temperature [101,102,105]. As a consequence, the optical dynamics can be used to initialize and readout the electron spin. The nuclear spins can be initialized and read out with the assistance of the electron spin, by mapping the states between the electron and nuclear spins. Efficient readout of the electron spin has been demonstrated based on spin-to-charge conversion [106]. Single-shot readout of a nuclear spin has been implemented by repeatedly mapping the nuclear spin state onto the electron spin and reading out the electron spin [107]. Single-shot readout of the electron spin is also promising by mapping the electron spin state onto nuclear spins together with single-shot readout of the nuclear spins [108]. At low temperature, singleshot readout of the NV center spin register has been realized by implementing spin-selective resonant optical excitation techniques [109]. The electron and nuclear spin states can be manipulated by applying MW and RF pulses. Coherent spin control of NV centers with nanoscale addressability can be achieved by, e.g. coupling to a dynamic ferromagnetic vortex [110].
In this experiment, the states |m S = 0 and |m S = 1 of the electron spin are encoded as a qubit. A magnetic field of 513 G is applied along the NV symmetry axis ( [111] crystal axis) to achieve effective polarization of the nitrogen nuclear spin [90,111]. The undesired couplings between the electron spin and the surrounding 13 C nuclear spins lead to the decoherence effect, which should be suppressed during quantum gates to achieve high fidelity.
The SUPCODE sequences are utilized to realize decoherence-protected quantum gates in the experiment. To minimize the influence of the instability of the control field, the control strength is set to ω 1 = 1 MHz. In Figure 6(a), the quantum oscillation driven by five-piece SUPCODE and that driven by naive pulses are compared. The envelope decay of the oscillations presents loss of coherence during the state evolutions. It is clearly shown that the loss of coherence caused by decoherence effect is greatly suppressed when driving the qubit with five-piece SUPCODE compared to that with naive pulses. The decay time is derived to be T DCG = 690(40) µs for the oscillation driven by five-piece SUPCODE, and T 2 = 135(10) µs for that driven by naive pulses, from the fitting of the experimental data. As a reference, Figure 6(c) shows the coherence time when N-pulse dynamical decoupling is applied. As N increases, the coherence time saturates at T 1ρ = 660(80) µs, which is determined by an independent spin-locking experiment. The decay times are summarized in Figure  6(d). It is noted that T DCG has reached T 1ρ within the uncertainty. This indicates that the decoherence effect has been suppressed to the limit set by T 1ρ when realizing quantum gates with five-piece SUPCODE. To verify this, the five-piece SUPCODE sequence for R 0 (π/2) is successively applied and the fidelity [112] decay is recorded using quantum process tomography. As shown in Figure 6(b), the experimental fidelity decay matches the theoretical prediction in which only the T 1ρ process is taken into account. With this method, the fidelity of each five-piece SUPCODE π/2 gate is derived to be 0.9961 (2).
To further improve the gate fidelity, the instability of the control field [113] as well as the decoherence effect should be simultaneously suppressed during the quantum gates. The SUPCODE pulse can suppress the dephasing effect during the gate operations, but it is sensitive to the error due to instability of the control field. That's why the control strength is set to ω 1 = 1 MHz in the above experiment to demonstrate the suppression of decoherence to the T 1ρ limit [98]. A pulse sequence which is insensitive to the instability of control field is named BB1 [114]. The BB1 sequence for a target gate R 0 (θ ) is To achieve simultaneous suppression of errors due to both decoherence effect and instability of the control field, the concept of concatenated composite pulse [115] may be adopted. A novel concatenated composite pulse named BB1inC has been designed and experimentally implemented on the electron spin of an NV center in diamond [116]. The BB1inC sequence for a target gate R 0 (θ ) The gate fidelity is experimentally quantified with the standard technique of randomized benchmarking [117]. The experimental results are shown in Figure 7(a), where the control strength is set to ω 1 = 10 MHz. An average gate fidelity of F a = 0.999952 (6) is achieved for the gates realized with BB1inC.
Quantum computation requires a universal set of quantum gates, including not only universal single-qubit gates but also a nontrivial two-qubit gate (e.g. the CNOT gate). The sequence of two-qubit CNOT gate with simultaneous suppression of the errors due to both decoherence effect and the instability of control field can be designed with the optimal control method, especially the technique of GRAPE described in Section 2.1.3. For the hybrid electronnuclear spin system, since the electron spin qubit is more sensitive to noises than the nuclear spin, it is sufficient to take into account only the noise felt by the electron spin in the optimization process. The sequence for a CNOT gate on the electron and 14 N nuclear spins of an NV center has been designed with this method and experimentally implemented [116]. By repeatedly applying the CNOT gate and recording the dynamics of state evolution, the average fidelity of each CNOT gate can be derived. Figure 7(b) shows the experimental results of state population with repeated application of the CNOT gate. As shown in Figure 7(b), the population of state |01 , P |01 , exhibits oscillatory attenuation as the number of gates increases. The decay of P |01 is mainly owing to the quasi-static fluctuation of δ and the instability of the control field, which are quantitatively characterized with additional experiments [116]. The oscillation is due to the deviation of the practical Hamiltonian from the ideal one under which the evolution generates a CNOT gate. The parameters describing the practical Hamiltonian can be derived by fitting the experimental data. With the practical Hamiltonian as well as the errors due to δ and the instability of the control field characterized quantitatively, the practical evolution and its fidelity [112] with the CNOT gate can be obtained. The gate fidelity is determined to be 0.9920 (1). Together with the single-qubit gates realized with BB1inC, a universal set of quantum gates with fault-tolerant fidelity [118] has been demonstrated on the NV center in diamond [116].

Quantum error correction
Eventually, quantum computation requires QEC for reliable and fault tolerant computation. The quantum errors from decoherence and control imprecision, that are intrinsic to quantum systems, is corrected by QEC provided the error rate is below some threshold value [119][120][121][122]. Compared to its classical counterpart which employs redundancy, QEC protocols e.g. stabilizer code [123] and surface code [118], rely on highly entangled state. A high overhead that is polynomial in the total number of qubits and overall computation time is typically required. In this regard, hybrid electron-nuclear spin systems with functional nuclear spin register provide more qubits at individual electron spin node. Recently the three-qubit error correction code has been performed in such a single node composed of single NV center electron spin and (a) three neighboring strongly coupled nuclear spins [124], (b) two weakly coupled 13 C nuclear spins [125]. Both experiments are summarized in Figure 8. Figure 8(a) shows the main result of the phase flip QEC experiment [124], in which the quantum state |ψ of the second 13 C nuclear spin (denoted by 13 C 2 ) is intended to be protected. The 13 C 2 together with the intrinsic 14 N and another 13 C nuclear spin forms a three qubit register, which is encoded as a logical qubit. The NV center electron spin is used as an ancilla for initialization, read out, and nonlocal control of the nuclear spins. The upper panel of Figure  8(a) shows the quantum circuit for QEC. The quantum state |ψ = α|0 + β|1 , which is used as an example, is encoded into state α|y + y + y + + β|y − y − y − of the register by the encoding procedure, where |y + = (|0 + i|1 )/ √ 2 and The state is subject to phase flip errors with certain error probability. In the decoding procedure, the π/2 gates transform the state into α|000 + β|111 if no error occurs, and into α|001 + β|110 if an error is induced on 13 C 2 . By flipping the other two qubits conditional on the state of 13 C 2 , the state of the register becomes |00 ⊗ (α|0 + β|1 ) and |11 ⊗ (α|1 + β|0 ), respectively. Thus after decoding, the state of the other two qubits indicates whether there is an error on 13 C 2 . The state of 13 C 2 is then flipped conditional on the state of the other two qubits in the restoring procedure, which recovers the state of 13 C 2 into |ψ . With the QEC protocol, any single phase flip error can be faithfully corrected. The protocol fails only when phase flip errors are induced simultaneously on at least two nuclear spins. The lower panel of Figure 8(a) shows the experimental result. To characterize the performance of the QEC protocol, the process fidelity of the equivalent operation on 13 C 2 with identity is recorded as the error probability changes from 0 to 1. The theoretical predictions with and without QEC are shown with the solid red and solid blue lines, respectively. The experimental results are shown as the red dots and blue circles. The deviation of the experimental results from the theoretical predictions is due to the imperfection in experimental state preparation, measurement, and implementation of the gates in the protocol. A comparison between the results with and without QEC clearly shows that the performance with QEC outperforms that without QEC when the error probability is below a certain threshold. The green triangles show the experimental results when the phase flip error is induced only on 13 C 2 . That the process fidelity remains almost a constant with increasing error probability indicates that the single phase flip error can be completely corrected.
The experimental result of the bit flip QEC [125] is shown in Figure 8(b). The logical qubit is encoded by the spin register composed of the NV center electron spin and two 13 C nuclear spins. The lower panel of Figure 8(b) shows the quantum circuit. Since the bit flip and phase flip errors are identical by a change of qubit basis, the QEC protocol for bit flips is essentially identical to that for phase flips, only differing by local π x,y /2 rotations for basis changes. The Figure 8. Two experiments for implementing quantum error correction in the hybrid spin system. In both cases, a NV electron spin and the surrounding coupled nuclear spins are used, in which three qubit quantum error correction protocol is implemented. (a) Three strongly nuclear spins including the intrinsic 14 N nuclear spin and two nearby 13 C nuclear spins form a nuclear spin register. (b) Two weakly coupled 13 C nuclear spins and the NV center electron spin form a three qubit register.
Notes: In each case, the electron spin is used for the initialization, read out and nonlocal control of nuclear spins. By encoding the logical qubit into two states of three qubit register, single qubit errors are detected by decoding and corrected by restoring procedure. The performance of quantum error correction protocol is characterized by the process fidelity, which is dependent on the functionality of each spin register. Figures are Adapted from Refs. [124,125]. experimental process fidelity with and without QEC is shown as the blue and red dots, respectively, in the upper panel of Figure 8(b). As expected, the performance with QEC outperforms that without QEC when the error probability is below a certain threshold.
In both experiments, the single phase/bit-flip errors are faithfully corrected by the error correction protocol. A further strength of this hybrid system is the ability to achieve error-correcting codes that correct both phase and bit-flip errors.
One ultimate goal of QEC is to realize logical qubits with error rates below those of the physical constituent qubits. This requires all basic operations including initialization, control and readout are performed with very high fidelity in a single quantum system. In spite of recent experimental advances [107,109,116,126], more experimental efforts are still needed. One step closer to this ultimate goal, with partial relaxation of the above requirements, is a demonstration of logical qubit with extended coherence time. J. Cramer et al. achieved this point through repeated QEC [127]. They implemented the repeated three-qubit phase flip code by real-time feedback in the same hybrid spin systems as in Ref. [125]. The logical qubit with two rounds of error correction dephases slower than the best physical qubit. Similar results are also observed in superconducting systems through a nontraditional QEC [128].
In addition to be a fundamental tool for quantum computing, QEC benefits other quantum technologies. A recent series of proposals show that Heisenberg-limited spectroscopy can be attained using QEC [129][130][131]. The proof of principle demonstrations are realized very recently in systems including NV center in diamond [132] and photonics [133].

Experimental progress in other hybrid electron-nuclear spin systems
In addition to the systems mentioned above, several progress has been made toward quantum computation in other hybrid electron-nuclear spin systems. Since it is not intended to list all the progress in the systems, here we mainly review recent experimental progress in an important family of systems, named spin defects in silicon carbide [134,135]. Silicon carbide is a wide-bandgap semiconductor with well-established fabrication techniques. Spin polarization, detection, and coherent control have been demonstrated for several spin defects in silicon carbide with optical and microwave techniques [136,137]. Millisecond coherence time has been achieved [138,139]. Optical polarization of nuclear spins due to spin-level anticrossing has been observed [140]. Besides potential quantum bits for quantum computation, quantum metrology based on spin defects in silicon carbide has been proposed [141,142].

Sensing in nanoscale with the NV center system
The precise detection and imaging of magnetic fields is an important topic in biology, material science, medicine, geology and physics. Recently many applications have been developed for material, biology and physical science [143]. NV center in diamond emerged as a state-of-art candidate for spin microscope system [144]. The NV center can be located precisely [145], has beneficial optical properties [145], and possesses long coherence time [146]. With quantum control methods like dynamical decoupling, DEER and SEDOR, NV magnetometry has been also developed these years in different aspects, such as material [147][148][149], biology [150][151][152][153][154][155] and physics [156][157][158][159][160][161]. NV center has plenty of applications in magnetometery, quantum computation, quantum network and so on. Here mainly the magnetometery of single and ensemble spin system with NV center is introduced.

Introduction of the NV center magnetometry
The NV center is a point defect in the diamond lattice, consisting of a nearestneighbor pair of a nitrogen atom substituted for a carbon atom, and a lattice vacancy. The diamond lattice consists of covalently bonded carbon atoms. Each of the four valence electrons of the sp 3 -hybridized carbon participates in bonds to neighboring atoms (distance 1.44 Å). The diamond unit cell is in the Fd3m space group, which follows the face-centered cubic bravais lattice(lattice constant 3.57 Å. In the NVcenter, six electrons occupy the dangling bonds of the vacancy complex, the resultant defect has C 3v point symmetry [105,162]. The NV system is described by the Hamiltonian as: here D is the crystal field splitting along [111] axis which equals to 2.87 GHz, ← → A is the hyperfine coupling between the electron spin with the nearby nirtogen nuclear spin, and the strength of hyperfine coupling is about 2. Nanoscale weak magnetic fields detection is an outstanding problem in the fields of biology and physics [163][164][165][166][167]. With minimum detectable magnetic field as small as few nanoteslas after one second of measurement time, it is possible to detect a single proton within nanometers. The principal challenge to achieve such sensitivity is limited by the decoherence time. A Ramsey-type sequence can be applied to detect a Zeeman shift caused by external magnetic field B, as shown in Figure 9(a). A π/2 pulse creates quantum superposition state of |0 and |1 . The superposition state (|0 +|1 )/ √ 2 will accumulate a phase φ = (gμ B / )Bτ during the free evolution time τ (here B is external magnetic field, g is gyromagnetic ratio of spin, μ B is Bohr magneton). After the second π/2 pulse, the population left on |0 state is S = (1 + cos (2φ(B)))/2. In every measurement, deviation σ S ∼ 1/ √ η d c occurs due Figure 10. Dynamical decoupling microwave pulse sequence used for observing AC magnetic field. B AC (t).
Notes: A π/2 MW pulse creates a coherent superposition quantum state 1 √ 2 |0 + |1 after the quantum state polarized to |0 by 532 nm laser. Then a series of π MW pulse whose period matched with half of the period of AC magnetic field B AC (t) is applied to NV center. DC field is eliminated while phase φ = n t n t n−1 g e μ B B AC (t)dt during the free evolution intervals between π pulse is accumulated, while n is number of π pulses, t n−1 , t n are time of a π pulse, and time of the next pulse. A π/2 MW pulse afterwards will flip the final state |ψ = 1 to |ψ afterπ/2 = 1 to quantum projection noise and photon shot noise, where c is the contrast of Ramsey measurement and η d is collection efficiency about 2-3% [109]. The minimum detectable magnetic field of NV magnetometer is δB min = σ N S /dS (shown in Figure 9(c)), where σ N S = σ S / √ N is the standard deviation of measurement after N times average, dS ∼ gμ B τ is the slope of the signal S versus magnetic field B and N = T/τ is the measurement times during the total measurement time T. Thus the minimum detectable d.c. magnetic field scales according to where T * 2 is dephasing time which limits the detection time τ and C = √ η d c. And magnetic field sensitivity of d.c. magnetic field is [168]: Furthermore, a.c. magnetic field B AC (t) = b sin (νt) can be measured by matching the sequence π/2 − τ/2 − π − τ/2 − π/2 with the a.c. oscillating frequency (Figure 9(b)). The Hahn echo sequence removes the slow environment noise at the same time. The phase accumulated during the free evolution time where during the second τ/2 free evolution time the spin flips. Sensitivity of a.c. magnetic field is [168]: The sensitivity of a.c. magnetic field can be improve furthermore by higher order dynamical decoupling sequence (see Figure 10) by extending decoherence time. The magnetometer sensitivity achieved was 0.5 ± 0.1μTHz −1/2 in Ref. [169] and even 4nTHz −1/2 in Ref. [146].

Single molecule ESR with the NV center system
As one of the most important techniques, ESR finds broad application for studying basic molecular mechanisms in biology and chemistry [170]. Most proteins however, are non-paramagnetic, and thus not accessible by the technique. Labeling biomolecules with a small spin-bearing moiety, such as nitroxide spin labels, enables ESR to acquire a broad range of structural and dynamical information. However, current methods need 10 10 uniform molecules to accumulate a large enough signal-to-noise ratio. This substantially complicates compiling structural and dynamical information. New methods that have tried to push the sensitivity of magnetic resonance to the single spin level all require either a dedicated environment [166,171] or conducting surfaces and tips [172].
The NV center's triplet (S = 1) ground state can be spin-polarized and read out optically. The magnetic dipole interaction between the NV spin and the dark electron spin is conveniently measured by simultaneously driving the probe (NV) and the dark electron spin. Single NV centers can be created roughly 5 nm below the surface of diamond by ion implantation. The dark spin sample can be deposited on diamond surface and characterized by atomic force microscopy (AFM).
Denoting the spins by S NV (NV sensor), S e (dark electron spin), and I (nuclear spin of dark electron spin), the combined system can be modelled by a coupling Hamiltonian: γ e B 0 S z,e + S e AI + γ I B 0 I z + IQI (16) where dark denotes the dark electron spin, B 0 is the external static field (aligned along z), D is the zero-field splitting of the NV, Q is the nuclear quadrupole coupling constant, and γ NV , γ e , and γ I are the gyromagnetic ratios of the NV, target electron, and nuclear spin, respectively. The coupling between the NV and the dark electron spin is approximated as a pure S z,NV − S z,e interaction with coupling constant b because it is much smaller than the Zeeman and zero-field splitting of the two spins. Within this approximation, the target spin generates an effective magnetic field B e = bS z,e /γ NV at the NV center site, which depends on the quantum number S z,e .
To reveal the coupling, two protocols of spin-echo detected double electronelectron resonance (known as SEDOR or DEER [174][175][176][177] can be applied and illustrated in Figure 11). In both schemes the effective two-level system |0 = |S z = 0 , |1 = |S z = −1 of the NV spin S are addressed with a resonant MW and perform a Hahn-echo measurement on this system. In this measurement, an initial π/2 pulse prepares the spin in a coherent superposition |ψ(t = 0) = Figure 11. Identifying a single spin with spin-echo detected double resonance (SEDOR). A Hahnecho measurement is performed on the NV center and a radio-frequency (RF) pulse is used to flip the magnetic field B of the dark spin, which imprints a phase on the NV center (a) fixing τ and varying τ reveals Rabi oscillations of the dark spin, (b) fixing τ to a π pulse and varying τ creates an oscillation at the coupling strength of the spins.
Notes: The presence of a single-frequency component indicates coupling to a single dark spin. Adapted from Ref. [173].
The key idea of SEDOR is to map the result of an ESR experiment on spin I to a phase ϕ on spin S. This is accomplished by performing an ESR sequence on the electron spin frequency ω I (Figure 11(a), RF) synchronized with the Hahn-echo period. The sequence flips the dark spin with some probability p and is assumed to be much shorter than τ in the following. In the case of a flip, the NV experiences an alternating field of the dark spin ( B in Figure 11) and acquires a phase ϕ = 4I z B I0 τ μ S (I z denoting the initial state of the dark spin). In this way, the dark spin ESR signal p is mapped to the echo contrast obtained on the NV center ( Figure 11(b)) Due to the symmetry of the cosine, this mechanism is independent of the polarization I z of the dark spin. Notes: The spectrum disappears after removing the protein by acid cleaning. Adapted from Ref. [178].
A modified version of SEDOR can enhance sensitivity of single spin ESR protocols. The pulse sequence is shown as Figure 12(a). The phase ϕ evolved over time, was refocused by N π -pulses at t = τ 0 /2 + nτ 0 , and was converted into a population by the final π/2 pulse at t = Nτ 0 . The key idea is to map the ESR signal of the spin label S e to a phase ϕ on the NV spin. The flip π −pulses of NV electron spin and dark electron spin are synchronized with the dynamical decoupling period. The NV experienced an alternating field from the dark electron spin label and acquired a phase ϕ ∼ b eff Nτ 0 (19) where b eff is the effective magnetic field generated by the spin label at the location of the NV spin. In this way, the dark electron spin ESR signal is mapped to the signal obtained from the NV sensor. Figure 12(b) shows the ESR spectrum of a single dark spin (a spin label on protein) under ambient environment. Upon cleaning the diamond surface, the signal disappeared, demonstrating that it stemmed from the spin label on the protein. The spectra in Figure 12(b) were recorded at an external magnetic field B 0 = 153.0 G. Three spectral peaks at 356.3, 430.9 and 501.6 MHz, mark the hyperfine splitting between the spin label electron spin (S = 1/2) and the nitrogen nuclear spin (I = 1). The observation of hyperfine splitting proves that the detected spin is indeed the nitroxide spin on the protein and not e.g. that of a substitutional nitrogen impurity inside diamond.

Nanoscale NMR with the NV center system
Besides NV-based single molecule ESR, NV-based nanoscale NMR give a unique opportunity to realize non-destructively and no-labeled structure characterization. In 2011, the theoretical possibility for atomic-scale NV magnetometry of nuclear spin clusters inside and outside diamond was proposed (Ref. [179]). In 2012, distant single nuclear spins inside diamond were detected [180][181][182] by dynamical decoupling methods. And in 2013, another method to detect single nuclear spin demonstrated [183] by continuous microwave Hartmann-Hahn method. Based on these two methods, respectively, Refs. [184,185] proposed single molecule NMR schemes by NV magnetometry aimed in applications in single-molecule spectroscopy in chemistry and biology. Equipped with shallow NV created through ion implantation [186] and δ-doped CVD technology [187], NV magnetometry can be applied to external nuclear spins. Nanoscale NMR was demonstrated in Refs. [177,188], and a detection volume of (5nm) 3 was achieved, which corresponded to 10 4 nuclear spins [188], and (24 nm) 3 , 10 6 nuclear spins in Ref. [177]. And detection volume was decreased to (2.3 nm) 3 , 700 proton spins [189] by using even shallower implantation. In Refs. [190] single nuclear spin sensitivity NMR of silicon 29 nuclear spin was demonstrated. It is an important step toward diamond-based nano-MRI. Scanning NV magnetometry was also applied to nanoscale NMR in Refs. [191][192][193].
The detection of proton ( 1 H), 13 C or 29 Si nuclear spins in various liquid and solid samples has been shown in Refs. [177,188,194,195] on the diamond surface. This is a key milestone toward achieving nanoscale magnetic resonance imaging based on scanning NV centers. The technique additionally allows one to perform NMR on an arbitrary sample in the regime of ultra-weak and zero magnetic field, because it is based on statistical rather than thermal polarization of the nuclei.
When the noise, in the form of magnetic coupling between sample nuclear spins, exceeds the interaction with the sensor, the sensitivity is classically restricted to the measurements of statistical fluctuations in sample magnetization [196]. However, when coupling between the sensor and measured nuclei dominates over decoherence (strong coupling regime), individual nuclei may be detected regardless of their polarization. For the weakly coupling regime like in Ref. [188] the detection of the magnetic field of nuclear spins in the sample is based on the statistical polarization of the spin population near the NV center with a dynamical decoupling method ( Figure 13). The magnetic field at the NV center is dominated by a small number of nearest nuclear spins. The net magnetization of this small set of randomly oriented spins is zero but has a sizable standard deviation equivalent to √ N nuclear spins. Equivalently, this excess amount of protons can be considered to be statistically polarized along a random direction. In particular, this statistical polarization will lead to a random magnetization M x , M y in the transverse plane, which undergoes Larmor precession under the applied magnetic field and leads to an oscillating field component B z = B( M x , M y ) cos (2π t/τ Larmor + φ) along the axis of the NV center. Strong coupling can be realized by bringing a single electronic spin sensor close to weakly interacting nuclear spins ( 29 Si nuclei in a silica layer in Ref. [190]). Furthermore, strong coupling enables the dipolar field of the atomic sensor to be used as field gradient for magnetic resonance imaging, allowing the positions of four single nuclear spins to be imaged in Ref. [190].
For the weak coupling regime, the oscillating component is detected by dynamical decoupling ac magnetometry based on the XY8-N pulse sequence [197][198][199][200][201][202][203] (Figure 13(b)). Here, an initial π/2 MW pulse places the NV center into a coherent superposition (|0 + e iφ |1 )/ √ 2 of two spin states. Its phase φ is sensitive to the fluctuating magnetic field and evolves from φ = 0 at the beginning of the sequence to a nonzero random phase φ = φ, which is converted into a population difference of the states by a final π/2 pulse and subsequently read out. For a fluctuating magnetic field, this phase is a random variable with variance φ 2 , which,when averaged over many repetitions, reduces the readout contrast obtained after the final π/2 pulse to C = 2| 1| | 2 − 1 = e − φ 2 /2 (20) Figure 14. Experimental method. (a) Pulse sequence for nano-NMR. Firstly a laser pulse polarize NV spin, then a π/2 pulse transfer to superposition state (|0 + |1 )/ √ (2), a train of π pulses is applied to NV spin which flip NV spin with the nuclear spin Larmor frequency. A phase which is related to the interaction between NV spin and nuclear spin is accumulated during π-pulse train while the last π/2 converted the phase to population. (b) Similar pulse sequence with (a) but the NV spin is rotated with Rabi frequency matched with nuclear spin Larmor frequency other than flip with Larmor frequency. (c) The procession of nuclear spin in protocol (a). The bifurcated nuclear spin precession during different path, the nuclear spin will rotate about effective axis depends on the NV spin state. The nuclear spin in the end will effectively rotate roughly parallely or anti-parallely with (x)-axis [181,182]. (d) The procession of nuclear spin in protocol (b).
Notes: The microwave drive NV spin with Rabi frequency equals to Larmor frequency thus bring NV spin resonant with nuclear spin. The population transfer occurs during microwave driving procedure.
The phase φ 2 is made sensitive to specific frequency components by periodically flipping the NV spin by a train of N equidistant π pulses between the initial and final π/2 pulse. This 'quantum lock-in detection' (Figure 13(b)) enhances sensitivity to all fields oscillating synchronously with the pulse spacing τ , while it suppresses the effect of field fluctuations at every other frequency. More precisely where γ = gμ B / is the NV spin's gyromagnetic ratio, ν n = n/Nτ , S B (ν n ) is the power spectral density of magnetic field fluctuations, and the filter function S g (ν n ) is a function sharply peaked around the frequency 1/2τ encoding the effect of the π -pulse train ( Figure 13(d)). Repeating the experiment for varying pulse spacings τ , the entire spectrum S B (ν n ) can be sampled and hence record an NMR spectrum of statistically polarized nuclei in the vicinity of the center. For the strong coupling detection regime, we focus on the possibility to achieve direct flip-flops with unpolarized nuclear spins, that is, independent of the initial state of the nuclear spin. As shown in Figure 14(c), the final electron state wouldn't depend on the nuclear spin polarization state thus fulfil a nuclear spin initial state independent measurement. The sensitivity of this protocol depends critically on the stand-off distance between the NV sensor and target spins, not only because the interaction strength scales inversely with the third power of the separation distance, but also because the signal characteristics change drastically when the interaction strength between NV and nuclear spins exceeds the coupling between target nuclei. In this strong coupling regime, all nuclear spins directly impart phase accumulation on the NV sensor before spin flips between nuclei occurs, which act to randomize the phase accumulation. The result is a √ N enhancement in the signal for detection of N nuclei when compared with the classical case , without requiring sample hyperpolarization. The sensitivity we achieve allows in principle a single, unpolarized nuclear spin to be detected within 10 s [190].
Furthermore the interactions between nuclear spins can be investigated with NV center under dynamical decoupling control. A nuclear-dimer induced modulation on the NV center spin coherence can be observed thus both the interaction within the dimer and between the dimer and the NV center electron spin can be charaterized [204]. The Hamiltonian of the NV center electron spin and the 13 C nuclear spin dimer is [72,179] A i · I i + I 1 · D 12 · I 2 + ω C (I 1,z + I 2,z ). (22) In the strong magnetic field, the dimer dynamics can be described by a pseudospin model, where the two-spin states | ↑↓ and | ↓↑ of the dimer are mapped to the spin-up | ⇑ and spin-down | ⇓ states of the pseudo-spin σ . The dynamics of the pseudo-spin is governed by the Hamiltonian where the component X is the nuclear spin flip-flop rate due to the inter-nuclear spin dipolar coupling D 12 and the component Z (m s ) is due to the hyperfine couplings difference of the two nuclei induced by the nitrogen-vacancy center electron spin state |m s . Correspondingly, the pseudo-spin will precess with frequencies ω (0) ps = X or ω (1) ps = X 2 + [Z (1) ] 2 . When the nitrogen-vacancy center spin is prepared in a superposition state (|m s = 0 + |m s = 1 )/ √ 2, the characteristic frequency of the noise induced by the pseudo-spin becomes ω eff ps = X 2 + [Z (1) /2] 2 . In our experiment, the pseudo-spin precession frequency ω eff ps was measured by dynamical decoupling control [78,85,86] of the nitrogenvacancy center spin.

Brief conclusions
In summary, this work presents a concise review on the field of QIP based on spin systems. Both electron and nuclear spins can be utilized as quantum systems for quantum tasks. Quantum algorithms and quantum simulations based on these spin systems demonstrate major steps toward the realization of ideas and concepts of quantum information science in the laboratory. With the state-of-art power to initialize, manipulate and detect the single NV center, the sensitivity of magnetic resonance has been promoted to the single molecule scale, which opens a door toward molecular-scale magnetic resonance imaging and magnetic resonance spectroscopy.