A faster hafnian formula for complex matrices and its benchmarking on the Titan 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 \times n $ complex matrices run in $O(n^3 2^{n/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 \times 56$ indicate that one would require the 288,000 CPUs of this machine for about a month and a half to compute the hafnian of a $100 \times 100$ matrix.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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