A Faster Hafnian Formula for Complex Matrices and Its Benchmarking on a Supercomputer

We introduce new and simple algorithms for the calculation of the number of perfect matchings of complex weighted, undirected graphs with and without loops. Our compact formulas for the hafnian and loop hafnian of n × n complex matrices run in O(n3 2n/2) time, are embarrassingly parallelizable and, to the best of our knowledge, are the fastest exact algorithms to compute these quantities. Despite our highly optimized algorithm, numerical benchmarks on the Titan supercomputer with matrices up to size 56 × 56 indicate that one would require the 288,000 CPUs of this machine for about 6 weeks to compute the hafnian of a 100 × 100 matrix.

[1]  Steve Chien A determinant-based algorithm for counting perfect matchings in a general graph , 2004, SODA '04.

[2]  Aram W. Harrow,et al.  Quantum computational supremacy , 2017, Nature.

[3]  Alexander I. Barvinok,et al.  Two Algorithmic Results for the Traveling Salesman Problem , 1996, Math. Oper. Res..

[4]  Scott Aaronson,et al.  Quantum Computing since Democritus , 2013 .

[5]  Cheryl E. Praeger,et al.  Computing Minimal Polynomials of Matrices , 2007, ArXiv.

[6]  N. Killoran,et al.  Strawberry Fields: A Software Platform for Photonic Quantum Computing , 2018, Quantum.

[7]  Thore Husfeldt,et al.  Invitation to Algorithmic Uses of Inclusion-Exclusion , 2011, ICALP.

[8]  Jesper Nederlof Fast Polynomial-Space Algorithms Using Möbius Inversion: Improving on Steiner Tree and Related Problems , 2009, ICALP.

[9]  H. Hosoya Topological Index. A Newly Proposed Quantity Characterizing the Topological Nature of Structural Isomers of Saturated Hydrocarbons , 1971 .

[10]  Walter Keller-Gehrig,et al.  Fast Algorithms for the Characteristic Polynomial , 1985, Theor. Comput. Sci..

[11]  A. Lvovsky Squeezed Light , 2014, A Guide to Experiments in Quantum Optics.

[12]  M. Abramowitz,et al.  Handbook of Mathematical Functions With Formulas, Graphs and Mathematical Tables (National Bureau of Standards Applied Mathematics Series No. 55) , 1965 .

[13]  Raymond Kan From moments of sum to moments of product , 2008 .

[14]  Alexander I. Barvinok,et al.  Combinatorics and Complexity of Partition Functions , 2017, Algorithms and combinatorics.

[15]  N. Quesada Franck-Condon factors by counting perfect matchings of graphs with loops. , 2018, The Journal of chemical physics.

[16]  Vasa Curcin,et al.  Detailed Clinical Modelling Approach to Data Extraction from Heterogeneous Data Sources for Clinical Research , 2014, AMIA Joint Summits on Translational Science proceedings. AMIA Joint Summits on Translational Science.

[17]  Igor Jex,et al.  Gaussian Boson sampling , 2016, 2017 Conference on Lasers and Electro-Optics (CLEO).

[18]  Yang Wang,et al.  Computing Permanents for Boson Sampling on Tianhe-2 Supercomputer , 2016, National Science Review.

[19]  Arne Storjohann,et al.  An O(n3) algorithm for the Frobenius normal form , 1998, ISSAC '98.

[20]  David G. Glynn,et al.  Permanent formulae from the Veronesean , 2013, Des. Codes Cryptogr..

[21]  Igor Pak,et al.  Non-commutative extensions of the MacMahon Master Theorem , 2006 .

[22]  Raphaël Clifford,et al.  The Classical Complexity of Boson Sampling , 2017, SODA.

[23]  Masami Saeki,et al.  An Efficient GPU Implementation of Bulk Computation of the Eigenvalue Problem for Many Small Real Non-symmetric Matrices , 2017, Int. J. Netw. Comput..

[24]  Scott Aaronson,et al.  The computational complexity of linear optics , 2010, STOC '11.

[25]  Marcin Pilipczuk,et al.  Faster Exponential-Time Algorithms in Graphs of Bounded Average Degree , 2013, ICALP.

[26]  Donald St. P. Richards,et al.  MacMahon's Master Theorem, Representation Theory, and Moments of Wishart Distributions , 2001, Adv. Appl. Math..

[27]  Andreas Björklund,et al.  Exact Algorithms for Exact Satisfiability and Number of Perfect Matchings , 2007, Algorithmica.

[28]  Alex Samorodnitsky,et al.  Hafnians, perfect matchings and Gaussian matrices , 2014 .

[29]  Christian Weedbrook,et al.  Gaussian boson sampling for perfect matchings of arbitrary graphs , 2017, Physical Review A.

[30]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[31]  A. I. Lvovsky,et al.  5. Squeezed Light , 2015 .

[32]  Igor Jex,et al.  Detailed study of Gaussian boson sampling , 2018, Physical Review A.

[33]  Charles R. Johnson,et al.  Matrix analysis , 1985, Statistical Inference for Engineers and Data Scientists.

[34]  Alexander Barvinok,et al.  Approximating permanents and hafnians , 2016, 1601.07518.

[35]  Juan Miguel Arrazola,et al.  Classical benchmarking of Gaussian Boson Sampling on the Titan supercomputer , 2018, Quantum Inf. Process..

[36]  Andreas Björklund,et al.  Exact Algorithms for Exact Satisfiability and Number of Perfect Matchings , 2006, ICALP.

[37]  Piotr Sankowski Alternative Algorithms for Counting All Matchings in Graphs , 2003, STACS.

[38]  Grzegorz A. Rempala,et al.  Symmetric functionals on random matrices and random matchings problems , 2007 .

[39]  Mikko Koivisto,et al.  Partitioning into Sets of Bounded Cardinality , 2009, IWPEC.

[40]  Andreas Björklund,et al.  Counting perfect matchings as fast as Ryser , 2011, SODA.

[41]  Mark Giesbrecht,et al.  Nearly Optimal Algorithms for Canonical Matrix Forms , 1995, SIAM J. Comput..

[42]  Leslie G. Valiant,et al.  The Complexity of Computing the Permanent , 1979, Theor. Comput. Sci..

[43]  Milton Abramowitz,et al.  Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables , 1964 .

[44]  Alexander I. Barvinok,et al.  Polynomial Time Algorithms to Approximate Permanents and Mixed Discriminants Within a Simply Exponential Factor , 1999, Random Struct. Algorithms.

[45]  Baida Zhang,et al.  A Benchmark Test of Boson Sampling on Tianhe-2 Supercomputer , 2018 .

[46]  Juan Miguel Arrazola,et al.  Gaussian boson sampling using threshold detectors , 2018, Physical Review A.

[47]  James Stuart Tanton,et al.  Encyclopedia of Mathematics , 2005 .

[48]  Raphaël Clifford,et al.  Classical boson sampling algorithms with superior performance to near-term experiments , 2017, Nature Physics.