XanaduAI / thewalrus

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling.
https://the-walrus.readthedocs.io
Apache License 2.0
99 stars 54 forks source link

Add Godsil-Gutman estimator #392

Open aleksey-uvarov opened 1 month ago

aleksey-uvarov commented 1 month ago

Context: Randomized estimators of the Hafnian of a nonnegative matrices can be implemented in two different manners. Previously hafnian_approx() only implemented one of them

Description of the Change: Added an option to use the Godsil-Gutman estimator. Also changed the signature of hafnian() so that now all methods are controlled by the method parameter, and the approx parameter is removed as redundant.

Benefits:

Possible Drawbacks:

Related GitHub Issues: