XanaduAI / thewalrus

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

Remove eigen #259

Closed nquesada closed 3 years ago

codecov[bot] commented 3 years ago

Codecov Report

Merging #259 (dcb36be) into master (5572ee4) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #259   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         1315      1317    +2     
=========================================
+ Hits          1315      1317    +2     
Impacted Files Coverage Δ
thewalrus/_hafnian.py 100.00% <100.00%> (ø)
thewalrus/_torontonian.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5572ee4...dcb36be. Read the comment docs.

jakeffbulmer commented 3 years ago

@nquesada
The docstrings for the torontonian should be updated. It might be nice to also add in the docstring that if you want to run a big torontonian calculation, it is much faster to first calculate a small torontonian to compile the function, then run the larger torontonian. We could even consider compiling automatically by calling a small instance upon import but maybe that's not a good idea?

Numba also has an "ahead of time" compile functionality. It compiles at the installation of the package, but apparently gives slightly less optimized code. However, I've never used it, so I don't know how easy/reliable/fast it is.

Also, suggestion for a speed improvement would be to parallelize the outer loop.