XanaduAI / thewalrus

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

Remove redundant Qmat, Amat calls from generate_hafnian_sample #343

Closed thonic closed 2 years ago

thonic commented 2 years ago

Context: There is an extra call of the Qmat function in the generate_hafnian_sample function.

Description of the Change: Remove redundant call of Qmat, Amat from generate_hafnian_sample.

Benefits: Removed redundant code

Possible Drawbacks: None

Related GitHub Issues: None

codecov[bot] commented 2 years ago

Codecov Report

Merging #343 (16c018b) into master (d15656c) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #343   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         1726      1725    -1     
=========================================
- Hits          1726      1725    -1     
Impacted Files Coverage Δ
thewalrus/samples.py 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 d15656c...16c018b. Read the comment docs.

thonic commented 2 years ago

@thisac I agree with all the comments, I have changed the commits accordingly, thank you.

thonic commented 2 years ago

@sduquemesa done