  Gaussian boson sampling (GBS) is a near-term quantum computation framework
that is believed to be classically intractable, but yet rich of potential
applications. In this paper we study the intimate relation between
distributions defined over classes of samples from a GBS device with graph
matching polynomials. For this purpose, we introduce a new graph polynomial
called the displaced GBS polynomial, whose coefficients are the coarse-grained
photon-number probabilities of an arbitrary undirected graph $G$ encoded in a
GBS device. We report a discovery of a duality between the displaced GBS
polynomial of $G$ and the matching polynomial of $G\,\square\,P_2(x)$ - the
Cartesian graph product of $G$ with a single weighted edge also known as the
prism over $G$. Besides the surprising insight gained into Gaussian boson
sampling, it opens the door for the new way of classically simulating the
Gaussian boson sampling device. Furthermore, it motivates the recent success of
a new type of coarse-grained quantum statistics used to construct feature maps
in [Schuld et al. 2019].
