Pulse control protocols for preserving coherence in dipolar-coupled nuclear spin baths

Coherence of solid state spin qubits is limited by decoherence and random fluctuations in the spin bath environment. Here we develop spin bath control sequences which simultaneously suppress the fluctuations arising from intrabath interactions and inhomogeneity. Experiments on neutral self-assembled quantum dots yield up to a five-fold increase in coherence of a bare nuclear spin bath. Numerical simulations agree with experiments and reveal emergent thermodynamic behaviour where fluctuations are ultimately caused by irreversible conversion of coherence into many-body quantum entanglement. Simulations show that for homogeneous spin baths our sequences are efficient with non-ideal control pulses, while inhomogeneous bath coherence is inherently limited even under ideal-pulse control, especially for strongly correlated spin-9/2 baths. These results highlight the limitations of self-assembled quantum dots and advantages of strain-free dots, where our sequences can be used to control the fluctuations of a homogeneous nuclear spin bath and potentially improve electron spin qubit coherence.


Supplementary Note 1. DESIGN OF PULSE SEQUENCES USING AVERAGE HAMILTONIAN THEORY
Average Hamiltonian theory (AHT) is an established tool for the theoretical characterisation and analysis of pulse sequences for magnetic resonance spin control [1][2][3] . Within certain constraints it allows the time evolution of a given spin Hamiltonian under interaction with a periodic timedependent external magnetic field to be approximated. We use AHT to determine how well a frequency offset Hamiltonian H z 0 (arising from inhomogeneous resonance broadening) and a dipolar coupling term H zz d can be suppressed simultaneously by the CHASE sequences introduced in the main text.
To this end, we consider a nuclear spin ensemble I i with spin 1/2. The evolution of the wavefunction ψ(t) describing the state of the nuclear spin bath is determined by the Schrödinger equation: where the Hamiltonian H(t) is the sum of the Larmor termĤ L describing interaction of the spins with a static magnetic field B z along theê z axis, the offset term H z 0 describing static resonance frequency shifts, the dipolar term H zz d describing nuclear-nuclear spin interaction and the radiofrequency (rf) term H rf (t) describing the effect of the oscillating magnetic field inducing nuclear magnetic resonance.
We use transformation into the frame rotating around the direction of the static magnetic field (ê z axis) at the radio-frequency. In this way the effect of the static magnetic field is eliminated (H z L = 0) and the oscillating rf field becomes static (see Section 5.5 in Ref. 4 ). The explicit time dependence in H rf (t) is then only due to the pulsed nature of the rf field.
The individual terms are explicitly defined as H rf (t) = −hν rf (t) In the studied quantum dots (QDs) the resonance offset term H z 0 is dominated by the inhomogeneous static quadrupolar frequency shifts (∆ν i for the i-th nuclear spin), although in other systems ∆ν i could also include different static frequency offsets such as chemical shifts or magnetic field gradients. In addition, we consider a truncated dipolar coupling term H zz d with coupling strength between two spins I i and I j . Here, µ 0 = 4π · 10 −7 N A −2 is the magnetic constant, γ is the nuclear gyromagnetic ratio, and r denotes the length of the vector connecting the two spins, which forms angle θ with theê z axis.
Interaction with resonant rf pulses is described by the time-dependent term H rf (t) where the field amplitude ν rf (t) = ν 0 during a pulse and ν rf (t) = 0 otherwise. The spin operator I ϕ determines the in-plane rotation axis about which the spin bath precesses under the rf field with a given phase ϕ: Here, we want to study the spin bath evolution under the internal static terms H int = H z 0 + H zz We write the total time-evolution operator as with Dyson time-ordering operator T and where we introduced the toggling frame Hamiltoniañ While an exact solution for Eq. (10) is generally challenging to find, an approximate description of the spin bath evolution at times t = n · t c can be found if conditions (i)-(iii) are fulfilled. In this case, we can apply a Magnus expansion to replace the expression of Eq.
with leading order termsH H (2) = 1 6t c 2 The contributions of higher order AHT terms toH scale as t k c Γ k+1 forH (k) , with free coherence decay rate Γ ∝ 1/T * 2 ∝ ∆ν 2 i . We thus see that in the limit of n → ∞ cycles and cycle time t c → 0, only the zeroth order termH (0) remains. However, in practice, higher order contributions are rarely negligible, making e.g. longer solid echo sequences such as MREV 5,6 and BR-24 3 more efficient than the shorter WAHUHA cycle 7 in many applications.
We calculate the average Hamiltonian for a spin bath interacting with a given pulse sequence as described by equations (2)-(5) using Wolfram Mathematica software with the freely-available noncommutative algebra package NCAlgebra 8 . For the zeroth order average Hamiltonian, we consider finite pulse durations where t π is the time required for a π-rotation. In this case, the cycle time t c is given by the sum of pulse times and pulse-to-pulse delays τ . First and second order terms are only calculated in the limit of infinitely short rf pulses t π → 0.
The AHT terms we obtain for the CHASE sequences presented in the main text are listed in Supplementary   represent positive (negative) π/2 rotations around the respective axes, x 2 , y 2 , −x 2 , −y 2 stand for the π rotations, while τ and 2τ are the free evolution intervals. Zeroth order terms are calculated assuming finite pulse duration t π whereas t π → 0 is assumed for higher order terms. Unlisted termsH CHASE-34 {τ ,-x,τ ,-y,τ ,-x 2 ,τ ,-y,τ ,x,τ ,x,τ ,x,τ ,-y,τ ,-x 2 ,τ ,-y,τ ,-x,τ ,-x,τ ,-y,τ ,-x,τ ,-x 2 ,τ ,x,τ ,-y,2τ , y,τ ,-x,τ ,x 2 ,τ ,x,τ ,y,τ ,x,τ ,x,τ ,y,τ ,x 2 ,τ ,y,τ ,-x,τ ,-x,τ ,-x,τ ,y,τ ,x 2 ,τ ,y,τ ,x,τ } As discussed in the main text, we see that CHASE-5 has a non-vanishing zeroth order contribution if the pulse duration t π is non-negligible. In order to suppress spin bath dynamics using cycles of CHASE-5, it is therefore crucial to minimise the ratio t π /t c . The subsequent longer sequences are insensitive to finite pulse durations in zeroth order and leave progressively fewer higher order AHT terms in the t π → 0 limit. CHASE-34 forms an exception to this behaviour. While most efficient in suppressing the spin dynamics under ideal conditions, this cycle is also prone to finite-duration pulse effects as the zeroth order resonance offset (H x -y y -x -x -y y x x -y y y -x -x -y y x x -y y -x -x -y y x 2 For comparison, we also calculate the AHT terms of alternative sequences from literature which have been proposed or used with the aim of suppressing both dipolar coupling and frequency offset terms. These results are listed separately in Supplementary Table 2. The MS-7 pulse cycle 9 ( Supplementary Fig. 1b) yields average Hamiltonians identical to those of CHASE-5 in the short pulse limit. Its extension 10 to MS-12 ( Supplementary Fig. 1c) removes oddorder AHT terms owing to its symmetry properties. However, unlike the longer CHASE sequences it is not robust against decoherence in case of a finite pulse duration t π . Supplementary The intuitive approach of alternating MREV cycles with π-pulses (MKL-68, Supplementary The extended nuclear spin polarisation decay times we observe in Fig. 3a-c of the main text under phase-alternated Carr-Purcell sequences (CP-X) are attributed to a form of pulsed spin locking described theoretically by Li et al. 12 This spin locking mechanism arises due to dipolar evolution during the non-negligible π-pulse duration t π . As shown by the authors, in this limit application of average Hamiltonian theory yields for a cycle (−τ − π x − 2τ − π −x − τ −). The static term ∝ H y 0 in equation (19) is subsequently removed by transformation into a second toggling frame where we time-average over a Rabi cycle in its effective field. The twice averaged Hamiltonian is As the initial (π/2) x pulse of the CP-X sequence prepares the spin bath in the state I y which commutes with H yy d , the magnetisation is preserved or 'locked' and no spin echo decay is predicted in zeroth order. Li et al. also examined the cases of fixed-phase CP-X as well as CP-Y with and without phase-alternation and found that, in agreement with our experimental results, no such effect is predicted for the CP-Y sequence tested in the current work 12 .
Alternative mechanisms leading to prolonged coherence times under CP-X have been suggested by other authors 13,14 . However, we can confidently link our experimental observation to the pulsed spin locking mechanism outlined above. A key assumption in the transition to the second toggling frame is that the spin bath evolves slowly under the Hamiltonian (4τ H zz d − t π H xx d ) /t c over the relevant timescale set by the Rabi frequency Ω = 4tπ∆ν i πtc (c.f. condition (iii) for applicability of AHT in Supplementary Note 1). Hence we expect a strong dependence of the spin locking efficiency on the pulse-to-cycle time ratio t π /t c ∈ [0, 0.5], where t π /t c → 0 in the limit of infinitely short pulses and t π /t c → 0.5 in the limit of continuous rf excitation.
In Fig. 2a-c of the main text we show the nuclear spin polarisation decay as a function of the free evolution time for a fixed number of pulses and varying pulse spacings τ . In order to verify the dependence of spin locking on the pulse-to-cycle ratio, we now replot this experimental data as a function of the π-pulse number for different fixed pulse-to-cycle ratios. Supplementary Fig. 2 shows that the spin locking efficiency is noticeably reduced for t π /t c 10% and the Hahn echo decay (red solid line) is fully restored for t π /t c 0.5%.
The central transitions (CTs) of the half-integer quadrupolar nuclear spins in a self-assembled QD are typically inhomogeneously broadened to ∆ν inh ∼ 10 − 40 kHz by the strain induced electric field gradients 15 . In order to apply pulse sequences uniformly to the CTs of all the nuclei, we need to ensure that rf pulses are sufficiently broadband ('hard'). In other words the pulse amplitude should be large enough to perform the desired π/2-or π-rotation even for spins I in the tails of the inhomogeneously broadened transition spectrum where the rf excitation can have a resonance offset ∆ν i 10 kHz. It is often assumed implicitly that this hard pulse condition is fulfilled.
However, while this is readily achievable for small pulse numbers (for a single pulse we require T Rabi 2/∆ν inh ≈ 25 µs), the hard pulse condition is increasingly difficult to meet for longer sequences. We consider the Bloch equations of motion in the rotating frame of a static magnetic describing the evolution of magnetisation M = i γI i under an angular velocity vector Ω = (Ω rf cos ϕ, Ω rf sin ϕ, 2π∆ν i ) T and with relaxation rate Γ = (T −1 2 , T −1 2 , T −1 1 ) T and equilibrium magnetisation M 0 . Here, Ω rf = 2π/T Rabi is the resonant Rabi frequency. We see that even a small resonance offset ∆ν i results in a tilt of Ω towards theê z axis. As a consequence, an rf pulse of duration T Rabi and carrier phase ϕ will no longer result in a perfect 2π-rotation of the magnetisation M about Ω. Instead, a small rotation angle error is introduced, which can rapidly lead to non-negligible effects as the errors of subsequent pulses add up. In practice, this is reflected in a loss of NMR signal amplitude after a pulse sequence even in the limit of short free evolution as the contribution of spins with large ∆ν i to the measured final ensemble magnetisation is reduced.
We consider this effect numerically for the 71 Ga and 75 As nuclear spin bath ensembles studied in this work. To quantify the 'hardness' (frequency bandwidth) over which a given pulse sequence is stable against resonance offsets, we calculate the evolution of a magnetisation vector M under the sequence including initialisation and readout π/2-pulses as a function of ∆ν. In order to keep our results as general as possible, we rewrite the resonance offset in terms of the inverse resonant Rabi period as δ = ∆νT Rabi . We can then describe the resulting rotation axis asê Ω = (1 + δ 2 ) −1/2 (cos ϕ, sin ϕ, −δ) T . For simplicity, our model does not consider any spin relaxation or dephasing (e.g. through dipolar interaction) and we set T 1 = T 2 = ∞.  The desired performance is characterized by M z /M z (0) ≈ 1 over a wide range of offsets δ. In this respect, we note that the CP-X cycle ( Supplementary Fig. 3a) is very robust against frequency offsets: even at large cycle numbers, the magnetisation vector is largely restored over a broad range of the offset frequencies. In practice, this means that we can expect a stable NMR echo amplitude at short evolution times independent of the number of applied π-pulses (as long as additional pulse calibration errors are negligible). This expected behaviour is shown in Supplementary Fig. 3c: here, we calculate the expected experimental echo amplitude from a weighted average of the normalised final magnetisation over the respective 71 Ga and 75 As NMR spectra for different cycle numbers n. In agreement with the experimental data shown in Fig. 3d-f of the main text, the CP-X signal amplitude (solid symbols) is stable. By contrast, we note from Supplementary Fig. 3b,c that the bandwidth within which the CP-Y sequence can restore the initial magnetisation rapidly narrows with increasing cycle number n. Again, this is in agreement with the experimental observation in respectively. We note that most sequences have a similar 'hard pulse' bandwidth under both initialisation pulse conditions. Overall, all of the sequences presented are more stable against resonance offsets than the CP-Y sequence studied in the main text. However, the broadband performance of the CP-X sequence ( Supplementary Fig. 3a) remains higher than that of any CHASE cycle. This is in qualitative agreement with our experimental results (compare Fig. 3d-f of the main text).
Additionally, we see that multiple cycles of CHASE-X/Y-20 reduce the offset tolerance to some extent ( Supplementary Fig. 4c,d). This is confirmed experimentally, as the echo amplitude of the spectrally broader 75 As ensemble is noticeably reduced with increasing cycle number in Fig. 3e of the main text.
In summary, the reduced NMR echo amplitudes at short free evolution times observed in the experiments can be reproduced qualitatively using a simple Bloch model. We conclude that such echo amplitude reduction is not a fundamental limitation of the various pulse cycles we study, but can be attributed to 'soft' rf pulses which for a given spectral broadening of the spin bath can in principle be avoided by using higher rf excitation powers. Alternatively, more advanced NMR techniques such as composite pulses could be implemented in future experiments to increase the 'hardness' of the applied pulses 16,17 . This effect needs to be distinguished from the reduction of the spin coherence times T 2 observed in strongly inhomogeneous spin baths under multiple cycles of CHASE, which occurs even under ideal (infinitely fast) rotations.

Supplementary Note 4. NUMERICAL SIMULATION OF THE NUCLEAR SPIN EVOLUTION UNDER PULSED RADIOFREQUENCY MANIPULATION
In this Note we describe the details of the numerical simulation of the quantum mechanical evolution dynamics of the interacting nuclear spin bath.

The model
We consider once again the model introduced in Supplementary Note 1, where the evolution of the wavefunction ψ(t) describing the state of the nuclear spin bath in the rotating frame of an external magnetic field B z is determined by: As before, the Hamiltonian H(t) is composed of a term H z 0 describing here quadrupolar interaction with electric field gradients, a nuclear dipolar coupling term H zz d and a radio-frequency (rf) term H rf (t).
We consider half-integer spins I and simulate evolution only of the I z = ±1/2 subspace corresponding to the NMR experiments on the central transition. The effect of the quadrupolar interaction (more specifically of its second order term) on the I z = ±1/2 manifold is equivalent to an additional magnetic field that changes the Larmor frequency of the i-th nucleus by ∆ν i . The quadrupolar term can then be written explicitly as: where the summation goes over all N nuclei.
We consider the case of high magnetic field (significantly larger than the local dipolar field), so that the nuclear-nuclear interaction is described by the truncated dipole-dipole Hamiltonian: where µ 0 = 4π × 10 −7 N A −2 is the magnetic constant, γ is the nuclear gyromagnetic ratio, (x i,j , y i,j , z i,j ) is the vector connecting spins i and j and the summation goes over all pairs of non-identical nuclei. We ignore here any possible contributions from pseudo-dipolar or exchange interactions.
The effect of the rf field is described by: where parameters ν 1,x (t) and ν 1,y (t) characterise the amplitude of the rf magnetic field along the x and y axes of the rotating frame respectively. The parameters ν 1,x (t) and ν 1,y (t) are piecewise functions of time describing the variation of the rf field amplitude during the pulse sequence.

Model parameters for simulation of the nuclear spin dynamics in quantum dots
For simulations, nuclear spins are placed at the nodes of the face-centered cubic (fcc) lattice.
One nucleus is placed at the origin x = y = z = 0 and the other nuclei are selected from its nearest neighbors -this way the nuclear spin cluster is kept as 'spherical' and 'dense' as possible which allows approximating the complexity and the magnitude of the dipolar interaction in a 3D lattice.
Example clusters with N = 6, N = 12 and N = 19 spins are shown in Supplementary Fig. 5a. The nuclei are taken to be either 75 As with I = 3/2 and gyromagnetic ratio γ = 2π × 7.29 × 10 6 rad s −1 , or 115 In with I = 9/2 and gyromagnetic ratio γ = 2π × 9.38 × 10 6 rad s −1 . The lattice constant of the fcc lattice is taken to be a 0 = 0.564786 nm, corresponding to GaAs at a temperature of ∼4 K. in Hahn echo spin dynamics occurs when ν Q is increased further. The ranges for k 1 and k 2,i are also chosen from trial simulations to be large enough to suppress spurious beatings while still small enough to ensure that the minimum difference between any ∆ν i is large enough to emulate strongly inhomogeneous quadrupolar interaction. When simulating spin dynamics of the nuclei in the absence of quadrupolar effects (∆ν i ν ij ) we use the above procedure with ν Q , k 1 and k 2,i set to zero.

Inhomogeneous quadrupolar interaction is introduced by varying the
For initialisation of the nuclear spin system we use the following procedure. Each of the N nuclear spins is randomly initialised in one of the four single-spin eigen states with I z = −I.. + I.
The probabilities of finding each nucleus in I z = ±1/2 states and |I z | > 1/2 are taken to be 60% and axis before a single initialisation π/2-pulse is used to rotate the polarisation into the xy plane.
Then a cyclic time sequence consisting of rf pulse rotations and free evolution periods is simulated.
Finally a single π/2-pulse is used to rotate the magnetisation in the direction opposite to that of the initialisation pulse. All of the studied NMR pulse sequences are cyclic, i.e. in the limit of a short free evolution and ideal rf pulses the magnetisation is returned into its original state along theê z axis (or into a state with inverted z-magnetisation for HE-Y, the Meiboom-Gill version of Hahn echo). In simulations we use both ideal (infinitely short, or 'hard') and non-ideal (finite duration, or 'soft') rectangular rf pulses. The total free evolution time τ evol is varied, and for each value of τ evol the final value of the nuclear magnetisation I z along theê z axis is computed. The resulting time dependence I z (τ evol ) reflects the process of nuclear spin echo decoherence and can be used to derive the coherence time T 2 .
In the numerical simulations the nuclear spin wavefunction can be found explicitly at any time t during the pulse sequence. This wavefunction can be used to evaluate not only the spin magnetisation components I x (t), I y (t), I z (t) but also the degree of spin-spin entanglement C I (t) at each time t. Entanglement of a quantum state can be quantified as a distance of this state to the set D of all disentangled states 23 . Here we follow Ref. 24  and some deviation from a mono-exponential decay is observed, especially at small N .
The nuclear spin decoherence times T 2 derived from the fits as in Supplementary Fig. 5b are shown in Supplementary Fig. 5c by the symbols and are compared to the experimental values for 75 As spins in self-assembled quantum dots (shaded areas). It can be seen that the number of spins affects the overall timescale of the nuclear spin decoherence -for larger N the nuclear spin  We now present the raw data of the numerical simulations for the CHASE sequences (Supplementary Fig. 6) and discuss the procedure for analysing the raw data and deriving the spin bath coherence times T 2 and the echo amplitudes I z (τ evol → 0) in the limit of short free evolution time τ evol → 0. Supplementary Fig. 6a shows the simulated spin bath dynamics under CHASE-Y-20.
The results are presented for ideal infinitely short ('hard') rf control pulses (open symbols) and for the finite ('soft') rectangular pulses (solid symbols, π-pulse length of t π = 10 µs). The simulations were performed for 1 cycle of the sequence (triangles) and for 4 cycles (pentagons). Lines show best least-squares fits using compressed exponents (Eq. 3 of the main text). These fits are used to derive the spin bath coherence times T 2 . While for 1 cycle the fit is good, for more complex conditions, e.g. 4 cycles and t π = 10 µs, there is a considerable deviation between numerical simulations and exponential fits -in such cases the T 2 times are still derived from fitting but should be treated as approximate values.
Supplementary Fig. 6b shows further results for the spin bath dynamics under the CHASE-Y-34 pulse sequence. Here deviation from the exponential fit is observed for 4 cycles even at t π → 0 while at t π = 10 µs the oscillations and reduction of the echo amplitude at short free evolution time τ evol → 0 are particularly pronounced. In case of spin-9/2 nuclei we find even stronger deviations from a mono-exponential echo decay, with signatures of a two-stage decay. This requires care when deriving decoherence parameters. Firstly, in our analysis the echo amplitude I z (τ evol → 0) is derived not from fitting but rather by taking the average spin magnetisation I z (normalised by the number of nuclei N ) at short free evolution times τ evol < 5 µs -this definition of I z (τ evol → 0) is not affected by deviation of the spin decay from the exponential model. Secondly, for any cyclic pulse sequences with ideal 'hard' pulses (t π → 0) the resulting magnetisation I z (τ evol → 0) after the sequence with short free evolution τ evol → 0 is by definition equal to the initial magnetisation I z (t = 0) before the pulse sequence is applied (in the studied example I z (t = 0) /N ≈ 0.217), while for non-ideal pulses (t π > 0) nuclear spin magnetisation at τ evol → 0 may be lost simply due to the imperfect spin rotations (i.e. due to the 'soft' pulse conditions). Such imperfect rotations mean that the spin bath states during free evolution periods of finite duration τ evol > 0 deviate from the desired sequence. Under such conditions (e.g. t π = 10 µs in Supplementary Fig. 6) the reduction in I z (τ evol ) is not related to decoherence as such, prohibiting any unambiguous definition for T 2 .
Taking into account the above arguments we establish an approach to the analysis of the numerical results which can be summarised as follows: The echo amplitude I z (τ evol → 0) is derived by averaging the I z over short free evolution times τ evol < 5 µs. For echo amplitudes I z (τ evol → 0) below 70% of the initial magnetisation I z (t = 0) the coherence time T 2 is undefined, while for I z (τ evol → 0) above this threshold, the T 2 is derived from fitting with compressed exponential functions. Moreover, in the main text and the subsequent discussion we present echo amplitudes at short free evolution times I z (τ evol → 0) normalised by the initial magnetisation I z (t = 0) . For each sequence we consider two cases: with nuclear magnetisation initialised by a π/2-pulse along the sameê x axis as the π-pulses of the sequence (-X sequences) and with initialisation along theê y axis, orthogonal to that of the π pulses (Meiboom-Gill version, labeled -Y).

The case of negligible inhomogeneous resonance broadening
We first examine the case of small inhomogeneous resonance broadening ∆ν i ν ij (negligible quadrupolar effects or chemical shifts) as shown in Supplementary Fig. 7a,c. It follows from  short (t π → 0, open symbols) and finite pulses (solid symbols), where we set t π = 80 µs for ∆ν i ν ij and t π = 10 µs for ∆ν i ν ij . The I z (τ evol → 0) values in (c) and (d) are plotted only for t π > 0 since at t π → 0 one has I z (τ evol → 0) / I z (t = 0) = 1 for any cyclic control pulse sequence by definition. nuclear spin coherence time: the T 2 increases approximately linearly with the increasing number of sequence repetitions (increasing total gate time). This is largely expected from AHT -when the number of cycles is increased, the cycle duration t c is reduced, and the average Hamiltonian converges to its remaining zeroth order termH (0) d . As shown in Supplementary Tables 1 and 2, this term vanishes for t π → 0 for all studied sequences. For a given total gate time, the T 2 values are very close for all four types of sequences for initial magnetisation along eitherê x or e y axes -the difference is less than a factor of 2. However, the performance of the sequences is notably different when non-ideal pulses (t π > 0) are considered. For both MKL and MS sequences a pronounced loss of magnetisation I z (τ evol → 0) at short free evolution (echo amplitudes) is observed for the Meiboom-Gill (Y) versions of the sequences when the number of cycles is increased ( Supplementary Fig. 7c) -this means that strong nuclear spin decoherence is induced by the finite 'soft' control pulses irrespective of the decoherence during free evolution between the pulses.
By contrast the CHASE sequences show robust performance for an arbitrary direction of the initial nuclear spin magnetisation for the total gate times of up to ∼ 200t π studied here, thus demonstrating their capability to dynamically freeze arbitrary fluctuation of the transverse nuclear magnetisation. Similarly good performance under finite pulses is observed only for the CMG-48 'time-suspension' sequence 25 (crosses in Supplementary Fig. 7c).

The case of large inhomogeneous resonance broadening
The case of large inhomogeneous resonance broadening ∆ν i ν ij (e.g. strong quadrupolar effects) is presented in Supplementary Fig. 7b,d. We start by examining the coherence times under ideal 'hard' control pulses (t π → 0, open symbols in Supplementary Fig. 7b). The MKL sequence exhibits reduced T 2 times, which are even shorter (for 1 cycle) than in the case of simple π-pulse trains (Carr-Parcell sequences, CP). This is likely due to the fact that the MKL sequence was not designed to be applied to strongly inhomogeneous spin systems in the first place. By contrast, all of the CHASE and MS sequences provide enhancement in T 2 compared to Hahn echo and CP and show a similar non-monotonic behaviour on the total gate time which is also presented in Fig. 4e,f of the main text for CHASE-10/20 sequences. For the total gate times up to ∼ 100t π − 200t π the nuclear spin coherence time T 2 is seen to decrease. Such reduction is also observed for the CP sequences and is interpreted to arise from fast rotations of the spins by the rf pulses which lead to an effectively shortened spin lifetime and broadened nuclear spin transitions. Such a broadening can compensate for the energy mismatch between the spins induced by the quadrupolar inhomogeneity and restores the dipolar exchange spin-spin flip-flops. This interpretation is readily confirmed by examining the CP results: for a large number of pulse cycles (with the total gate time 100t π ) the T 2 of the inhomogeneous (∆ν i ν ij , Supplementary Fig. 7b) nuclear spin bath reduces to exactly the value of T 2 ≈ 2.02 ms observed for the homogeneous bath (∆ν i ν ij , Supplementary Fig. 7a) where dipolar flip-flops are allowed. When the number of CHASE or MS sequence cycles is increased further ( 500t π in Supplementary Fig. 7b), T 2 increases steadily, indicating suppression of dipolar interactions and convergence of the average Hamiltonian to zero, similar to the homogeneous case (∆ν i ν ij , Supplementary Fig. 7a). The interplay between the opposing effects of the reappearance of the flip-flops and the convergence of the average Hamiltonian depends strongly on the magnitude of the quadrupolar inhomogeneity and rf pulse duration t π . However, it is possible to establish a qualitative agreement between the experiment and the simulations: for a wide range of the CHASE-10/20 cycle numbers ( 200t π in Supplementary Fig. 7b), T 2 is nearly constantthis matches the weak dependence of the experimentally measured T 2 on the number of cycles as observed in Fig. 3b of the main text.
We now examine the effect of the finite 'soft' pulses (t π > 0) under strong inhomogeneous broadening conditions (∆ν i ν ij , solid symbols in Supplementary Fig. 7b,d). It follows from Supplementary Fig. 7d that the loss of transverse spin polarisation during the control rf pulses (observed as decrease in the initial echo amplitude I z (τ evol → 0) ) is most pronounced for the MS sequences -the spin coherence can be maintained well above I z (τ evol → 0) ∼ 0.7 only for one cycle of MS-7. One cycle of MKL-68 with a total gate time of 36t π can preserve the echo amplitude above the 70% threshold but the resulting coherence time T 2 < 2 ms is shorter than for Hahn echo. Similarly, there is a strong loss of echo amplitude even for one cycle of the 'timesuspension' sequence 25 CMG-48 (crosses in Supplementary Fig. 7d, only finite-pulse results are shown since ideal pulses t π → 0 yield even shorter T 2 values than under t π > 0). By contrast, the CHASE sequences demonstrate the best performance in terms of both preserving the echo amplitude I z (τ evol → 0) under long rf pulse trains and enhancing the coherence time T 2 . While CHASE-20 can maintain I z (τ evol → 0) > 0.7 for gate times > 100t π , the coherence time T 2 decreases abruptly above 24t π in case of the Y-initialisation pulse. A robust performance in terms of freezing of the spin bath fluctuation using finite pulses is obtained for either CHASE-10/20 or CHASE-34 for the total rf pulse gate times up to 20t π − 24t π , with CHASE-34 producing a longer coherence time T 2 .
In various applications of magnetic resonance it is a common aim to seek for an optimal shape of the rf control field that produces the desired spin manipulation 26,27 . It is thus useful to compare the different pulse sequences discussed here by introducing a quantity that characterises their efficiency. To this end we take the ratio of the coherence time T 2 during free evolution and the duration of the rf control pulses required to achieve such T 2 -in other words, the pulse sequence is considered to be most efficient if it yields the largest increase in T 2 at a smallest possible overhead of spin manipulation via the rf control pulses. The dashed lines in Supplementary Fig. 7a,b show constant efficiency levels (given by linear functions with different slopes). It follows from Supplementary Fig. 7a that in case of negligible inhomogeneous resonance broadening (∆ν i ν ij ) the efficiency is nearly invariant, gradually decreasing with the growing number of sequence cycle repeats. In case of large inhomogeneity (∆ν i ν ij ) the increase in the number of sequence cycle repeats (total gate time) leads to reduction in efficiency due to the re-appearance of the dipolar flip-flops discussed above. Supplementary Fig. 7b shows that the best efficiency is achieved for one cycle of either MS-7 or CHASE-10, while for one cycle of CHASE-34 the coherence time T 2 can be extended only with some loss in efficiency. These results indicate that when the dipolarcoupled spin bath is inhomogeneously broadened (Supplementary Fig. 7b) its coherence can be extended efficiently only by introducing complex pulse sequences that cancel higher order terms of the averaged spin Hamiltonian -this is different from the case of negligible inhomogeneous broadening ( Supplementary Fig. 7a) where cycles of the basic sequence repeated multiple times efficiently enhance the spin bath coherence.
Further improvements in simultaneous suppression of inhomogeneous spectral broadening and dipolar couplings in nuclear spin baths may be achieved by benchmarking the performance of the pulse sequences using techniques beyond AHT. Optimized control pulses beyond simple rectangular pulses used here may offer further improvements. One example of such a technique are composite pulses. We have conducted preliminary numerical simulations with modified CHASE sequences, where each pulse is replaced by a composite broadband BB1 pulse 28 . However, these pulses give no improvement and in fact result in a slight reduction of the nuclear spin coherence times T 2 , while requiring significantly longer gate times (and hence reduced efficiency). Alternative approaches may involve more sophisticated tools, including numerical optimization algorithms 29 .
To summarise the results of these numerical simulations, we find that the most efficient control of the spin bath coherence is achieved using one cycle of the CHASE-10, CHASE-20, or CHASE-