The Walrus: a library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling. In The Walrus, we provide a highly optimized implementation of the best known algorithms for hafnians, loop hafnians, multidimensional Hermite polynomials, and torontonians of generic real and complex matrices. We also provide access to recently proposed methods to generate samples of a Gaussian boson sampler. These methods have exponential time complexity in the number of bosons measured. For ease of use, a Python interface to the library’s low-level C++ implementations is also provided, as well as pre-compiled static libraries installable via the Python package managerpip. This short paper provides a high-level description of the library and its rationale; in-depth information on the algorithms, implementations and interface can be found in its documentation.

Keywords for this software

Anything in here will be replaced on browsers that support the canvas element