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

removes unnecesary statements #329

Closed nquesada closed 2 years ago

nquesada commented 2 years ago

Removes unnecesary condition.

In the early days, to calculate a loop hafnian of odd size, we will turn the matrix into an even size one by adding one extra column and row of zeros and a one in the diagonal. This is no longer needed due to the methods from @jakebulmer .

This PR removes this vestigial code.

codecov[bot] commented 2 years ago

Codecov Report

Merging #329 (3093e8c) into master (2e32e46) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #329   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1645      1644    -1     
=========================================
- Hits          1645      1644    -1     
Impacted Files Coverage Δ
thewalrus/_hafnian.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 2e32e46...3093e8c. Read the comment docs.