QInfer: Statistical inference software for quantum applications

Christopher Granade1,2, Christopher Ferrie3, Ian Hincks4,5, Steven Casagrande, Thomas Alexander5,6, Jonathan Gross7, Michal Kononenko5,6, and Yuval Sanders5,6,8

1School of Physics, University of Sydney, Sydney, NSW, Australia
2Centre for Engineered Quantum Systems, University of Sydney, Sydney, NSW, Australia
3University of Technology Sydney, Centre for Quantum Software and Information, Ultimo NSW 2007, Australia
4Department of Applied Mathematics, University of Waterloo, Waterloo, ON, Canada
5Institute for Quantum Computing, University of Waterloo, Waterloo, ON, Canada
6Department of Physics and Astronomy, University of Waterloo, Waterloo, ON, Canada
7Center for Quantum Information and Control, University of New Mexico, Albuquerque, NM 87131-0001, USA
8Department of Physics and Astronomy, Macquarie University, Sydney, NSW, Australia

Characterizing quantum systems through experimental data is critical to applications as diverse as metrology and quantum computing. Analyzing this experimental data in a robust and reproducible manner is made challenging, however, by the lack of readily-available software for performing principled statistical analysis. We improve the robustness and reproducibility of characterization by introducing an open-source library, QInfer, to address this need. Our library makes it easy to analyze data from tomography, randomized benchmarking, and Hamiltonian learning experiments either in post-processing, or online as data is acquired. QInfer also provides functionality for predicting the performance of proposed experimental protocols from simulated runs. By delivering easy-to-use characterization tools based on principled statistical analysis, QInfer helps address many outstanding challenges facing quantum technology.

Share

► BibTeX data

► References

[1] G. M. D'Ariano, M. D. Laurentis, M. G. A. Paris, A. Porzio, and S. Solimeno, ėlectlanguage enQuantum tomography as a tool for the characterization of optical devices, Journal of Optics B: Quantum and Semiclassical Optics 4, S127 (2002).
https://doi.org/10.1088/1464-4266/4/3/366

[2] J. B. Altepeter, D. Branning, E. Jeffrey, T. C. Wei, P. G. Kwiat, R. T. Thew, J. L. O'Brien, M. A. Nielsen, and A. G. White, Ancilla-assisted quantum process tomography, Phys. Rev. Lett. 90, 193601 (2003).
https://doi.org/10.1103/PhysRevLett.90.193601

[3] J. J. Wallman and S. T. Flammia, Randomized benchmarking with confidence, New Journal of Physics 16, 103032 (2014).
https://doi.org/10.1088/1367-2630/16/10/103032

[4] C. Granade, C. Ferrie, and D. G. Cory, Accelerated randomized benchmarking, New Journal of Physics 17, 013042 (2015a).
https://doi.org/10.1088/1367-2630/17/1/013042

[5] A. S. Holevo, Statistical Structure of Quantum Theory, edited by R. Beig, J. Ehlers, U. Frisch, K. Hepp, W. Hillebrandt, D. Imboden, R. L. Jaffe, R. Kippenhahn, R. Lipowsky, H. v. Löhneysen, I. Ojima, H. A. Weidenmüller, J. Wess, J. Zittartz, and W. Beiglböck, Lecture Notes in Physics Monographs, Vol. 67 (Springer Berlin Heidelberg, Berlin, Heidelberg, 2001).
https://doi.org/10.1007/3-540-44998-1

[6] C. W. Helstrom, ėlectlanguage enQuantum Detection and Estimation Theory (Academic Press, 1976).
https://doi.org/10.1007/BF01007479

[7] B. Goldacre, Scientists are hoarding data and it's ruining medical research, BuzzFeed (2015).
https:/​/​www.buzzfeed.com/​bengoldacre/​deworming-trials

[8] V. Stodden and S. Miguez, ėlectlanguage enBest practices for computational science: Software infrastructure and environments for reproducible and extensible research, Journal of Open Research Software 2, e21 (2014).
https://doi.org/10.5334/jors.ay

[9] J. P. A. Ioannidis, Why Most Published Research Findings Are False, PLOS Med 2, e124 (2005).
https://doi.org/10.1371/journal.pmed.0020124

[10] R. Hoekstra, R. D. Morey, J. N. Rouder, and E.-J. Wagenmakers, Robust misinterpretation of confidence intervals, Psychonomic Bulletin & Review , 1 (2014).
https://doi.org/10.3758/s13423-013-0572-3

[11] J. P. A. Ioannidis, How to Make More Published Research True, PLOS Med 11, e1001747 (2014).
https://doi.org/10.1371/journal.pmed.1001747

[12] Y. R. Sanders, J. J. Wallman, and B. C. Sanders, ėlectlanguage enBounding quantum gate error rate based on reported average fidelity, New Journal of Physics 18, 012002 (2016).
https://doi.org/10.1088/1367-2630/18/1/012002

[13] F. Pérez and B. E. Granger, IPython: A System for Interactive Scientific Computing, Computing in Science and Engineering 9, 21 (2007).
https://doi.org/10.1109/MCSE.2007.53

[14] Jupyter Development Team, Jupyter, (2016).
https:/​/​github.com/​jupyter/​jupyter

[15] S. R. Piccolo and M. B. Frampton, Tools and techniques for computational reproducibility, GigaScience 5, 30 (2016).
https://doi.org/10.1186/s13742-016-0135-4

[16] A. de Vries, Using R with Jupyter Notebooks, (2015).
http:/​/​blog.revolutionanalytics.com/​2015/​09/​using-r-with-jupyter-notebooks.html

[17] D. Donoho and V. Stodden, Reproducible research in the mathematical sciences, in The Princeton Companion to Applied Mathematics, edited by N. J. Higham (2015).
https:/​/​web.stanford.edu/​~vcs/​papers/​PCAM_20140620-VCS.pdf

[18] C. Granade, C. Ferrie, I. Hincks, S. Casagrande, T. Alexander, J. Gross, M. Kononenko, and Y. Sanders, QInfer Examples, http:/​/​goo.gl/​4sXY1t.
http:/​/​goo.gl/​4sXY1t

[19] M. Dolfi, J. Gukelberger, A. Hehn, J. Imriška, K. Pakrouski, T. F. Rønnow, M. Troyer, I. Zintchenko, F. Chirigati, J. Freire, and D. Shasha, A model project for reproducible papers: Critical temperature for the Ising model on a square lattice, (2014), arXiv:1401.2000 [cond-mat, physics:physics].
arXiv:1401.2000

[20] M. Van den Nest, Simulating quantum computers with probabilistic methods, Quant. Inf. Comp. 11, 784 (2011), arXiv:0911.1624.
arXiv:0911.1624

[21] C. Ferrie, C. E. Granade, and D. G. Cory, ėlectlanguage enHow to best sample a periodic probability distribution, or on the accuracy of Hamiltonian finding strategies, Quantum Information Processing 12, 611 (2013).
https://doi.org/10.1007/s11128-012-0407-6

[22] A. Sergeevich, A. Chandran, J. Combes, S. D. Bartlett, and H. M. Wiseman, Characterization of a qubit Hamiltonian using adaptive measurements in a fixed basis, Physical Review A 84, 052315 (2011).
https://doi.org/10.1103/PhysRevA.84.052315

[23] A. Doucet and A. M. Johansen, A Tutorial on Particle Filtering and Smoothing: Fifteen Years Later (2011).

[24] B. A. Chase and J. M. Geremia, Single-shot parameter estimation via continuous quantum measurement, Physical Review A 79, 022314 (2009).
https://doi.org/10.1103/PhysRevA.79.022314

[25] F. Huszár and N. M. T. Houlsby, Adaptive Bayesian quantum tomography, Physical Review A 85, 052120 (2012).
https://doi.org/10.1103/PhysRevA.85.052120

[26] C. E. Granade, C. Ferrie, N. Wiebe, and D. G. Cory, Robust online Hamiltonian learning, New Journal of Physics 14, 103013 (2012).
https://doi.org/10.1088/1367-2630/14/10/103013

[27] J. Liu and M. West, Combined parameter and state estimation in simulation-based filtering, in Sequential Monte Carlo Methods in Practice, edited by De Freitas and N. Gordon (Springer-Verlag, New York, 2001).
https://doi.org/10.1007/978-1-4757-3437-9_10

[28] D. W. Berry and H. M. Wiseman, Optimal States and Almost Optimal Adaptive Measurements for Quantum Interferometry, Physical Review Letters 85, 5098 (2000).
https://doi.org/10.1103/PhysRevLett.85.5098

[29] B. L. Higgins, D. W. Berry, S. D. Bartlett, H. M. Wiseman, and G. J. Pryde, ėlectlanguage enEntanglement-free Heisenberg-limited phase estimation, Nature 450, 393 (2007).
https://doi.org/10.1038/nature06257

[30] G. I. Struchalin, I. A. Pogorelov, S. S. Straupe, K. S. Kravtsov, I. V. Radchenko, and S. P. Kulik, Experimental adaptive quantum tomography of two-qubit states, Physical Review A 93, 012103 (2016).
https://doi.org/10.1103/PhysRevA.93.012103

[31] N. Wiebe, C. Granade, C. Ferrie, and D. G. Cory, Hamiltonian learning and certification using quantum resources, Physical Review Letters 112, 190501 (2014a).
https://doi.org/10.1103/PhysRevLett.112.190501

[32] N. Wiebe, C. Granade, C. Ferrie, and D. Cory, Quantum Hamiltonian learning using imperfect quantum resources, Physical Review A 89, 042314 (2014b).
https://doi.org/10.1103/PhysRevA.89.042314

[33] N. Wiebe, C. Granade, and D. G. Cory, Quantum bootstrapping via compressed quantum Hamiltonian learning, New Journal of Physics 17, 022005 (2015).
https://doi.org/10.1088/1367-2630/17/2/022005

[34] M. P. V. Stenberg, Y. R. Sanders, and F. K. Wilhelm, Efficient Estimation of Resonant Coupling between Quantum Systems, Physical Review Letters 113, 210404 (2014).
https://doi.org/10.1103/PhysRevLett.113.210404

[35] K. R. W. Jones, Principles of quantum inference, Annals of Physics 207, 140 (1991).
https://doi.org/10.1016/0003-4916(91)90182-8

[36] R. Blume-Kohout, ėlectlanguage enOptimal, reliable estimation of quantum states, New Journal of Physics 12, 043034 (2010).
https://doi.org/10.1088/1367-2630/12/4/043034

[37] C. Ferrie, ėlectlanguage enQuantum model averaging, New Journal of Physics 16, 093035 (2014).
https://doi.org/10.1088/1367-2630/16/9/093035

[38] C. Granade, J. Combes, and D. G. Cory, ėlectlanguage enPractical Bayesian tomography, New Journal of Physics 18, 033024 (2016a).
https://doi.org/10.1088/1367-2630/18/3/033024

[39] K. S. Kravtsov, S. S. Straupe, I. V. Radchenko, N. M. T. Houlsby, F. Huszár, and S. P. Kulik, Experimental adaptive Bayesian tomography, Physical Review A 87, 062122 (2013).
https://doi.org/10.1103/PhysRevA.87.062122

[40] A. Pitchford, C. Granade, P. D. Nation, and R. J. Johansson, QuTiP 4.0.0, (2015ėxtendash).
https://doi.org/10.5281/zenodo.220867

[41] C. Granade, C. Ferrie, and S. T. Flammia, Practical adaptive quantum tomography, (2016b), arXiv:1605.05039 [quant-ph].
arXiv:1605.05039

[42] W. Bruzda, V. Cappellini, H.-J. Sommers, and K. Życzkowski, Random quantum operations, Physics Letters A 373, 320 (2009).
https://doi.org/10.1016/j.physleta.2008.11.043

[43] E. Magesan, J. M. Gambetta, and J. Emerson, Scalable and robust randomized benchmarking of quantum processes, Physical Review Letters 106, 180504 (2011).
https://doi.org/10.1103/PhysRevLett.106.180504

[44] J. M. Gambetta, A. D. Córcoles, S. T. Merkel, B. R. Johnson, J. A. Smolin, J. M. Chow, C. A. Ryan, C. Rigetti, S. Poletto, T. A. Ohki, M. B. Ketchen, and M. Steffen, Characterization of Addressability by Simultaneous Randomized Benchmarking, Physical Review Letters 109, 240504 (2012).
https://doi.org/10.1103/PhysRevLett.109.240504

[45] J. Wallman, C. Granade, R. Harper, and S. T. Flammia, Estimating the coherence of noise, New Journal of Physics 17, 113020 (2015).
https://doi.org/10.1088/1367-2630/17/11/113020

[46] A. W. Cross, E. Magesan, L. S. Bishop, J. A. Smolin, and J. M. Gambetta, Scalable randomized benchmarking of non-Clifford gates, npj Quantum Information 2, 16012 (2016), arXiv:1510.02720.
https://doi.org/10.1038/npjqi.2016.12
arXiv:1510.02720

[47] R. Harper and S. T. Flammia, Estimating the fidelity of $T$ gates using standard interleaved randomized benchmarking, Quantum Science and Technology 2, 015008 (2017), arXiv:1608.02943 [quant-ph].
https://doi.org/10.1088/2058-9565/aa5f8d
arXiv:1608.02943

[48] S. Kimmel, M. P. da Silva, C. A. Ryan, B. R. Johnson, and T. Ohki, Robust Extraction of Tomographic Information via Randomized Benchmarking, Physical Review X 4, 011050 (2014).
https://doi.org/10.1103/PhysRevX.4.011050

[49] C. Ferrie and O. Moussa, Robust and efficient in situ quantum control, Physical Review A 91, 052306 (2015).
https://doi.org/10.1103/PhysRevA.91.052306

[50] D. J. Egger and F. K. Wilhelm, Adaptive Hybrid Optimal Quantum Control for Imprecisely Characterized Systems, Physical Review Letters 112, 240503 (2014).
https://doi.org/10.1103/PhysRevLett.112.240503

[51] M. Isard and A. Blake, ėlectlanguage enCONDENSATIONėxtemdashConditional Density Propagation for Visual Tracking, International Journal of Computer Vision 29, 5 (1998).
https://doi.org/10.1023/A:1008078328650

[52] B. A. Chase, B. Q. Baragiola, H. L. Partner, B. D. Black, and J. M. Geremia, Magnetometry via a double-pass continuous quantum measurement of atomic spin, Physical Review A 79, 062107 (2009).
https://doi.org/10.1103/PhysRevA.79.062107

[53] C. Granade, J. Combes, and D. G. Cory, Practical Bayesian tomography supplementary video: State-space state tomography, https:/​/​goo.gl/​mkibti (2015b).
https:/​/​goo.gl/​mkibti

[54] C. E. Granade, Characterization, Verification and Control for Large Quantum Systems, Ph.D. thesis (2015a).
https:/​/​uwspace.uwaterloo.ca/​handle/​10012/​9217

[55] N. Wiebe and C. Granade, Efficient Bayesian phase estimation, Physical Review Letters 117, 010503 (2016).
https://doi.org/10.1103/PhysRevLett.117.010503

[56] S. van der Walt, S. C. Colbert, and G. Varoquaux, The NumPy Array: A Structure for Efficient Numerical Computation, Computing in Science & Engineering 13, 22 (2011).
https://doi.org/10.1109/MCSE.2011.37

[57] IPython Development Team, Ipyparallel, (2016).
https:/​/​github.com/​ipython/​ipyparallel

[58] A. Lee, C. Yau, M. B. Giles, A. Doucet, and C. C. Holmes, On the Utility of Graphics Cards to Perform Massively Parallel Simulation of Advanced Monte Carlo Methods, Journal of Computational and Graphical Statistics 19, 769 (2010).
https://doi.org/10.1198/jcgs.2010.10039

[59] A. Klöckner, N. Pinto, Y. Lee, B. Catanzaro, P. Ivanov, and A. Fasih, PyCUDA and PyOpenCL: A Scripting-Based Approach to GPU Run-Time Code Generation, Parallel Computing 38, 157 (2012).
https://doi.org/10.1016/j.parco.2011.09.001

[60] S. K. Lam, A. Pitrou, and S. Seibert, Numba: A LLVM-based Python JIT Compiler, in Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC, LLVM '15 (ACM, New York, NY, USA, 2015) pp. 7:1-7:6.
https://doi.org/10.1145/2833157.2833162

[61] J. D. Hunter, Matplotlib: A 2D graphics environment, Computing In Science & Engineering 9, 90 (2007).
https://doi.org/10.1109/MCSE.2007.55

[62] T. S. Yu, Mpltools, (2015).
http:/​/​tonysyu.github.io/​mpltools/​

[63] T. M. Cover and J. A. Thomas, ėlectlanguage EnglishElements of Information Theory (Wiley-Interscience, Hoboken, N.J., 2006).

[64] R. D. Gill and B. Y. Levit, ėlectlanguage ENApplications of the van Trees inequality: A Bayesian Cramér-Rao bound, Bernoulli 1, 59 (1995), mathematical Reviews number (MathSciNet): MR1354456.
http:/​/​projecteuclid.org/​euclid.bj/​1186078362

[65] H. Jeffreys, ėlectlanguage enThe Theory of Probability (Oxford University Press, Oxford, 1998).

[66] W. Edwards, H. Lindman, and L. J. Savage, Bayesian statistical inference for psychological research, Psychological Review 70, 193 (1963).
https://doi.org/10.1037/h0044139

[67] A. M. Johansen, A. Doucet, and M. Davy, ėlectlanguage enParticle methods for maximum likelihood estimation in latent variable models, Statistics and Computing 18, 47 (2008).
https://doi.org/10.1007/s11222-007-9037-8

[68] J. Deutscher, A. Blake, and I. Reid, Articulated body motion capture by annealed particle filtering, in Proceedings IEEE Conference on Computer Vision and Pattern Recognition. CVPR 2000 (Cat. No.PR00662), Vol. 2 (2000) pp. 126-133 vol.2.
https://doi.org/10.1109/CVPR.2000.854758

[69] C. Ferrie and C. E. Granade, Likelihood-free methods for quantum parameter estimation, Physical Review Letters 112, 130402 (2014).
https://doi.org/10.1103/PhysRevLett.112.130402

[70] S. G. Johnson, PyCall.jl, (2016).
https:/​/​github.com/​JuliaPy/​PyCall.jl

[71] A. Beskos, D. Crisan, and A. Jasra, ėlectlanguage ENOn the stability of sequential Monte Carlo methods in high dimensions, The Annals of Applied Probability 24, 1396 (2014).
https://doi.org/10.1214/13-AAP951

[72] M. West, Approximating posterior distributions by mixture, Journal of the Royal Statistical Society. Series B (Methodological) 55, 409 (1993).
http:/​/​www.jstor.org/​stable/​2346202

[73] Y. Sanders, Characterizing Errors in Quantum Information Processors, Ph.D. thesis, University of Waterloo (2016).
http:/​/​hdl.handle.net/​10012/​10467

[74] T. Minka, A Family of Algorithms for Approximate Bayesian Inference, Ph.D. thesis, Massachusetts Institute of Technology (2001).
https:/​/​hdl.handle.net/​1721.1/​86583

[75] C. Granade, Robust online Hamiltonian learning: Multi-$\cos^2$ model resampling, https:/​/​goo.gl/​O2KmEQ (2015b).
https:/​/​goo.gl/​O2KmEQ