Abstract
The wideranging adoption of quantum technologies requires practical, highperformance advances in our ability to maintain quantum coherence while facing the challenge of state collapse under measurement. Here we use techniques from control theory and machine learning to predict the future evolution of a qubit’s state; we deploy this information to suppress stochastic, semiclassical decoherence, even when access to measurements is limited. First, we implement a timedivision multiplexed approach, interleaving measurement periods with periods of unsupervised but stabilised operation during which qubits are available, for example, in quantum information experiments. Second, we employ predictive feedback during sequential but time delayed measurements to reduce the Dick effect as encountered in passive frequency standards. Both experiments demonstrate significant improvements in qubitphase stability over ‘traditional’ measurementbased feedback approaches by exploiting time domain correlations in the noise processes. This technique requires no additional hardware and is applicable to all twolevel quantum systems where projective measurements are possible.
Introduction
The applications of quantumenabled technologies are compelling and already demonstrating significant impacts, especially in the realm of sensing^{1,2,3,4,5} and metrology^{6}. However, in nearly all applications the phenomenon of decoherence—effectively the randomization of a quantum system’s state by the environment—limits the viability of quantum technologies. In the case of qubits, fundamental building blocks in many applications, the net result is that the useful lifetime of the qubit state is shortened, reducing their deployability for quantum information^{7}, quantum simulation^{8,9,10,11,12,13} or other applications. Methodologies for stabilising qubits against decoherence represent a critical need in quantum technology.
Control engineering^{14} techniques are emerging as a promising alternative to engineering passive robustness at the device level in realising stable quantum systems^{15,16,17,18}. Beyond widely adopted openloop control^{18,19,20}, a qubit subjected to stochastic evolution of its phase degree of freedom—dephasing (inset Fig. 1a )—can be stabilised by cyclically performing measurements on the qubit and then compensating for the measured phase evolution in a feedback loop^{21,22,23}. However, so far, feedback control^{24,25,26,27,28} has largely been limited by statecollapse under projective measurement, mandating access to weak measurements^{22} or ancilla states^{29}, or largely sacrificing useful quantum coherence in the controlled system^{23}.
Our objective is to enhance the performance of incoherent feedback stabilization (that is, using only classical information) of a qubit experiencing dephasing while also relaxing the need for projective measurements. Our approach is based on predictive control; a variety of techniques in filtering^{14,30,31,32} and machine learning^{33} allow the estimation of future state evolution based on past measurement outcomes of the system. Here, we deploy a well established algorithm from machine learning to learn about a random dephasing process affecting a qubit, and then predict the impact of future dephasing based only on standard projective measurements. We use this information to perform realtime stabilization of the qubit state during periods in which the qubit is unsupervised but still subject to stochastic dephasing. Our method exploits the presence of commonly encountered temporal correlations in the dephasing process^{34} to allow future prediction; no deterministic model of qubit state evolution is required. To the best of our knowledge, despite its ubiquity in classical settings, predictive control has not been employed in the context of quantumcoherent technologies.
Results
Supervised learning based on qubitphase measurements
In the language of machine learning, we consider the qubit’s instantaneous phase which we would like to predict at a future discretized time, t_{k}, as labels, φ^{P}(t_{k}), and an arbitrary number, n, of previous measurements, φ_{i}^{M} (indexed by i and obtained by any appropriate method), as their associated features. We then calculate a linear combination of the features with optimized weighting coefficients, w={w}_{i,k}, as a prediction of the label, . Based on measured features, the entries of w are optimized for each time step, t_{k}, reflecting the timevarying correlations in the dephasing process, captured through the power spectrum.
We demonstrate prediction of a qubit’s state subject to stochastic dephasing by performing experiments using the groundstate hyperfine states, F=0, m_{F}=0> and F=1, m_{F}=0>, in trapped ^{171}Yb^{+} ions as a qubit with transition frequency near 12.6 GHz. A coherent superposition of the qubit states in the measurement basis induced by microwave control^{35} evolves freely under the influence of an engineered dephasing interaction larger than any intrinsic noise in our experimental system (Supplementary Methods). In general we work in a regime where the noise evolves slowly during a single measurement period T_{M}, but we allow the rate at which measurements of qubitphase evolution are taken—the sampling frequency ω_{s}—to vary relative to the highest frequency in the noise power spectrum, ω_{c} (c.f. Fig. 3f). The dephasing noise processes presented here are all derived from a flattop frequency power spectrum with characteristic cutoff at ω_{c}. More complex spectra are discussed in Supplementary Discussion and demonstrate similar performance.
An important aspect of our approach is that measurements providing data serving as features may be performed through any suitable protocol. For instance, performing a series of p projective measurements on a single qubit to obtain ensembleaveraged information simply sets the scale of the measurement period, , with the duration of a single experiment. Here, we employ a projective measurement that captures statistical information through a spatial ensemble. The impact of such differences is explicitly captured in the sampling frequency of the measurement process.
Forward prediction of stochastic qubitphase evolution
We begin by accumulating a series of projective measurements of the qubit’s phase under engineered dephasing. These serve as training data for the algorithm to optimize the coefficients in w. We then perform another series of measurements (shown, Fig. 1a) under application of a different noise process possessing similar statistical characteristics as used in acquiring the training data. This approach ensures that our estimates of prediction accuracy are conservative and exhibit reasonable model robustness and generality. Performing the learning algorithm on a single data set can enhance performance of the prediction algorithm but introduces extreme sensitivity to the input model, ultimately reducing prediction efficacy in the presence of variations in the detailed form of the noise.
An example engineered noise trace in time with overlaid measurement outcomes, φ^{M}, is depicted in Fig. 1a, with 97% correlation between φ^{M} and the applied phase φ^{A} (Fig. 1b). Beyond time t_{0} we predict future labels of qubitphase evolution φ^{P}(t_{k}), up to step t_{150} using a variable number, n, of past measurements and the trained coefficients in w. Calculated predictions approximate φ^{A} well, reproducing key features including inflection points, maxima and minima as a function of t_{k}. Our knowledge of the noise is used exclusively for quantitative evaluation of prediction efficacy—it does not enter into the machinelearning algorithm in any form.
Prediction accuracy increases with n, as the algorithm learns more about the temporal correlations in φ^{A}. For values of k≳n, corresponding to prediction times exceeding the range over which the algorithm possesses knowledge about the noise features, the prediction quality diminishes. In addition, over very large values of t_{k} the prediction tends towards the mean of the noise. Comparing predictive estimation to a ‘traditional feedback’ model, in which future estimates are based simply on the last measured value φ^{M}(t_{0}), the algorithm shows a distinct advantage as it allows for temporal evolution of the noise in the future.
The quantitative benefits of predictive estimation relative to traditional feedback, and the large t_{k} behaviour of the predictive algorithm are succinctly captured in the rootmeansquare (r.m.s.) prediction error averaged over the entire data set, , and calculated as a function of t_{k} and n (Fig. 1c). This demonstrates that even over a large ensemble of predictions the algorithm’s advantages remain robust. We now move on to provide examples of realtime qubit stabilization in which the incorporation of future state prediction shows significant advantages over existing techniques.
Timedivision multiplexed decoherence suppression
As described above, a reliance on feedback involving frequent projective measurements renders a qubit effectively useless for quantum information or other applications, but omission of stabilization techniques in the presence of dephasing noise may lead to phase errors and eventually to total decoherence. To mitigate the effect of dephasing, we tailor an approach in which we temporally multiplex the necessary measurement and actuation operations in distinct probe and stabilization periods respectively (Fig. 2a,b). During the probe period, a fixed number of measurements are taken and processed in real time. From these measurement outcomes the algorithm produces a prediction of the future timedependent evolution of the noise during the subsequent stabilization period up to some t_{k}; the qubit is dedicated exclusively to measurement of the dephasing process in the probe period. During the stabilization period, corrections are applied during each discrete time step to compensate the predicted stochastic phase evolution, but no measurements are conducted; this permits periods of unsupervised evolution during which the qubit is useful and stabilised against dephasing.
As an example we set the objective of maintaining zero net qubitphase accumulation (in the rotating frame) during each time step of the stabilization period such that arbitrary highfidelity operations may be conducted on the qubit; here we apply only the identity. Diagnostic measurements are performed after a variable number of corrections to demonstrate the efficacy of this approach but would not ordinarily be required. Two representative S probe/stabilization cycles are displayed in Fig. 2b showing a reduction in integrated phase error of about 70% after a stabilization delay of t_{50} during the first cycle and a reduction of about 85% during the second. These improvements are partially limited by measurement fidelity, as illustrated in the ensembleaveraged data (Fig. 2c). Predictive compensation in all tested regimes is superior to corrections based only on traditional feedback down to measurement fidelity limits. Compared against numerical simulations we see that for small t_{k} the algorithm can provide large relative gains.
Predictive estimation inside a periodic feedback loop
In a second application we employ realtime predictive control in a metrological context. Qubits realised in atoms are frequently used as stable references against which local oscillators (LOs) may be disciplined^{36}. However, stochastic evolution of the LO frequency between interrogations leads to imperfect corrections in the feedback loop. This scenario is commonly encountered when classical processing, actuation and system reinitialisation introduce dead time, producing an effective lag in the feedback loop which degrades the longterm stability of the locked oscillator^{37}. The impact of rapid fluctuations in the LO frequency relative to dead time is generally referred to as the Dick effect^{38}, and represents a significant limiting phenomenon in passive frequency standards using atomic references. The correspondence between LOinduced instabilities in frequency references and dephasing in qubits^{39} thus invites the application of predictive control in a setting where periodic interrogation and projective measurement are native to the feedback loops used in precision frequency metrology.
The usefulness of predictive estimation in improving correction accuracy inside a feedback loop is demonstrated in Fig. 3b–d, where we plot the predicted phase φ^{P}(t_{k}) (based on two different techniques) against the applied phase error φ^{A}(t_{k}). A prediction with unity correlation to the applied noise would form a diagonal line along φ^{P}=φ^{A} (similar to Fig. 1b), while imperfect predictions—hence imperfect corrections—result in a dispersion of points around this line in an ellipse.
We vary the sampling frequencies ω_{s} as a proxy for introducing a variable dead time in the feedback loop (Supplementary Discussion). In a regime where the LOinduced dephasing process evolves slowly, quantified as ω_{s}≫ω_{c}, both φ^{M}(t_{0}) and the predicted phase φ^{P}(t_{k}) show positive correlation to φ^{A}(t_{k}) (Fig. 3b). As we decrease ω_{s}, noise evolution during the dead time leads to diminishing correlation between the prediction and actual noise, causing the ellipses to rotate and broaden—a manifestation of the Dick effect.
Predictive estimates are compared with the traditional feedback model described above. For ω_{s} approaching the Nyquist limit we observe that the traditional prediction can become anticorrelated with the rapidly evolving applied noise (blue ellipse, Fig. 3d), which in realworld applications would lead to an unstable system under feedback. By contrast, using optimized predictions, the decrease in correlation is much slower and the machinelearning algorithm prevents the prediction from ever becoming anticorrelated with the applied dephasing noise. In circumstances tested we always find the optimal prediction correlation r_{P}>r_{T} for traditional feedback. Corrections used to discipline the qubit or LO based on predictive estimation can therefore possess enhanced average accuracy relative to traditional feedback.
We now implement realtime evaluation of φ^{P}(t_{k}) inside a feedback loop, demonstrating the ability to improve the individual corrections and ultimately achieve improved longterm stability of the locked qubit. In our experiment we set n=20, calculate φ^{P}(t_{k}) on the fly, and cyclically correct based on these predictions (Fig. 3a), again comparing against traditional feedback. The longterm stability achieved under both methods is calculated via the sample variance^{40} over a variable number of feedback cycles (Fig. 3e).
Over the range of dead times explored experimentally, the use of optimized predictive feedback, in which future estimates are updated as new measurements are acquired in real time, yields net enhancements over the freerunning LO (Fig. 3e,f). This includes regimes near the Nyquist limit where rapid evolution of the noise can result in feedbackinduced instability as in Fig. 3d. Over most of this range and for the noise parameters we have employed, performance gains over traditional feedback are ∼2 × using optimized predictive feedback—a metrologically significant improvement using only enhanced software in the stabilization. Similar performance enhancements have been observed for a wide range of noise spectra and parameters (Supplementary Discussion).
Predictive estimation applied to intrinsic system noise
Finally, with quantitative evaluation of these techniques in hand using engineered noise, we move on to a study of the intrinsic dephasing noise in our system, which arises due to a combination of LO phase noise and magnetic field fluctuations. We perform thousands of sequential projective measurements on the freerunning qubit–LO system and process predictions offline. The spectrum of measured fluctuations combines a 1/f^{2} type lowfrequency tail with an approximately white plateau, resulting in significant spectral weight near the measurement cycle time. We perform an analysis similar to that presented in Fig. 1, with prediction accuracy quantified using the r.m.s. error between predictions and the future measurement outcomes as a function of t_{k} (Fig. 4a).
Our machinelearning algorithm enhances the prediction of future qubit evolution by ∼30% relative to the r.m.s. error of the uncorrected measurements. We achieve similar performance gains relative to both traditional feedback and the freerunning system in calculated sample variance over thousands of correction cycles based on predicted qubit phase, Fig. 4b. In this case the rapid evolution of the noise causes traditional feedback to produce a larger sample variance than free evolution—a situation similar to that experienced in Fig. 3d. The calculated performance enhancements of our method on the intrinsic system noise are significant and show that our algorithm possesses the capability to improve the stability against the noise background in our system.
Discussion
In this work we have demonstrated the ability to deploy machinelearning techniques to predict and preemptively compensate for stochastic qubit dephasing. By exploiting temporal correlations in noise processes, we are able to suppress dephasing during periods when probing the qubit state is not possible, even though we have no deterministic model of the qubit’s evolution. Implementing this approach requires neither additional quantum resources nor extra experimental hardware. Instead we rely on softwarebased machinelearning techniques, which extract optimal performance from information that would have already been collected during common experimental implementations. It has been shown numerically that it is possible to implement an analytical solution to maximally exploit noise correlations captured through the noise power spectrum^{41}. However in our experimental demonstration the ease of implementation lends itself to use for large values of k and n where prediction is extended far into the future and the computational requirement of large matrix inversions make analytic techniques impractical. In addition, deviations from the idealization of noise characteristics represented by use of a simple power spectral density, as well as correlations appearing in the measurement process, are easily captured by the machinelearning algorithm but invisible to such analytic approaches.
The capability to suppress errors in quantum systems undergoing stochastic evolution has direct implications for the metrology and quantum information communities. In particular the ability to suppress the magnitude of residual dephasing errors makes this technique an attractive complement to openloop dynamic error suppression for quantum information. Any reduction in the strength of the effective noise experienced by the qubit exponentially improves the fidelity of an operation implemented using dynamic error suppression^{20}. Even in the limit of quasistatic noise, reducing the magnitude of the dephasing error experienced during a dynamically protected operation will improve the ultimate fidelity achievable in a nontrivial quantum logic operation^{42}. The complementarity between open and closedloop stabilization is a common theme in control engineering and translates well to the current setting. Future experiments will involve an expansion to a greater variety of machinelearning algorithms for system characterization and stabilization, and treatment of more complex control scenarios with noncommuting noise terms in the qubit Hamiltonian, nonlinearities in the control, and use of various measurement bases.
Data availability
Data published in this article and the computer code used for simulation is available from the authors.
Additional information
How to cite this article: Mavadia, S. et al. Prediction and realtime compensation of qubit decoherence via machine learning. Nat. Commun. 8, 14106 doi: 10.1038/ncomms14106 (2017).
Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
Gustavson, T. L., Bouyer, P. & Kasevich, M. A. Precision rotation measurements with an atom interferometer gyroscope. Phys. Rev. Lett. 78, 2046–2049 (1997).
Chou, C. W., Hume, D. B., Rosenband, T. & Wineland, D. J. Optical clocks and relativity. Science 329, 1630–1633 (2010).
Shah, V., Knappe, S., Schwindt, P. D. D. & Kitching, J. Subpicotesla atomic magnetometry with a microfabricated vapour cell. Nat. Photon. 1, 649–652 (2007).
Aasi, J. et al. Enhanced sensitivity of the LIGO gravitational wave detector by using squeezed states of light. Nat. Photon. 7, 613–619 (2013).
Wasilewski, W. et al. Quantum noise limited and entanglementassisted magnetometry. Phys. Rev. Lett. 104, 133601 (2010).
Leibfried, D. et al. Toward Heisenberglimited spectroscopy with multiparticle entangled states. Science 304, 1476–1478 (2004).
Nielsen, M. A. & Chuang, I. L. Quantum Computation and Quantum Information Cambridge University Press (2000).
Lloyd, S. Universal quantum simulators. Science 273, 1073–1078 (1996).
Somaroo, S., Tseng, C. H., Havel, T. F., Laflamme, R. & Cory, D. G. Quantum simulations on a quantum computer. Phys. Rev. Lett. 82, 5381–5384 (1999).
Somma, R., Ortiz, G., Gubernatis, J. E., Knill, E. & Laflamme, R. Simulating physical phenomena by quantum networks. Phys. Rev. A 65, 042323 (2002).
AspuruGuzik, A. & Walther, P. Photonic quantum simulations. Nat. Phys. 8, 285–291 (2012).
Bloch, I., Delibard, J. & Nascimbene, S. Quantum simulations with ultracold quantum gases. Nat. Phys. 8, 267–276 (2012).
Blatt, R. & Roos, C. F. Quantum simulations with trapped ions. Nat. Phys. 8, 277–284 (2012).
Stengel, R. F. Optimal Control and Estimation Dover Publications Inc. (1994).
Clark, J. W., Lucarelli, D. G. & Tarn, T. J. Control of quantum systems. Int. J. Mod. Phys. B 17, 5397–5411 (2003).
Wiseman, H. M. & Doherty, A. C. Optimal unravellings for feedback control in linear quantum systems. Phys. Rev. Lett. 94, 1–4 (2005).
Nurdin, H. I., James, M. R. & Petersen, I. R. Coherent quantum LGQ control. Automatica 45, 1837–1846 (2009).
Biercuk, M. J., Doherty, A. C. & Uys, H. Dynamical decoupling sequence construction as a filterdesign problem. J. Phys. B 44, 154002 (2011).
Viola, L. & Lloyd, S. Dynamical suppression of decoherence in twostate quantum systems. Phys. Rev. A 58, 2733–2744 (1998).
Soare, A. et al. Experimental noise filtering by quantum control. Nat. Phys. 10, 825–829 (2014).
Bluhm, H., Foletti, S., Mahalu, D., Umansky, V. & Yacoby, A. Enhancing the coherence of a spin qubit by operating it as a feedback loop that controls its nuclear spin bath. Phys. Rev. Lett. 105, 216803 (2010).
Vijay, R. et al. Stabilizing rabi oscillations in a superconducting qubit using quantum feedback. Nature 490, 77–80 (2012).
Shulman, M. D. et al. Suppressing qubit dephasing using realtime Hamiltonian estimation. Nat. Commun. 5, 5156 (2014).
Steck, D. A., Jacobs, K., Mabuchi, H., Bhattacharya, T. & Habib, S. Quantum feedback control of atomic motion in an optical cavity. Phys. Rev. Lett. 92, 223004 (2004).
Wilson, D. J. et al. Measurementbased control of a mechanical oscillator at its thermal decoherence rate. Nature 524, 325–329 (2015).
Wieczorek, W. et al. Optimal state estimation for cavity optomechanical systems. Phys. Rev. Lett. 114, 223601 (2015).
Sayrin, C. et al. Realtime quantum feedback prepares and stabilizes photon number states. Nature 477, 73–77 (2011).
Gillett, G. G. et al. Experimental feedback control of quantum systems using weak measurements. Phys. Rev. Lett. 104, 2–5 (2010).
Hirose, M. & Cappellaro, P. Coherent feedback control of a single qubit in diamond. Nature 532, 77–80 (2016).
Landau I. D., Lozano R., M’Saad M., Karimi A. (ed.). Adaptive Control, Algorithms, Analysis and Applications Springer (2011).
Nielsen, A. E. B., Hopkins, A. S. & Mabuchi, H. Quantum filter reduction for measurementfeedback control via unsupervised manifold learning. New J. Phys. 11, 105043 (2009).
Tan, D., Weber, S. J., Siddiqi, I., Mølmer, K. & Murch, K. W. Prediction and retrodiction for a continuously monitored superconducting qubit. Phys. Rev. Lett. 114, 090403 (2015).
Murphy, K. P. Machine Learning, A Probabilistic Approach MIT Press (2012).
Van Harlingen, D. J., Plourde, B. L. T., Robertson, T. L., Reichardt, P. A. & Clarke, J. in Quantum Computing and Quantum Bits in Mesoscopic Systems (eds Leggett, A., Ruggiero B., & Silvestini, P.) 171–184 (Kluwer Academic Press, 2004).
Soare, A. et al. Experimental bath engineering for quantitative studies of quantum control. Phys. Rev. A 89, 042329 (2014).
Audoin, C. & Guinot, B. The Measurement of Time 1st English translation edn (Cambridge University Press, 2001).
Greenhall, C. A. A derivation of the longterm degradation of a pulsed atomic frequency standard from a controlloop model. IEEE Trans. Ultrason. Ferroelect. Freq. Control 45, 895–898 (1998).
Dick, G. Local oscillator induced instabilities in trapped ion frequency standards. In Proceedings of the 19th Annual Precise Time and Time Interval (PTTI) Systems and Applications and Planning Meeting (1987).
Ball, H., Oliver, W. D. & Biercuk, M. J. The role of master clock stability in quantum information processing. Nature Quantum Information 2, 16033 (2016).
Rutman, J. Characterization of phase and frequency instabilities in precision frequency sources: fifteen years of progress. Proc. IEEE 66, 1048–1075 (1978).
Sastrawan, J., Jones, C., Akhalwaya, I., Uys, H. & Biercuk, M. J. Analytically exploiting noise correlations inside the feedback loop to improve lockedoscillator performance. Phys. Rev. E 94, 022204 (2016).
Kabytayev, C. et al. Robustness of composite pulses to timedependent control noise. Phys. Rev. A 90, 012316 (2014).
Acknowledgements
The authors acknowledge D. Hayes, M.C. Jarratt and A. Soare, for contributions to the experimental system and C. Edmunds, C. Ferrie and C. Hempel for useful discussions. Work partially supported by the ARC Centre of Excellence for Engineered Quantum Systems CE110001013, ARC Discovery Project DP130103823, the Intelligence Advanced Research Projects Activity (IARPA) through the ARO, the US Army Research Office under Contract W911NF12R0012, and a private grant from H. & A. Harley
Author information
Authors and Affiliations
Contributions
S.M. and V.F developed experimental hardware and the experimental control system, performed numerical simulations, obtained the presented data, and carried out the data analysis with guidance from M.J.B. M.J.B. conceived the experiment and led development of the experimental system. J.S. and S.D obtained preliminary data. S.M., V.F. and M.J.B. wrote the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing financial interests.
Supplementary information
Supplementary Information
Supplementary figures, supplementary discussion, supplementary methods and supplementary references. (PDF 374 kb)
Rights and permissions
This work is licensed under a Creative Commons Attribution 4.0 International License. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in the credit line; if the material is not included under the Creative Commons license, users will need to obtain permission from the license holder to reproduce the material. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/
About this article
Cite this article
Mavadia, S., Frey, V., Sastrawan, J. et al. Prediction and realtime compensation of qubit decoherence via machine learning. Nat Commun 8, 14106 (2017). https://doi.org/10.1038/ncomms14106
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/ncomms14106
This article is cited by

Surpassing spectator qubits with photonic modes and continuous measurement for Heisenberglimited noise mitigation
npj Quantum Information (2023)

Learning quantum systems
Nature Reviews Physics (2023)

Practical distributed quantum information processing with LOCCNet
npj Quantum Information (2021)

Adaptive characterization of spatially inhomogeneous fields and errors in qubit registers
npj Quantum Information (2020)

Realtime calibration with spectator qubits
npj Quantum Information (2020)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.