Closed josh146 closed 4 years ago
Merging #364 into master will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #364 +/- ##
=======================================
Coverage 97.68% 97.68%
=======================================
Files 52 52
Lines 6443 6444 +1
=======================================
+ Hits 6294 6295 +1
Misses 149 149
Impacted Files | Coverage Δ | |
---|---|---|
strawberryfields/backends/fockbackend/circuit.py | 98.42% <100.00%> (+<0.01%) |
:arrow_up: |
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 a0d9ad0...4de1d46. Read the comment docs.
Context:
To calculate homodyne measurements in the Fock backend, a Hermite polynomial probability distribution is computed. However, due to floating point precision error, values in the probability distribution may have a small negative value (e.g.,
-2e-20
), causing issues whennp.random.multinomial
is subsequently called.Description of the Change:
Small negative values are set to zero in the probability distribution using NumPy fancy indexing.
Benefits: Fixes #354
Possible Drawbacks: n/a
Related GitHub Issues: #354