Cooling a quantum system to its ground state is important for many applications of quantum science and technology. For example, purifying an oscillator or a spin-bath can enhance the sensitivity levels at which it could be detected by a quantum sensor. Likewise, cooling is essential for initializing any quantum device in order to perform various computational or quantum simulation tasks. There have been extensive theoretical studies evaluating the cooling rates for various quantum systems with a focus on the role of bath-coupling spectra and the bath quantum statistics. Limits set by physical conditions, such as low-temperatures and high-magnetic fields are well used in most of the experiments. Further resonant exchange techniques allow for quasi-thermalization of quantum systems, interacting with other systems that are comparatively cold (pure). These are well-explored to polarize spins in organic molecules for magnetic resonance imaging studies and quantum technologies.

Polarization of spin ensembles through Dynamic Nuclear Polarization (DNP) uses resonant exchange interactions like the Hartman Hahn (HH) exchange method1, where in polarization is exchanged between the electron spin and the nuclear spins2,3,4,5. Here, the maximum achievable polarization of the nuclear spins is bounded by that of the electron spin through energy conservation. Alternatively, methods like heat-bath algorithmic cooling (HBAC) can extend this polarization bound, for a subset of nuclear spins. This is achieved by compressing the entropy away from a target subset of spins in the ensemble to the rest and further to the heat-bath. This results in higher polarization for the target spins than the remainder6,7,8.

For HBAC, it is assumed that there is an ensemble of spins or qubits and that universal quantum operations can be applied to them. The goal is to increase the polarization of a subset of spins in the ensemble, which are referred to as the “computation” qubits or spins. This idea was first introduced in ref. 6 for closed systems and proposing to use an entropy compression algorithm to push the entropy away from the target elements to the rest of spins, which are known as the “reset” spins. Later, Boykin et al.9 proposed to use a heat-bath to transfer the compressed entropy out of system. In this setting, after the compression of the entropy, the reset spins, which are now heated up, are cooled down in interaction with a heat-bath. Often, this is the natural spin relaxation process that equilibrates the reset spins, but it can also be actively done through optical pumping or similar techniques in some systems. After the reset spins are cooled down, the process of compression is repeated, making this an iterative process where in each iteration, the entropy is first transferred away from the computation spins and compressed to the reset spins and then the reset spins are reset to their initial state. As only the polarization (diagonal elements) of the reset spins are crucial for the protocol, both coherent and incoherent reset states with similar polarization will lead similar HBAC limit. While for the closed setting, the cooling is limited by the Shannon bound for compression, this restriction can be circumvented in the presence of a heat-bath. However, even in the interaction with the heat-bath, HBAC techniques cannot always fully polarize the target spins. In ref. 10, Schulman et al. showed that it is not always possible to completely purify the target spins and that the achievable cooling is limited. They introduced the partner-pairing algorithm (PPA), for compression which, sorts the diagonal elements of the density matrix of the computation and reset spins. They showed that this is the optimal HBAC technique and also found that it still cannot always reach full polarization for the target spins. Later, Raeisi and Mosca11 showed that PPA asymptotically converges, established the asymptotic state and found the cooling limit of all HBAC techniques. Here, we report the experimental realization of such a cyclic compression technique for entropy by performing a specific set of quantum operations on the spin ensemble8. For the first time, we achieve the theoretical limits established in refs. 10,11 using solid-state spins in diamond.

Single nitrogen-vacancy (NV) centers in diamond can be used as atomic-size magnetometers for detecting nuclear spin ensembles or even single nuclear spins with high sensitivity12. Essentially, it is a prototype central spin system, consisting of a substitutional nitrogen atom and an adjacent vacancy. Its spin triplet (S = 1) ground state can be polarized and read out optically, so that electron spin resonance experiments can be performed on spin ensembles or single spins13. The electron spin associated with the NV center is a very good qubit and at the same time allows control over its immediate nuclear spin environment, e.g., the associated 14N or the 13C nuclear spins in the proximity of the NV center14. In this work, we use these nuclear spins in a single NV center, and a combined usage of the Hartmann–Hahn (HH) and heat-bath algorithmic cooling (HBAC) cooling schemes to demonstrate extended limits of hyperpolarization (see Fig. 1). For this, we will use DNP to provide the seed polarization of the ensemble spins (reset spins), and then, using the quantum operations implementing HBAC, we will push the nuclear polarization of a target spin, beyond the DNP limit. We verify these experimentally by reaching the cooling limit of HBAC. We use a system of three spins to polarize the 14N nuclear spin of the nitrogen-vacancy center in diamond Fig. 1a. We use the electron spin of the NV center both as a source of polarization and for actuation of fast and high-fidelity control of the nuclear spins, hence depicting it as a heat machine for pumping both in and out the entropy from spins. The two carbon spins can be polarized on-demand by the electron spin, and hence could be the polarization source (in HBAC). We label them as “reset qubits” and use the Nitrogen (14N) spin as the single target spin, also known as “computation spin”. With such a labeling, we now have a model system that compares exactly to the ones used for HBAC, and using a technique similar to the ones in refs. 15,16, i.e., repeating a fixed set of operations in subsequent iterations, we will show the asymptotic limit of the computational qubit as a function of the reset polarization. Such cyclic cooling of spins has also been considered to design heat machines in refs. 16,17,18,19. Here, first show numerically that this method converges to the HBAC limit even for inhomogeneous reset spin polarization and verify this in our experiment.

Fig. 1: Schematics of the physical system and the cooling algorithm.
figure 1

a Schematic representation of our physical system, consisting of three nuclear spins (14N, 13C, 13C) and a central electron spin (e), which is shown here as an entropy (heat) pump to which they are coupled. Various quantum gates among the three spins are mediated by the electron. The electron spin acts both as an engine for heat extraction and as a heat-bath to reset the two 13C spins to variable temperatures (polarization). The flow of heat currents are depicted through arrows. b Quantum circuit implemented for HBAC. The power indicates that this is an iteration that is repeated M times. c, d Experimental Quantum circuits for implementing the reset operation, R and Ue in b.



We implement the circuit shown in Fig. 1b, with three nuclear spins viz., one 14N spin and two 13C spins. We choose the 14N as our target nuclear spin to be hyperpolarized. Though the choice of the target qubit is arbitrary, a comparatively faster readout of the 14N allows us to reduce the overall experimental run time14.

The carbon nuclear spins chosen for reset are strongly coupled with the electron spin, allowing for a fast and efficient swap of their polarization with the electron spin. The optically polarizable electron spin itself could serve as a heat-bath, as under optical (laser) pumping, a transition to an electronic excited state (following the spin-orbit selection rules), and through the inter-system crossing relaxes preferentially to one of the spin-ground states. This allows for the entropy dumping of the electron spin state to an electromagnetic (EM) bath13. While the reset of the carbon spins to such a heat-bath should result in an always fully polarized state, additional quantum gates and charge state dynamics of the NV center20 allow us to achieve variable polarization for both the carbon spins, as we show later.

Note that we use the electron spin, which can be optically polarized as an active heat-bath and the two carbon spins as the reset qubits. For the reset process, we implement a swap between the electron spins and the reset qubits. The polarization of the two 13C spins are reset in each iteration of the algorithm, which is depicted here by the R box and its experimental implementation in Fig. 1b. These reset operations are non-unitary gates and are performed via the central NV spin, which we detail later. Mathematically, we take the reset state of the the two carbon spins to be

$${\rho }_{{C}_{1,2}}=\frac{1}{Z}\left(\begin{array}{ll}{e}^{{\epsilon }_{1,2}}&0\\ 0&{e}^{-{\epsilon }_{1,2}}\end{array}\right),$$

where ϵ1,2 are the exponential polarization of the two Carbons and \(Z\equiv \cosh {\epsilon }_{1,2}\), is a normalization constant. We distinguish the exponential polarization, ϵ, from the common notation of polarization, \({P}_{{C}_{1,2}}\equiv \tanh {\epsilon }_{1,2}\). For the rest of this paper, we evaluate P as it is directly accessible in experiments through the NV spin-state readout.

When the circuit in Fig. 1b, is repeated, the target spin polarization grows and saturates to a value higher than the reset polarizations of the other two spins. We represent the final asymptotic state of the target spin with

$${\rho }_{{\mathrm{f}}}=\frac{1}{{Z}_{{\mathrm{f}}}}\left(\begin{array}{ll}{e}^{{\epsilon }_{{\mathrm{max}}}}&0\\ 0&{e}^{-{\epsilon }_{{\mathrm{max}}}}\end{array}\right),$$

with Zf as the normalization factor. For the simple case of our three-qubit system, we can analytically calculate the asymptotic state of the 14N spin and show that it converges to the HBAC limit. The limit of HBAC for the exponential polarization, with reset polarizations ϵ1,2 is given by

$${\epsilon }_{{\mathrm{max}}}={2}^{n-1}({\epsilon }_{1}+{\epsilon }_{2}),$$

where n is the number of computation qubits11. For our experiment, n = 1. We start by describing our method of cooling and then present our results and compare them with PPA and the cooling limit of HBAC. We conclude with a brief discussion of the experiment and an outlook that extends HBAC protocol for pure states and for non-ideal quantum gates.

Theoretical bounds

The entropy compression is done by the repeated application of Ue (shown in Fig. 1b), which only swaps the \(\left|100\right\rangle\) and \(\left|011\right\rangle\), i.e., the target spin is flipped only when the states of the other two qubits are identical and dissimilar from the target spin state. Using this simple operation repetitively, one can analytically show that the asymptotic limit for polarization of the target spin with two reset spins (\({P}_{{C}_{1,2}}\)) is given by


where the relation to their exponential polarization is simply given by \({P}_{{\mathrm{max}}}=\tanh ({\epsilon }_{1}+{\epsilon }_{2})\), \({P}_{{C}_{i}}=\tanh ({\epsilon }_{i})\). The result can be extended to the general case of n reset spins (see Methods), and for three reset spins, this asymptotic limit simplifies to \({P}_{{\mathrm{max}}}=\frac{{P}_{{C}_{1}}+{P}_{{C}_{2}}+{P}_{{C}_{3}}+{P}_{{C}_{1}}{P}_{{C}_{2}}{P}_{{C}_{3}}}{1+{P}_{{C}_{1}}{P}_{{C}_{2}}+{P}_{{C}_{2}}{P}_{{C}_{3}}+{P}_{{C}_{1}}{P}_{{C}_{3}}}\). Further, in Fig. 2, we compare the polarization build-up of the target spin in our method to PPA with single- and two-qubit reset. For the single-qubit-reset PPA, only one spin is reset and we assume that it is reset to ϵ1 > ϵ2. For the top plot in Fig. 2, we take the reset polarizations of both carbons to be \({P}_{{C}_{1},{C}_{2}}=0.2\), whereas for the second plot, we set the reset polarization of the second qubit to \({P}_{{C}_{2}}=0.1\) and of the third qubit to \({P}_{{C}_{1}}=0.3\). Note that PPA with single-qubit reset can achieve higher polarization, compared to two-qubit-reset PPA. This is because with the one-qubit-reset, naively one can first swap the polarization to the second qubit and reset the reset qubit again, which would effectively result in \({P}_{{C}_{1}}={P}_{{C}_{2}}=0.3\).

Fig. 2: Theoretical simulation and comparison.
figure 2

Theoretical comparison between the PPA and our method (see Fig. 1). The plots show how the polarization of the target spin would improve as more iterations are implemented. For the top plot, the initial polarization of the two reset spins are \({P}_{{C}_{1}}={P}_{{C}_{2}}=0.2\) (top) and \({P}_{{C}_{1}}=0.3\), \({P}_{{C}_{2}}=0.1\) (bottom).

We now experimentally obtain the limit given in Eq. (3) for a single nitrogen spin by repeating the circuit given in Fig. 1d, 25 times, with the first qubit in the circuit being the nitrogen and the second and the third being the carbon spins. The results are shown in Fig. 3a, where we include the ideal theoretical limit from ref. 11 in our plots for comparison.

Fig. 3: Experimental cyclic cooling and HBAC saturation limit.
figure 3

a The hyperpolarization of 14N spins for varying reset polarizations on the two 13C nuclear spins is shown here. The experimental data is compared with the theoretical simulations and the ideal HBAC saturation limit. The shaded area indicates the error bar incurred in the single-shot readout of the 14N spin (see Methods). (Inset) The inset shows the ratio of experimental polarization of the 14N, PN with the ideal HBAC limit Pmax. b The initial polarization of two 13C spins obtained by varying the rotation angle \(\theta =\arctan (\alpha /\beta )\). c The quantum circuit employed for arbitrary initialization used in a. c 3D plot showing the experimentally measured hyperpolarizaiton of the 14N over the polarization space of the two 13C spins. The error bar for each data point is ~3% (see Methods) and is not explicitly shown in the plot. On top we show the quantum circuit used to achieve arbitrary reset polarization for the 13C spins.

Experimental HBAC

The experiments were carried out at room temperature on a home-built confocal microscope setup using a a type IIa CVD grown diamond crystal (layer) that has [100] surface orientation and a 13C concentration of 0.2%. The NVC is located ~15 μm below the diamond surface and a solid immersion lens has been carved around it via focused ion beam milling. A coplanar waveguide for microwave (MW) and RF excitation made from copper is fabricated onto the diamond via optical lithography. An external static magnetic field of ~540 mT from a permanent magnet is aligned along the symmetry axis of the NV center (z-axis). A 532 nm light is focused onto the NV by an oil immersion objective, which also collects light from the diamond. The fluorescence light of the NV is isolated by spatial and spectral filtering and finally detected with a single-photon counting detector. Optical excitation of the NV center polarizes the electron spin triplet (S = 1) into its mS = 0 state, which forms the key element in the reset step shown in Fig. 1b, and the source of spin polarization in the experiment.

Owing to the weak coupling among the nuclear spins, the quantum gates between the nuclear spins, required for HBAC in Fig. 1b, cannot be directly performed. These gates are mediated by the electron spin, which is why the electron spin is actively involved in the dynamics, Fig. 1d, in addition to being the polarization source for the carbon spins. The coupling of the NV electron to the surrounding nuclear spins is dominant along its symmetry (z) axis14. The 14N spin and the two nearest 13C spins of the lattice chosen for our experiments, are coupled the NV spin with strengths −2.16 MHz, 90 kHz, and 414 kHz, respectively. While the two 13C spins are spin-1/2 systems, the 14N is a spin-1 system with population distributed among the triplet levels mI = + 1, 0, − 1, respectively. Hence, we choose a two-level subspace (TLS) formed by the \(\left|+1\right\rangle ,\left|0\right\rangle\) states of the 14N for our analysis, and renormalize their population with respect to the third level \(\left|-1\right\rangle\), such that the total population in the two-level subspace (TLS) is unity. The spin polarization is then directly measured by the population difference PN = P1 − P0 within this effective TLS, as shown in Fig. 3.

We transfer the optical spin polarization of the central (NV)-spin to the two 13C spins via SWAP gate, which involves four conditional-NOT gates as shown in Fig. 1c. In the experiments, a nuclear spin reset (repolarization) is performed with a fidelity that is much higher than the total fidelity of the quantum circuit shown in Fig. 1d. This allows us to explore the whole polarization space (P) in HBAC. The three nuclear spins used in the experiments do not interact and thus, each non-local gate performed among them needs to be mediated by the electron spin. Thus, unlike the reset operation, nuclear–nuclear swap gates occur via involvement of the electron spin and hence, suffer from electron T2 decay, which is on the order of 500 μs for this specific NV center21. This lowers the fidelity of the swap operation and the required time is at least as long as compared to a reset of any nuclear spin.

We decompose Ue to three Toffoli gates that are further decomposed into CnNOTe gates. Such gates have been earlier used in14 for entangling nuclear spins. We use the optimal control platform DYNAMO22 to realize fast electron spin (2π) rotations shown in Fig. 1d. As the individual hyperfine transitions are inhomogeneously broadened to approximately 35 kHz, it drastically complicates the implementation of electron spin gates required to have a spectral resolution better than 90 kHz (the Azz coupling of the weakest coupled nuclear spin)21. Hence, implementing electron spin rotations using shaped MW pulses, obtained from the optimization with DYNAMO, is key for our experiment14. The optimized pulses used here can avoid cross-talk between the individual electron hyperfine transitions even in a dense spectrum. The optimized Ue gate and the reset of the 13C spins is then iterated until the 14N polarization PN saturates, which we show in Fig. 3a. With the limitation from the decoherence time of the electron spin, and the decoherence induced by the electron optical excitation on the nuclear spins, the fidelity of the Ue gates will eventually deteriorate with increasing number of iterations. The dephasing and relaxation times of the electron and nuclear spins involved in our experiment are14, T2e ≈ 500 μs, and T2n ≈ 8.5 ms, and the relaxation time of the nuclear spins T1n ~ 1s. With these numbers, we could safely perform ~50 − 60 iterations of the HBAC algorithm with high-fidelity (>2/3), which would allow the experimentally observed saturation of the polarization (see Methods).

Variable reset polarization

In the final part of our experiments, we use the ability to arbitrarily polarize the two reset spins to varying degrees, and study the polarization gain of the 14N spin, as shown in Fig. 3c. One could see from the inset of Fig. 3(a) that the experimental polarization slightly exceeds the ideal limit. This could arise from the imperfect depolarization of the reset spins after each iteration and before they are reset to their actual value. Owing to the imperfect depolarization of the SWAP operation shown in Fig. 3c, we find that the 13C spins get slightly more polarized than expected, thus leading to a higher final PN limiting value. Also note that the experimental result saturates more slowly than the predicted ideal cooling (dotted dashed lines). This is because the implementation of the compression Ue is not perfect and it cannot extract as much entropy as the ideal process predicts. Spin relaxation could also contribute to the slower saturation of the experiment results.


In the iterative-cooling achieved here using HBAC, both the quantum states and quantum gates, operate on the diagonal elements of the total density matrix, making the cooling process appear classical. To explore the connection between the polarization and coherences of the reset and computational qubits on the asymptotic dynamics of the three-qubit system, we carefully analyze the role of coherences in HBAC by considering the following scenario, where reset qubits are on-demand reset to pure coherent states. By using the cooling algorithm, we find that the asymptotic state of the target qubit under HBAC also converges to a pure state with the desired polarization amplification alongside the coherences (off-diagonal elements) that make the state pure. It can be shown analytically that when the reset qubits are always initialized to the state \({\left|\psi \right\rangle }_{R}=\alpha \left|0\right\rangle +\beta \left|1\right\rangle\) (\({\alpha }^{2}+{\beta }^{2}=1,\,\alpha ,\beta \in {\mathcal{R}}\)), the asymptotic state of the target qubit is

$$\left|{\psi }_{T}\right\rangle \to \sqrt{{{\Gamma }}}\left|0\right\rangle +\sqrt{1-{{\Gamma }}}\left|1\right\rangle ,\,\,{{\Gamma }}=\frac{{\alpha }^{4}}{{\alpha }^{4}+{\beta }^{4}}.$$

This state has polarization enhancement similar to the HBAC bound given in Eq. (3), and enhanced coherence (see Fig. 4a).

Fig. 4: Effects of coherence and imperfections on HBAC.
figure 4

a Gain in the polarizations of the target computation qubit \({P}_{T}^{z},\,{P}_{T}^{x}\) with increasing iterations of the algorithm, for reset spin polarizations: \({P}_{R}^{z}=0.198\), and \({P}_{R}^{x}\equiv =0.4661\). b The relative enhancement of the target spin polarization with N = 10 reset spins, and the HBAC operations performed through noisy pulses. (Inset) The schematic representation of the noisy pulse sequence. The dimensionless width, ΔE parametrizes the level of noise, and ΔE = 0, corresponds to the ideal HBAC gate (see text for details).

With the ability to polarize the reset spins to varying degrees, we have benchmarked our implementation of HBAC for purification and polarization of the nuclear spins. The main requirement for using this method is that the spins in the system can be individually controlled and that the relaxation time of the target elements is long enough compared to the HBAC process. While the NV-based electron-nuclear spin system employed here is a good model system accommodating both of these requirements, it can also be implemented in other solid-state systems to boost the polarization of a target spin system. Furthermore, the achievable polarization would increase exponentially with employing more computation and reset spins.

To experimentally verify the HBAC bound with N-reset qubits, the key requirement is to perform the Ue gate that SWAPS the states \(\left|{0}_{C}{1}_{R}{1}_{R}\cdots {1}_{R}\right\rangle \to \left|{1}_{C}{0}_{R}{0}_{R}\cdots {0}_{R}\right\rangle\). With the increasing density of the reset qubits (13C nuclear spins in our experiment), the individual spins are not resolvable anymore, and the controlled gates shown in Fig. 1b, can only be performed over degenerate subspaces (energy bands ΔE), rather on single-energy eigenvalues. As a consequence, one can only achieve an incoherent transition of the form \(\left|{1}_{C}\right\rangle \left\langle {1}_{C}\right|\otimes {\sum }_{k}\left|{\psi }_{k}\right\rangle \left\langle {\psi }_{k}\right|\to \left|{0}_{C}\right\rangle \left\langle {0}_{C}\right|\otimes {\sum }_{k}\left|{\psi }_{k}^{\perp }\right\rangle \left\langle {\psi }_{k}^{\perp }\right|\), where \(\left|{\psi }_{k}\right\rangle\) are the eigenstates corresponding to the energy band ΔE, and \(\left|{\psi }_{k}^{\perp }\right\rangle =({S}^{x}\otimes {S}^{x}\otimes \cdots {S}^{x})\left|{\psi }_{k}\right\rangle\), where Sx is the Pauli operator. Even, with such a noisy operation, we find that polarization amplification could be achieved as shown in Fig. 4b. As we increase the energy band ΔE, i.e., transition among more basis states of the total reset spin-bath, the amplification is reduced and the target spin remains unaffected in the extreme limit when the flip over all the levels is considered. Experimentally, ΔE is determined by the density of lines in the Optically detected Magnetic Resonance spectrum (or from dynamical decoupling). For example in Fig. 4b, we have used ten reset spins, and the total number of basis states is 210. By increasing ΔE we allow for more transitions among these basis states (due to the inability to resolve them energetically), and we find a decreasing performance of the HBAC. In the extreme limit where all the transitions are allowed, we just perform individual flip operations on the computational and reset spins, and hence their polarization’s should remain unaffected. We envisage that such a general feature would allow practical usage of HBAC in situations where a target subset of spins in the molecules external to diamond needs to be polarized for high signal-to-noise (SNR)23.

In conclusion, we have experimentally implemented HBAC for three spins and reached the cooling limit of HBAC for this system. With 25 iterations, the nitrogen spin reaches the maximum polarization, (see Eq. (4)) the expected cooling limit of HBAC. We also find that the polarization of the 14N fluctuates around the cooling limit and in some cases, it even exceeds the limit. While this could be attributed to the correlations between spins in the bath and the system24 that arise due to imperfections in Ue, further experiments are required to investigate this and to benchmark the role of such correlations on the cooling limit of HBAC25,26.

In our experiments, commonly the initialization of the 14N nuclear spin is done first by the polarization transfer from the electron spin, followed by the projective readout. While, this approach achieves high-fidelity initialization (99%), the 30% fail cases of polarization transfer due to the NV0 charge state is compensated by multiple iterations of the transfer circuit14. On the contrary, we here first generate a polarized spin-bath from which the 14N nuclear spin obtains its polarization. While the comparison of both the approaches is not straightforward, clear advantage arises when HBAC is realized using one computational qubit and a large spin ensemble. As we have recently shown the possibility to polarize a spin ensemble (~105 spins) external to diamond27, now using HBAC, the target spin could achieve near unit polarization, even without the need for resetting the bath spins. Further, the chemical shift sensitivity achieved by the NV centers (at the nanoscale)23 when combined with methods like HBAC could help to improve the SNR in nuclear magnetic resonance experiments. For example, using NV mediated gates between various chemically selective protons (e.g., in polybutadiene), one could enhance the amplitude of a target Fourier peak by squeezing in the polarization from other protons. We envisage that such hybrid methods, could open vistas in resolution imaging alongside precision sensing and also for applications in ensemble quantum technologies.


Error analysis

In the experiment, the observed polarization of the 14N spin is readout through the single-shot readout method established earlier in ref. 14. The fidelity depends on the ability to distinguish the two spin states, which in our case is ~97%. Further, the statistical error is negligible in our experiments, as each data point is averaged for over >104 single-shot readout rounds. Hence, our observed polarization results shown in Fig. 3a suffer from an error bar of ~3% for each data point.

The other error that could corrupt our results is initialization error of the reset spins. Various factors that effect this initialization error are: (i) The transferable electron polarization is not complete with a single-SWAP gate. (ii) All gate operations involved in a sequence have a certain gate fidelity, which is determined by spin decay during the gate duration and the spectral selectivity of the pulses. The electron spin gates need to be spectrally selective in a very dense electron hyperfine spectrum14. (iii) Spin transfer sequence relies on the nuclear spin-state-selective electron spin driving, which has no effect when the NV center is in charge state NV0. The NV- charge state has an electron triplet (S = 1), while the NV0 charge state has an electron doublet (spin-1/2) . Consequentially, ~30% of all polarization transfer attempts fail completely14. Hence to achieve perfect initialization of the reset spins, the SWAP gate used to transfer the polarization from the electron to carbon is iterated few times to achieve the maximum possible transfer. We then benchmark the ability to initialize the three spin system into various states, whose fidelity we tabulate below.

We tackle the above three error process, by (i) using a repetitive SWAP gate14, we could reach the nuclear spin initialization fidelity to ~99%. In our experiment, we use 25 repetitions of the SWAP that almost saturates the polarization transfer, even in the presence of NV0 charge state dynamics. In our experiments all our gates are optimized using the optimal control package DYNAMO14 to avoid such the cross-talk errors, and other pulse errors. While the initialization error of the reset spin could affect the experimental HBAC limit, the readout error of the 14N nuclear spin still gives the dominant error contribution, as the reset spin initialization fidelity is much higher than the single-shot readout error.

Maximum number of iterations

In our experiment, implementing the HBAC algorithm involves three Toffoli gates as shown in Fig. 1b, and is implemented in three parts using the controlled gates as shown in Fig. 1d. The typical gate times for the electron-controlled gates on the nuclear spins is in the 50 μs, and the nuclear spin-controlled gates on the electron spins in the ~28 μs. This adds up to ~285 μs for the implementation of the three-qubit gate that performs the transformation \(\left|011\right\rangle \leftrightarrow \left|100\right\rangle\). In addition we initialize both the reset spins in each iteration, and the time taken to reset both of them are different, due to their coupling, which changes the gate timings. The actual polarization transfer part of the sequence consists of a 80 μs laser pulse for electron reset, a nuclear spin-controlled electron π-pulse (6/20 μs for 13C1/13C2) and an electron spin-controlled nuclear spin rotation of variable duration (~100 μs). To increase the nuclear spin polarization, the polarization transfer part can repeated k times, which in our experiment is k = 25. Hence, the nuclear spin initialization takes ~5 ms. In total, with additional resetting of the electron spin after the 13C initializations, each iteration takes ~6 ms. While the clear limiting factor is the spin-relaxation time of the 13C spins, which is ~1s, to achieve a fidelity of atleast 2/3, we are limited by ~50−60 iterations of the algorithm.

Saturation limits

While, the HBAC limit have been obtained conventionally in the low-polarization (ϵ) limit, getting the exact analytical expression for any ϵ can be easily obtained from the nature of the gate. The general N-qubit gate that leads to the desired polarization amplification of the computational qubit is simply the Toffoli gate: \(\left|{0}_{C}{1}_{R}{1}_{R}\cdots {1}_{R}\right\rangle \leftrightarrow \left|{1}_{C}{0}_{R}{0}_{R}\cdots {0}_{R}\right\rangle\). This gate clearly, swap’s the population between the computational qubit with the single-subspace corresponding \(\langle {S}_{R}^{Z}\rangle =\pm N/2\), of the reset spins. Applying this to we find


where AR = ∏k(1 + PR,k) and BR = ∏k(1 − PR,k). This is also marks the key advantage when resetting the qubits to a pure state \({\left|\psi \right\rangle }_{R}=\frac{1}{\sqrt{2}}[\left|0\right\rangle +{{\rm{e}}}^{i\phi }\left|1\right\rangle ]\). Here the conventional HBAC has no role to play as the polarization (population difference) is zero. However, as we have argued above the Ue gate could also enhance the coherence, i.e., the polarization in the x- and y-basis also gets amplified alongside the z-polarization (Fig. 4a). We find that the coherence of the target computational qubit along the x-direction is modified as \(\langle {S}_{T}^{x}\rangle =\cos 2\phi\), in comparison to the reset qubit that has \(\langle {S}_{R}^{x}\rangle =\cos \phi\). Similarly for N-reset qubits \(\langle {S}_{T}^{x}\rangle =\cos N\phi\), and the cohernece along the y-direction is given by \(\langle {S}_{T}^{y}\rangle =\frac{1}{{2}^{N}-1}\sin N\phi\). While we improve the sensitivity of the measurement of the transverse polarization (\(\langle {S}_{T}^{x}\rangle\)) to the reset qubit phase we do not enhance the coherence itself, as \({\left|\psi \right\rangle }_{R}\) is already maximally coherent.