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

Banded hafnian algorithm #345

Open changhun0218 opened 2 years ago

changhun0218 commented 2 years ago

Before posting a feature request

Feature details

Would it be possible to accelerate hafnian_banded function? If I understand correctly, the code is not using numba or jit, so it seems to take quite a time.

Implementation

No response

How important would you say this feature is?

2: Somewhat important. Needed this quarter.

Additional information

No response

sduquemesa commented 2 years ago

Hi @changhun0218, thanks for your feature request!

This piece of code can indeed be speed up by using numba, let us look into it. If you feel this is something you can tackle yourself, we encourage you to open a new PR with your contribution.