<<

Spatial noise filtering through error correction for sensing

The MIT Faculty has made this article openly available. Please share how this access benefits you. Your story matters.

Citation Layden, David, and Paola Cappellaro. “Spatial Noise Filtering through Error Correction for Quantum Sensing.” Npj 4, no. 1 (July 17, 2018).

As Published http://dx.doi.org/10.1038/s41534-018-0082-2

Publisher Nature Publishing Group

Version Final published version

Citable link http://hdl.handle.net/1721.1/121100

Terms of Use Creative Commons Attribution 4.0 International license

Detailed Terms https://creativecommons.org/licenses/by/4.0/ www.nature.com/npjqi

ARTICLE OPEN Spatial noise filtering through error correction for quantum sensing

David Layden1 and Paola Cappellaro 1

Quantum systems can be used to measure various quantities in their environment with high precision. Often, however, their sensitivity is limited by the decohering effects of this same environment. Dynamical decoupling schemes are widely used to filter environmental noise from signals, but their performance is limited by the spectral properties of the signal and noise at hand. schemes have therefore emerged as a complementary technique without the same limitations. To date, however, they have failed to correct the dominant noise type in many quantum sensors, which couples to each qubit in a sensor in the same way as the signal. Here we show how quantum error correction can correct for such noise, which dynamical decoupling can only partially address. Whereas dynamical decoupling exploits temporal noise correlations in signal and noise, our scheme exploits spatial correlations. We give explicit examples in small quantum devices and demonstrate a method by which error- correcting codes can be tailored to their noise. npj Quantum Information (2018) 4:30 ; doi:10.1038/s41534-018-0082-2

INTRODUCTION frequencies. Second, they remain vulnerable to high-frequency 4 Quantum sensors exploit the strong sensitivity of components, which limit the sensitivity they can achieve. A systems to external disturbances. They typically measure an complementary family of filters based instead on quantum error external quantity—a DC signal in the most common scenario— correction has recently emerged, which do not suppress noise on whose value is manifested as a parameter in the sensor’s the basis of frequency, and therefore do not share these same 5–8 Hamiltonian. This parameter can then be estimated by preparing limitations. the sensor in a superposition of two energy eigenstates and The canonical scheme for error-corrected quantum sensing letting them acquire a relative phase that depends on the (ECQS), illustrated here with a Lindblad description, is: (i) to unknown quantity, which is then read out.1 prepare a superposition of logical energy eigenstates, (ii) to let the This strong sensitivity of quantum systems to their environment sensor evolve for a time Δt under the Liouvillian L¼ÀiHþD, where the Hamiltonian superoperator HðÞ¼ρ ½ŠH; ρ is propor- is a double-edged sword, however, as it also brings about 9 decoherence. For quantum sensors, decoherence means that not tional to the parameter one wants to estimate (that is, the signal ), only the relative phase—but also the phase uncertainty— and (iii) to apply a recovery operation R which seeks to correct between energy eigenstates grows with time. The competing the effects of the noise from X no contributions of phase (signal) and phase uncertainty (noise) both y 1 y ’ DðÞ¼ρ LiρL À L Li; ρ ; (1) stemming from a sensor s environment fundamentally limit the i 2 i precision with which it can measure external quantities. A central i way to improve the sensitivity of a quantum sensor is therefore to where {Li} are the Lindblad error operators describing decoher- operate it in a way that filters out environmental disturbances ence, which can be interpreted as quantum jumps.10 (The which constitute noise, leaving those which constitute signal. recovery is approximated as being instantaneous.) Steps (ii) and Dynamical decoupling (DD) sequences provide a family of such (iii) are repeated until (iv) the final state is read out after a total filters, which are ubiquitous in quantum sensing experiments.1–3 time t. In the limit where (ii)–(iii) are fast and repeated many times They comprise a series of control pulses (or continuous controls) (Δt → 0 with t finite), the sensor evolves stroboscopically as applied to a sensor, which modify its response to perturbations of L ¼ÀiRH þ RD þ OðÞkkL Δt (2) different frequencies. This allows them to filter noise from signal in eff a quantum sensor on the basis of frequency; typically, by forming according to Chernoff’s theorem (ref. 11 p. 241, see also ref. 12). If an effective narrow-band filter around an AC signal, thus letting RD ¼ 0 but RH≠0 on logical states then ECQS can approach a the signal imprint on the sensor while suppressing much of the noiseless sensing limit by making Δt sufficiently short compared noise outside the main passband. Since DD sequences act as filters to the noise strength. ÀÁ Δ → in the frequency domain, their main limitations for quantum For ECQS to provide such a noiseless t 0 limit RDjcode¼ 0 , sensing have to do with the spectra of signal and noise: First, DD- the error operators for the sensor must satisfy the usual Knill- based sensors can only measure a narrow frequency band of the Laflamme condition:13,14 signal at a time. Moreover, they cannot directly measure DC y (3) signals, as DD suppresses both noise and signal at low PLi LjP / P

1Research Laboratory of Electronics and Department of Nuclear Science and Engineering, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA Correspondence: Paola Cappellaro ([email protected]) Received: 22 November 2017 Revised: 5 May 2018 Accepted: 11 May 2018

Published in partnership with The University of New South Wales Spatial noise filtering through error correction for quantumy D Layden and P Cappellaro 2 ≥ y = fi ω ~; ω δω ~; for all i, j 0, where P ¼ P projects ontoÀÁ the codespace and L0: I. external eld ðÞ¼x t 0 þ ðÞx t as ≠ For the signal to survive in this limit RHjcode 0 , however, H must not be fully correctable: 1 XN HtðÞ¼ ωðÞ~x ; t Z (5) 2 i i PHP 6/ P: (4) i¼1 y ~ Naturally then, H must not be a linear combination of Li Lj terms. in a suitable reference frame, where xj is the position of qubit j and Indeed, it was recently proven that there exists a code with δω describes zero-mean stationary fluctuations. We take δω to be projector P satisfying these ECQS conditions,no Eqs. (3) and (4), if and Gaussian white noise with strength ~1/T2, for both mathematical y y convenience and to highlight the ability of error correction to filter only if H2S= where S¼span I; Li; L ; L Lj is the so-called i i high-frequency background noise beyond the reach of DD. We Lindblad span.15,16 ω allow, however, for general spatial correlations between the An archetypal example of ECQS to measure a DC signal was fl ~ ~ 7,8,17 uctuations at positions xi and xj: Pproposed in refs. : it involves a three-qubit sensor with H ¼ 3 ω ÀÁ Zi subject to independent bit-flip errors on each qubit (L 2δðÞt i¼1 2 i δωðÞ~x ; t δω ~x ; 0 ¼ c : (6) = X ). Initializing the sensor in þ ¼ p1ffiffi ðÞ0 þ 1 , where |0 〉 i j ij i jiL 2 jiL jiL L T2 = |000〉 and |1L〉 = |111〉, the errors can be detected and corrected fl 18 ω Thus, any qubit prepared in the state |+〉 will precess DE about its by the bit- ip code recovery R (ref. ), while the signal imprints ω σðÞj through H as a relative phase in the encoded state. The signal is z-axis at a rate 0 and lose phase as þ ¼ unimpeded by the frequent applications of R as it couples to the = 33 fi ∈ − = expðÞÀt T2 (ref. ). The coef cients cij [ 1, 1] describe the noise qubits through a different operator than the noise, giving H2S, ~ ~ ≠ correlations between positions xi and xj: The extreme values of cij and hence RD ¼ 0 but RH 0 on logical states. Therefore, the = + − scheme enables near-noiseless sensing of ω for short Δt. To our ±1, for instance, describe identical ( 1) or opposite ( 1) fluctuations in ω at either position, whereas cij = 0 means no knowledge, all explicit ECQS schemes to date for multi-qudit = sensors operate similarly, correcting only for noise which couples correlation. Naturally cii 1. Note that while this noise is external to the sensor via different operators than the signal.5–8,17,19–26 If to the sensing degrees of freedom, it may still arise from within the experimental device, e.g., from the surrounding nuclear bath instead the jump operators were Li = Zi (that is, if the noise 1234567890():,; coupled to each qubit in the same way as the signal), Eqs. (3) and in the case of qubits. ’ (4) could not be satisfied, as no code could filter noise from signal It is convenient to express the sensor s dynamics as a master ρ_ ρ since H 2S. equation ¼LðÞ, where This example illustrates a deficiency in ECQS schemes to date, of  XN both practical and fundamental importance. In many quantum 1 1 ÈÉ LðÞ¼Àρ iH½Šþ; ρ c Z ρZ À Z Z ; ρ sensors, noise which couples through the same operators as the 0 ij i j i j (7) 2T2 i;j 1 2 signal is the dominant source of decoherence (often by several ¼ orders of magnitude27–32), and thus imposes the main limit on P ω0 N 34,35 achievable sensitivity. Schemes which do not protect against such and H0 ¼ 2 i¼1 Zi (refs. ). Equation (7) can be cast in the a central noise source can offer only a limited advantage in form of (1), thus removing dissipative cross terms, by diagonaliz- = practice. More fundamentally, the outsized importance of such ing theffiffiffiffi correlation matrix C (cij)i,j≥1 to yield operators p ~ ~ ~ ~ ~ noise derives from a tension at the core of quantum sensing: A Li ¼ λivi Á Z. Here, Cvi ¼ λivi and Z ¼ ðÞZ1; ¼ ; ZN . These Li ’s good sensor must couple strongly to the quantity it is to measure. can be interpreted as the sensor’s quantum jumps, while the Zi ’s Such strong coupling, in turn, renders the device highly sensitive in Eq. (7) cannot.10 Crucially, the ECQS conditions, (3) and (4), deal to fluctuations in this quantity, thus bounding the duration of with the quantum jump operators Li ’s, not the bare Zi ’s. This coherent sensing. While DD can suppress certain frequency distinction is critical because it opens the possibility of engineer- components of this noise, explicit ECQS schemes to date cannot ing a sensor such that C has a vanishing eigenvalue λk = 0, thus 15,16 address it at all, to our knowledge. Moreover, refs. make no suppressing Lk. Generically, the Lindblad span S will then fail to pronouncements as to whether, or when, it is possible to correct contain H0 due to this “missing” jump operator, opening the door for noise that couples to a sensor through the same operator in its for ECQS. ’ Hamiltonian as the signal. This potential Achilles heel would seem The requirement that H0 2S= for conditions (3) and (4) can be to largely determine the practical value of error correction in many restated for signal and noise which couple identically to the quantum sensors. sensor (in the sense of Eq. (5)) as We propose a general error-correction scheme to filter out noise ~ which couples to each qubit in a quantum sensor identically to the h2= colðÞC ; (8) signal. Our scheme is not frequency-selective, and therefore does not share the same limitations of dynamical decoupling. The key ω ~ ; ¼ ; RN 0 ~ ~ insight is that Eqs. (3) and (4) can be viewed not only as a where h ¼ ðÞ21 1 so that H0 ¼ 2 h Á Z, and col(C) is the condition on how signal and noise couple to the sensor, as with column space of C. A full proof is given in the 'Methods' section; existing codes, but also as a condition on the spatial profiles of we note here simply that Eq. (8) enforces two things: (i) that det(C) = = each in the sensor. Indeed, we show that quantum error 0 and thus Lk 0 for some k, and (ii) that H0 is not composed ’ correction can filter noise from signal on the basis of their only of non-vanishing Li s. It ensures that the signal and noise can respective spatial correlations, much like DD filters based on be fully distinguished by the recovery operation on the basis of temporal correlations (i.e., frequency profiles). their respective spatial profiles (a requirement we will later relax). Consider for example N = 3 sensing qubits positioned so that the fluctuations satisfy cij = −γ/2 for each pair i ≠ j, where γ ∈ [0, 1] RESULTS describes the noise correlation strength. (Specifically, γ = 0 We first consider the task of measuring a DC signal ω , inaccessible produces vanishing correlations whereas γ = 1 gives the strongest 0 ~ through DD, in the presence of background noise δω. We assume correlations possible.) Notice that for γ = 1, Ch ¼ ~0, and so ~ a generic sensor comprising N qubits, each coupled locally to the h2= colðCÞ. The jump operators in the ECQS conditions are not

npj Quantum Information (2018) 30 Published in partnership with The University of New South Wales Spatial noise filtering through error correction for quantumy D Layden and P Cappellaro 3

Z1, Z2 and Z3, but rather pffiffiffiffiffiffiffiffiffiffiffi rffiffiffiffiffiffiffiffiffiffiffi 2 þ γ 2 þ γ L ¼ ðÞZ À Z ; L ¼ ðÞZ À 2Z þ Z ; 1 2 1 3 2 12 1 2 3 rffiffiffiffiffiffiffiffiffiffiffi (9) 1 À γ L ¼ ðÞZ þ Z þ Z ; 3 3 1 2 3 found by diagonalizing C. Observe that the global noise mode, L3, becomes subdominant for larger values of γ, until it vanishes completely when γ = 1, at which point H0 2S= as expected. Notice also that P ¼j0Lih0Ljþj1Lih1Lj with logical states 1 1 ji0L ¼ pffiffiffi ðÞji100 þ ji010 þ ji001 ji1L ¼ pffiffiffi ðÞji011 þ ji101 þ ji110 3 3 (10) satisfies the conditions (3) and (4) when γ → 1, despite the signal and noise both coupling to each sensing qubit identically. Fig. 1 The achievable sensitivity with different schemes for a 3- = −γ ≠ Contrast this with the usual phase-flip code, which corrects for qubit sensor under noise correlations cij /2, for all i j. Note that 10 sensitivity is a measure of the smallest resolvable signal per unit Z1, Z2, Z3 and all linear combinations thereof, including H0 (ref. ). fi fl time, so a smaller sensitivity indicates better performance. The Eq. (10) instead de nes a weakened version of the phase- ip code, active recovery and GHZ schemes use codewords (10) and (12) which corrects for linear combinations of L1 and L2, but not for respectively, whereas the parallel scheme operates the qubits ~ ~ γ → v3 Á Z /ÀÁZ1 þ Z2 þ Z3. Accordingly, as 1 it can fully correct the individually, without entanglement. The active and GHZ schemes give identical performance (in the regime of Δt → 0 for the former), noise RDjcode¼ 0 ÀÁwhile allowing the signal to still imprint on ≠ and both outperform parallel sensing by a factor that grows with the logical states RHjcode 0 . In particular, the dynamics at the correlation strength γ. The details of this calculation are logical level for Δt → 0 are generated by the effective Hamiltonian provided in the Supplementary Information. ω0 Heff ¼ ZL and the effective Lindblad error operator r2 ffiffiffiffiffiffiffiffiffiffiffi γ approaches noiseless evolution by Heff in the limit of frequent 1 À Δ → Leff ¼ ZL; (11) error detection/correction (i.e., t 0). 6T2 Conditions (3) and (4) seem to impose a stringent requirement 16 where ZL is the logical σz (ref. ). Notice that Leff → 0 for γ → 1, so on the C's amenable to ECQS under signal and noise which are the logical dynamics is less noisy for stronger correlations. A “parallel”, in that they couple to the sensor through the same detailed calculation of the effective Liouvillian for this example— operators (along the z direction, i.e., the qubits’ energy gaps, here). as well as for an example with positive noise correlations—is This need not be the case, however, since error correction can provided in the Supplementary Information. enhance quantum sensing even if it does not give a strictly Another possible code for this C uses noiseless limit. Notice in Fig. 1, for instance, that ECQS enhances sensitivity for all γ > 0, even though conditions (3) and (4) are only 0 0 : 0L ¼ ji000 1L ¼ ji111 (12) satisfied exactly when γ = 1. (Another example is analyzed in the Supplementary Information, as is the robustness of our scheme.) When γ → 1 it also satisfies the ECQS conditions, although its ÈÉ More generally, if instead of satisfying (3) exactly, recovery procedure is trivial because span 00 ; 10 is a L L y ε ρ ε ρ PLi LjP ¼ mijP þ OðÞ, then RDðÞ¼OðÞfor a logical instead decoherence-free subspace (DFS) within which H0 acts non- 16 trivially.36 ECQS with this code is therefore a Greenberger-Horne- of vanishing exactly. If the time between successive recoveries is 37 nonzero (Δt > 0) as in most experiments, then decoherence will Zeilinger (GHZ) sensing scheme. The performance of a quantum Δ fi appear in the logical dynamics at order O( t/T2)inLeff. (We write sensor can be quanti ed by the sensitivity it achieves; that is, the Δ ω smallest signal it can detect per unit time.1 Sensitivity therefore O(t/T2) rather than OðÞkkL t to simplify notation, assuming 0 to be a small compared to 1/T2.Ifω0 is not small, O(Δt/T2) should be also provides a way to benchmark ECQS schemes: a more effective Δ ε Δ = scheme allows one to resolve a smaller signal per unit time, thus taken to mean OðÞkkL t ). Provided  t T2, then, small violations of condition (3) will not appreciably change the degree giving lower (i.e., better) sensitivity. The sensitivity offered by the to which quantum error correction suppresses noise in a sensor. codes in Eqs. (10) and (12) is plotted in Fig. 1 as a function of γ. This is true for generic ECQS schemes. When correcting noise Both approach noiseless sensing when γ → 1. which couples like the signal, in particular, allowing ε ≠ 0 enables In general, a DFS is a code for which |0 〉 and |1 〉 are L L codes which—by design—do not correct for errors L with ||L || ≈ degenerate eigenvectors of all L . This means that EP = μ P for all k k i E 0, corresponding to an eigenvalue λ of C which is small but not E 2S, immediately satisfying condition (3). For states within the k exactly zero. Therefore in the present setting, relaxing condition DFS to be sensitive to ω we also need |0 〉 and |1 〉 to be non- 0 L L (3) reduces the need for fine-tuned noise correlations. degenerate energy eigenstates, so that HP 6/ P, satisfying condi- For quantum error correction to filter noise from signal when tion (4). Such a DFS satisfies the ECQS conditions—accordingly, Δt/T is finite, R must suppress the former more than the latter. our discussion of general ECQS encompasses DFS-enhanced 2 Choosing |0L〉 and |1L〉 to be eigenstates of Heff with E0 > E1, the sensing as a special case. ω α L effective Hamiltonian takes the form Heff ¼ P þ 2 ZL, where ZL ¼ DFS-enhanced sensing is only possible for a small family of ε Δ correlation matrices C which we discuss below. A code designed ji0L hj0L À ji1L hj1L and P acts as I on the code. Just as and t/T2 for some general C, in contrast, will usually necessitate an active describe the extent to which noise is suppressed through frequent ωL error correction, the ratio Aω ¼ ω describes the signal gain; that is, recovery R. Given a projector P onto the code satisfying the ECQS 0 conditions, an appropriate choice of R is the usual so-called the fraction of the physical signal that survives at the logical level. transpose channel.16,38 We summarize a standard way of Together with previous arguments about (3), we arrive at implementing it in the 'Methods' section. For a logical state ρ = sufficient conditions in terms of this signal gain for error correction ρ ρ ρ ; ρ ≠ y ε ε P P this recovery gives RDðÞ¼0 and RHðÞ¼½ŠHeff 0as to enhance quantum sensing: PLi LjP ¼ mijP þ OðÞ, and Aω  . 16 desired, where Heff = PH0P (ref. ). In other words, the sensor There is an analogy with dynamical decoupling to be drawn here:

Published in partnership with The University of New South Wales npj Quantum Information (2018) 30 Spatial noise filtering through error correction for quantumy D Layden and P Cappellaro 4 both quantum error correction and DD can significantly enhance sensing by partially filtering noise from the signal—they need not remove the noise entirely to be useful. This analogy goes further: Just as DD sequences must be tailored to sense in a particular frequency band of interest, error- correcting codes must be tailored to C and ~h for a sensor to measure only in a particular spatial “mode”, in order to correct for noise which couples locally in the same way as the signal. That is, a particular δω and arrangement of sensing qubits (likely determined at the time of fabrication) will require a unique P. This is because the scheme depends on a code not correcting for ~ ~ ~ ~ vk Á Z with λk  0, thus allowing the component of H0 along vk Á Z to affect the logical states. Therefore, we expect that in experiment, codes will need to be tailored for individual devices, much like control sequences must be. We present here a robust method of doing so. ~ 15,16 When h2= colðCÞ, refs. provide recipes for codes which exactly satisfy the ECQS conditions, although these may require the sensor to contain up to N noiseless ancilla qubits which do not Fig. 2 Values of c12, c23, and c13 for which there exists a three-qubit −5 couple to ω, in addition to the N sensing qubits. Here we take a code satisfying the ECQS conditions to a tolerance of ε = 10 and = −1 different approach which naturally tolerates small violations of the Aω,min 10 , and not requiring noiseless ancillas. The points (c12, ECQS conditions, such as those discussed above. That is, it allows c23, c13) approximately satisfying conditions (3) and (4) form a fi tetrahedron-like surface. The portions of the surface in blue denote one to nd codes which enhance sensitivity, irrespective of C's for which ECQS is possible with an active (i.e., non-trivial) whether they provide a noiseless limit in theory. In contrast with 15,16 recovery. The red regions (enlarged for visibility) denote C's for several previous works, our approach does not require the which DFS-enhanced sensing is possible, and the white regions overhead of additional ancillas as part of the code. Specifically, for denote C's for which the optimization in Eq. (13) failed to converge a given C, we map the task of finding a P for (3) and (4) to an to within the specified tolerance, either because the achievable optimization problem, whose solutions are codes satisfying signal gain is too small, or because of poor local minima in Ftot. The y y PL LjP ¼ mijP þ OðεÞ for some M ¼ M , and giving a minimum continuous red band comprises C's for which noise on a pair of i c = − signal gain of Aω that is freely adjustable: qubits is perfectly anti-correlated ( ij 1). Notice that ECQS is X,min generically possible for both positive and negative noise correla- 2 δ ; tions; it fails here only when c ≈ 1 for some pair of qubits (i ≠ j), since Minimize Ftot ¼ FE subject to FG>Aω;min and hixjy ¼ xy (13) ij E 2S this gives a missing/subdominant jump operator orthogonal to H0 ~ where G :¼ 1 h Á ~Z ¼ H =ω and 2 0 0 depends only on the spatial profile of δω and on the locations of 2 2 ~0 FEðÞ¼jix ; jiy jjhixjEjx À hiyjEjy þ4jjhixjEjy : (14) the qubits, not on the coupling strengths h . We reserve the proof for the 'Methods' section. Notice that Ftot is non-negative with zeros where P ¼jxihxjþ jyihyj satisfies condition (3). In fact, solutions to Ftot = 0 with Aω, = min 0 exactly satisfy the ECQS conditions and vice versa. Relaxing DISCUSSION these conditions slightly, one can find codes approximately We have shown how ECQS can filter noise from a signal when satisfying (3) and (4) by using F ≤ ε2 as a convergence criterion tot both couple to a sensor locally through the same operators. This and Aω;  ε. Note that the resulting codes can be quite min stands in contrast with earlier explicit ECQS schemes, which have general; for instance, they need not be stabilizer codes. Further been limited to correcting noise separate from the quantity to be details are provided in the 'Methods' section. For a two-qubit sensor, C has a zero eigenvalue only when c measured, in that it couples differently to the sensor. In many ~ 12 quantum sensors such noise is sub-dominant, while the type of = ±1. The c12 = 1 case has h 2 colðCÞ and is therefore not amenable to ECQS. The c = −1 case, on the other hand, has noise considered here is the limiting source of decoherence, and ~ 12 fi h2= colðCÞ. Therefore, N = 2 sensing qubits under strongly anti- can only be partially ltered through DD. Our scheme relies on the correlated noise (c ≈−1) can benefit from ECQS—in fact, they observation that Eqs. (3) and (4) can be viewed as a condition on 12 the spatial correlations of the signal and noise. This view raises a can be used for DFS-enhanced sensing. (Both c12 ≈ +1 and −1, however, could be useful for gradiometry, i.e., to measure a mean close parallel between ECQS and DD: for signal and noise which difference between the energy gap of each qubit.) For a three- couple identically to a sensor (in the sense of Eq. (5)), ECQS and fi qubit sensor a much broader family of C's can satisfy the ECQS DD can enhance sensitivity by acting as lters in the spatial and conditions. Using the mapping described above, the C's for which frequency domains, respectively. However, since these two Eq. (13) yielded codes approximately satisfying conditions (3) and schemes separate noise from signal on totally separate grounds, (4) with no ancillas are shown in Fig. 2. Notice that DFS-enhanced they are complementary, in that the limitations of one are not sensing with N = 3 qubits is only possible for a small family C's. shared by the other. Finally, we proposed a numerical method of Therefore, while such schemes may be powerful,39–42 it could be tailoring ECQS codes to the noise observed in specific devices. It exceedingly difficult to engineer the spatial noise correlations they yields not just codes that correct noise perfectly in the Δt → 0 require in many devices. Codes with active recoveries, in contrast, limit, but also codes which can more generally improve sensitivity. are much more broadly applicable. A scheme to measure C in We applied this method to sensors comprising two and three experiments is given in the 'Methods' section. qubits—with no extra ancillas in the code—and showed how our We have assumed for simplicity so far that the coupling error correction scheme could provide an advantage even in strength of each qubit to the external field ω, parameterized by hi relatively small devices. = 1, is the same for all qubits i. This assumption is of course not Both ECQS and DD filter noise which couples locally like the necessary; the results presented here hold (with trivial adjust- signal by exploiting correlations in it: spatial correlations in the 0≠ ments) for arbitrary values hi 0 which may vary across qubits. case of ECQS, and temporal correlations for DD. Accordingly, the Moreover, whether or not ECQS conditions can be satisfied effectiveness of both schemes depends on the degree to which

npj Quantum Information (2018) 30 Published in partnership with The University of New South Wales Spatial noise filtering through error correction for quantumy D Layden and P Cappellaro 5 2 noise in a sensor can made to have suitable correlations. (Note where Ftot ≤ ε subject to the constraints, or there may exist none for C not that different spatial noise correlations may lend themselves best amenable to ECQS with N sensing qubits. 49 to different sensing tasks. For instance, uniform positive correla- A similar approach to finding codes was recently used in ref., although tions yield a dominant noise mode proportional to H . This makes to our knowledge it has not previously been used for ECQS. The factor of 4 0 fi fi them them ill-suited for measuring small field values through in Eq. (14) was included speci cally for the purpose of nding codes for sensing: While this factor is irrelevant for enforcing that E be corrected, ECQS, but well-suited for gradiometry.) Engineering appropriate 2S a simple calculation shows that FG for a code gives exactly its signal gain spatial noise correlations is likely to be highly implementation- squared. Therefore, requiring that F >A2 and F ≤ ε2 for some dependent, as it is with temporal correlations.43 This is because G ω;min tot Aω; min  ε is a transparent way of demanding that quantum error the main sources of noise can be entirely different in different correction suppress noise much more strongly than the signal. types of quantum sensors. While an analysis of achievable noise correlations in various types of sensors is beyond the scope of the present work, we note here simply that strong spatial correlations Measuring C fi fi have been reported already in several experiments, e.g., In an experiment, nding an appropriate code for ECQS rst requires 39,40,44–47 knowledge of the noise correlations encoded in C. For qubits i and j, the refs. fi coefÀÁcient cij can be inferred by preparing the GHZ state The scheme presented here exploits spatial correlations to p1ffiffi ji0 0 þ ji1 1 and measuring its pure dephasing rate Γ , which is extract signal from a noisy background, which generically causes 2 i j i j ÀÁ ij 2 related to cij through Γij ¼ 1 þ cij , after subtracting the dephasing due dephasing. (Of course, the signal and noise in question need not T2 to any relaxation that might also be present in practice. Note that while we couple to the sensor via σz; in general, the qubits could be damped along any axis.) A similar approach may be possible with arrived at Eq. (7) by considering a signal with a noisy background, the generalized amplitude-damping (T -type) errors, which are second physical source of dephasing is largely immaterial; all that matters is its 1 spatial correlation profile C. only to phase errors as the dominant decoherence mode in many quantum sensors. That is, a sensor with qubits made to thermalize collectively, rather than individually, could be amenable to Proof: Independence from coupling strengths quantum error correction. The approach presented here could We show here that whether Eq. (8), and therefore also the ECQS conditions, — is satisfied does not depend on the coupling strength of each qubit to the be combined with such a scheme or with previous ECQS ~ schemes—raising the intriguing prospect of a quantum sensor external field. Defining D ¼ diagðh0Þ, the Lindblad equation for general ~0 0 ω0 ~0 ~ 0 ~0 that is error-corrected against noise in all three spatial directions. coupling strengths h has H0 ¼ 2 h Á Z and C ¼ DCD. Observe that h ¼ ~ While correlated errors can often be detrimental to error-corrected Dh and kerðÞC0 ¼ fgDÀ1~x j~x 2 kerðÞC ,soh0 2= colðÞC0 if and only if 48 ~ quantum computation (see, e.g., ref. ), they may prove a valuable h2= colðCÞ. resource for ECQS. Code availability METHODS The optimization in Eq. (13) was performed using the SciPy Python library (v0.17). We employed a basin-hopping global optimization algorithm, Proof: Equivalence of Eq. (8) and ECQS conditions which ran a sequential least squares programming (SLSQP) local We show here that Eq. (8) is equivalent to H0 2S= for the background noise optimization at each step. The full computer code used to generate these N described in Eq. (7), where S is the Lindblad span. Let f~vigR be an results is available from the corresponding author upon request. orthonormal eigenbasis of C such that C~v ¼ λ~v , and define ~L :¼ ~v Á ~Z ¼ pffiffiffiffi i i i i i ~y : λ ~ y ~ ; ~ ; ~ ~ Li and ÀÁLi ¼ iLi ¼ Li . Notice that Li I ¼ Li LjL‘ ¼ 0 under Data availability ; y hiA B ¼ tr A B ,soS can be decomposed into orthogonalÈÉ subspaces as The numerical datasets generated during and/or analysed during the : : ; S¼S1 ÈS2 where S1 ¼ spanfLigi1 and S2 ¼ span I LiLj i;j1. Having current study are available from the corresponding author on reasonable ~ ’ ’ request. diagonalized C, we can express H0 in terms of LiÀÁs (rather than Zi s) as P ω N α ~ fi α ÀN ~ 0 ~ ~ H0 ¼ i¼1 iLi for unique coef cients i ¼ 2 tr LiH0 ¼ 2 vi Á h, imply- = = ing that H0?S2. Therefore, H0 2Sif and only if (iff) H0 2S1. This happens iff ACKNOWLEDGEMENTS λ α ≠ ~ ~≠ there is a k such that k ¼ Lk ¼ 0 and k 0, or equivalently, iff vk Á h 0 for We wish to thank Cédric Bény, Liang Jiang, and Sisi Zhou for insightful discussions. ~ T RN some vk 2 kerðÞC . Finally, since C ¼ C we have colðCÞÈkerðCÞ¼ , and This work was supported in part by the U.S. Army Research Office through grant No. ~ so H0 2S= iff h2= colðCÞ. W911NF-15-1-0548, by the NSF PHY0551153 and 1641064 grants, and by the NSERC PGS-D program. Recovery channel We describe here a standard way of implementing the so-called transpose 16,38 AUTHOR CONTRIBUTIONS recovery channel, following refs.ÀÁGiven a known P such that y y ~ D.L. and P.C. conceived the novel QEC scheme for sensing. D.L. developed the theory PLi LjPÀÁ¼ mijP, we have PLðÞi À m0iI Lj À m0jI P ¼ mijP for some Hermitian ~ and performed the computations. All authors discussed the results and contributed M ¼ m~ . Let W be a unitary matrix such that fi ij i;j1 P ÀÁ to the nal manuscript. WyMW~ ¼ diagðÞd ; d ; ¼ , and E :¼ w L À m I . For d ≠0 one can 1 2 i j pjiffiffiffiffi j j0 i find a unique unitary Ui such that EiP ¼ diUiP via polar decomposition. The channel R can then be implemented by performing a projective ADDITIONAL INFORMATION ; ; ; ¼ : y : Supplementary information accompanies the paper on the npj Quantum measurement in fP0 P1 P2 g, where Pi ¼ UiPUi and P0 ¼ P, then y : ~ Information website (https://doi.org/10.1038/s41534-018-0082-2). applying Ui for outcome i, where U0 ¼ I. (N.b., if rankðMÞ¼1 this procedure is trivial, so the code forms a DFS.) Competing interests: The authors declare no competing interests.

Numerical code search Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims fi The objective function Ftot may have several distinct zeros satisfying the in published maps and institutional af liations. constraints with Aω,min = 0; for instance, the logical states in Eqs. (10) and (12). (In other words, there can be more than one P exactly satisfying Eqs. Change history: In the original published HTML version of this Article, some of the ~ (3) and (4).) On the other hand, it will have no such zeros when h 2 colðCÞ. characters in the equations were not appearing correctly. This has now been More generally, for given ε, Aω,min ≥ 0 there may exist multiple regions corrected in the HTML version.

Published in partnership with The University of New South Wales npj Quantum Information (2018) 30 Spatial noise filtering through error correction for quantumy D Layden and P Cappellaro 6 REFERENCES 29. Bluhm, H. et al. Dephasing time of GaAs electron-spin qubits coupled to a nuclear 1. Degen, C. L., Reinhard, F. & Cappellaro, P. Quantum sensing. Rev. Mod. Phys. 89, bath exceeding 200 μs. Nat. Phys. 7, 109–113 (2011). 035002 (2017). 30. Doherty, M. W. et al. The nitrogen-vacancy colour centre in diamond. Phys. Rep. – 2. Viola, L. & Lloyd, S. Dynamical suppression of decoherence in two-state quantum 528,1 45 (2013). systems. Phys. Rev. A 58, 2733–2744 (1998). 31. Muhonen, J. T. et al. Storing quantum information for 30 s in a nanoelectronic 3. Ban, M. -echo technique for reducing the decoherence of a quantum bit. device. Nat. Nanotechnol. 9, 986–991 (2014). J. Mod. Opt. 45, 2315–2325 (1998). 32. Orgiazzi, J.-L. et al. Flux qubits in a planar circuit 4. Biercuk, M. J., Doherty, A. C. & Uys, H. Dynamical decoupling sequence con- architecture: quantum control and decoherence. Phys. Rev. B 93, 104518 (2016). struction as a filter-design problem. J. Phys. B: At., Mol. Opt. Phys. 44, 154002 33. Kubo, R. Generalized cumulant expansion method. J. Phys. Soc. Jpn. 17, – (2011). 1100 1120 (1962). 5. Arrad, G., Vinkler, Y., Aharonov, D. & Retzker, A. Increasing sensing resolution with 34. Cheng, Y. C. & Silbey, R. J. Stochastic liouville equation approach for the effect of error correction. Phys. Rev. Lett. 112, 150801 (2014). noise in quantum computations. Phys. Rev. A 69, 052325 (2004). 6. Kessler, E. M., Lovchinsky, I., Sushkov, A. O. & Lukin, M. D. Quantum error cor- 35. Cheng, Y. C. & Silbey, R. J. Microscopic study on the noise rection for metrology. Phys. Rev. Lett. 112, 150802 (2014). threshold of fault-tolerant quantum error correction. Phys. Rev. A 72, 012320 7. Ozeri, R. Heisenberg limited metrology using quantum error-correction codes. (2005). Prepr. arXiv 1310.3432 (2013). 36. Lidar, D. A., Chuang, I. L. & Whaley, K. B. Decoherence-free subspaces for quantum 8. Dür, W., Skotiniotis, M., Fröwis, F. & Kraus, B. Improved using computation. Phys. Rev. Lett. 81, 2594–2597 (1998). quantum error correction. Phys. Rev. Lett. 112, 080801 (2014). 37. Greenberger, D. M., Horne, M. A. & Zeilinger, A. Going Beyond Bell’s Theorem. 9. Giovannetti, V., Lloyd, S. & Maccone, L. Quantum metrology. Phys. Rev. Lett. 96, (Springer Netherlands, Dordrecht, 1989; 69–72. 010401 (2006). 38. Nielsen, M. A. & Chuang, I. L. Quantum Computation and Quantum Information. 10. Lidar, D. & Brun, T. Quantum Error Correction New York, NY, USA: Cambridge (Cambridge University Press, New York, NY, USA, 2000). University Press (2013). 39. Roos, C. F., Chwalla, M., Kim, K., Riebe, M. & Blatt, R. ‘designer atoms’ for quantum 11. Chernoff, P. R. Note on product formulas for operator semigroups. J. Funct. Anal. metrology. Nature 443, 316 (2006). 2, 238–242 (1968). 40. Chwalla, M. et al. Precision spectroscopy with two correlated atoms. Appl. Phys. B 12. Layden, D., Martn-Martnez, E. & Kempf, A. Universal scheme for indirect quantum 89, 483–488 (2007). control. Phys. Rev. A 93, 040301 (2016). 41. Dorner, U. Quantum frequency estimation with trapped ions and atoms. New J. 13. Knill, E. & Laflamme, R. Theory of quantum error-correcting codes. Phys. Rev. A 55, Phys. 14, 043011 (2012). 900–911 (1997). 42. Jeske, J., Cole, J. H. & Huelga, S. F. Quantum metrology subject to spatially cor- 14. Bény, C. Perturbative quantum error correction. Phys. Rev. Lett. 107, 080501 related markovian noise: restoring the heisenberg limit. New J. Phys. 16, 073039 (2011). (2014). 15. Demkowicz-Dobrzan'ski, R., Czajkowski, J. & Sekatski, P. Adaptive quantum 43. Ajoy, A., Liu, Y. & Cappellaro, P. Dc magnetometry at the T2 limit. Prepr. arXiv metrology under general markovian noise. Phys. Rev. X 7, 041009 (2017). 1611.04691 (2016). 16. Zhou, S., Zhang, M., Preskill, J. & Jiang, L. Achieving the heisenberg limit in 44. Fortunato, E. M., Viola, L., Hodges, J., Teklemariam, G. & Cory, D. G. Imple- quantum metrology using quantum error correction. Nat. Commun. 9, 78 (2018). mentation of universal control on a decoherence-free qubit. New J. Phys. 4,5 17. Reiter, F., Sørensen, A. S., Zoller, P. & Muschik, C. Dissipative quantum error (2002). correction and application to quantum sensing with trapped ions. Nat. Commun. 45. Monz, T. et al. 14-qubit entanglement: creation and coherence. Phys. Rev. Lett. 8, 1822 (2017). 106, 130506 (2011). 18. Oreshkov, O. & Brun, T. A. Continuous quantum error correction for non- 46. Schindler, P. et al. Experimental repetitive quantum error correction. Science 332, markovian decoherence. Phys. Rev. A 76, 022318 (2007). 1059–1061 (2011). 19. Herrera-Mart, D. A., Gefen, T., Aharonov, D., Katz, N. & Retzker, A. Quantum error- 47. Romach, Y. et al. Spectroscopy of surface-induced noise using shallow spins in correction-enhanced overcoming the limit imposed by relaxation. diamond. Phys. Rev. Lett. 114, 017601 (2015). Phys. Rev. Lett. 115, 200501 (2015). 48. Aharonov, D., Kitaev, A. & Preskill, J. Fault-tolerant quantum computation with 20. Plenio, M. B. & Huelga, S. F. Sensing in the presence of an observed environment. long-range correlated noise. Phys. Rev. Lett. 96, 050504 (2006). Phys. Rev. A 93, 032123 (2016). 49. Albert, V. V. et al. Performance and structure of single-mode bosonic codes. Phys. 21. Gefen, T., Herrera-Mart, D. A. & Retzker, A. Parameter estimation with efficient Rev. A 97, 032346 (2018). photodetectors. Phys. Rev. A 93, 032133 (2016). 22. Bergmann, M. & van Loock, P. Quantum error correction against photon loss using noon states. Phys. Rev. A 94, 012311 (2016). Open Access This article is licensed under a Creative Commons 23. Sekatski, P., Skotiniotis, M., Kołńodyński, J. & Dür, W. Quantum metrology with full Attribution 4.0 International License, which permits use, sharing, and fast quantum control. Quantum 1, 27 (2017). adaptation, distribution and reproduction in any medium or format, as long as you give 24. Unden, T. et al. Quantum metrology enhanced by repetitive quantum error appropriate credit to the original author(s) and the source, provide a link to the Creative correction. Phys. Rev. Lett. 116, 230502 (2016). Commons license, and indicate if changes were made. The images or other third party 25. Cohen, L., Pilnyak, Y., Istrati, D., Retzker, A. & Eisenberg, H. S. Demonstration of a material in this article are included in the article’s Creative Commons license, unless quantum error correction for enhanced sensitivity of photonic measurements. indicated otherwise in a credit line to the material. If material is not included in the ’ Phys. Rev. A 94, 012324 (2016). article s Creative Commons license and your intended use is not permitted by statutory 26. Matsuzaki, Y. & Benjamin, S. Magnetic-field sensing with quantum error detection regulation or exceeds the permitted use, you will need to obtain permission directly under the effect of energy relaxation. Phys. Rev. A 95, 032303 (2017). from the copyright holder. To view a copy of this license, visit http://creativecommons. 27. Biercuk, M. J. et al. Optimized dynamical decoupling in a model quantum org/licenses/by/4.0/. memory. Nature 458, 996–1000 (2009). 28. Witzel, W. M., Carroll, M. S., Morello, A., Cywin'ski, L. & Das Sarma, S. Electron spin decoherence in isotope-enriched . Phys. Rev. Lett. 105, 187602 (2010). © The Author(s) 2018

npj Quantum Information (2018) 30 Published in partnership with The University of New South Wales