Abstract
A famously hard graph problem with a broad range of applications is computing the number of perfect matchings, that is, the number of unique and complete pairings of the vertices of a graph. We propose a method to estimate the number of perfect matchings of undirected graphs based on the relation between Gaussian boson sampling and graph theory. The probability of measuring zero or one photons in each output mode is directly related to the hafnian of the adjacency matrix, and thus to the number of perfect matchings of a graph. We present encodings of the adjacency matrix of a graph into a Gaussian state and show strategies to boost the sampling success probability for the studied graphs. With our method, a Gaussian boson sampling device can be used to estimate the number of perfect matchings significantly faster and with lower-energy consumption compared to a classical computer.
Introduction
In graph theory, a perfect matching is a set of edges that connects every vertex in a graph exactly once. While finding a single perfect matching is computationally efficient, counting the total number of unique perfect matchings is a famously difficult task. This problem belongs to the #P-complete complexity class, meaning the computational time required grows exponentially with the size of the graph. This challenge has significant implications in fields ranging from molecular chemistry to social network analysis and logistics.
The Hafnian Connection
The researchers establish a direct link between graph theory and quantum optics through the hafnian of a matrix. The number of perfect matchings in an undirected graph is exactly equal to the hafnian of its adjacency matrix $A$. In the context of Gaussian Boson Sampling (GBS), the probability of detecting a specific photon pattern at the output is proportional to the hafnian of the matrix describing the quantum state. By encoding an arbitrary adjacency matrix into a physically realizable Gaussian covariance matrix $\sigma_A$, the counting problem is transformed into a quantum sampling task.
Quantum Architectures
To implement this encoding, the authors propose two primary circuit architectures. One approach involves mixed states using thermal states and squeezers. A more experimentally accessible strategy uses pure states via a "doubling" method. In this setup, two copies of the graph ($A \oplus A$) are used to prepare a pure Gaussian state, which is easier to implement in current photonic hardware.
Optimization and Key Results
A critical challenge in GBS is the exponential decay of successful measurement probabilities as graph size increases. The authors introduced an "eigenvalue hack" to mitigate this. By adding or subtracting diagonal elements—representing self-loops that do not change the number of perfect matchings—the largest eigenvalue of the adjacency matrix can be tuned. This modification significantly boosts the probability of successful photon detection without altering the final count.
For a 20-vertex complete graph, this "diagonal hack" increased measurement probabilities by several orders of magnitude. Furthermore, the study quantified squeezing requirements, showing that a moderate 10 dB of squeezing is sufficient for a 40-vertex graph, placing these experiments within the reach of current high-rate photonic detectors. Even for massive graphs of 5,000 vertices, the framework provides a clear roadmap for future hardware development.
Conclusion
This work demonstrates that GBS on arbitrary graphs is a strong candidate for practical quantum advantage. While hardware constraints like high-level squeezing remain for massive graphs, the proposed framework provides a scalable roadmap for estimating #P-complete graph properties with significantly lower energy consumption than classical supercomputers.
Summary updated