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

Simplifies logic of normal_ordered_expectation #228

Closed nquesada closed 3 years ago

nquesada commented 3 years ago

Removes mutually cancelling np.conj from normal_ordered_expectation.

nquesada commented 3 years ago

Yup, exactly that. I think I spent too much time on the tests and then forgot to clean up the actual function. Thanks for the quick review!

codecov[bot] commented 3 years ago

Codecov Report

Merging #228 (0444c0c) into master (706e38d) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #228   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines         1188      1187    -1     
=========================================
- Hits          1188      1187    -1     
Impacted Files Coverage Δ
thewalrus/quantum/means_and_variances.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 706e38d...4cb7b59. Read the comment docs.