Skip to content

Commit 4de1d46

Browse files
authored
Update strawberryfields/backends/fockbackend/circuit.py
1 parent 21bb21f commit 4de1d46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strawberryfields/backends/fockbackend/circuit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ def measure_homodyne(self, phi, mode, select=None, **kwargs):
767767
# Due to floating point precision error, values in the calculated probability distribution
768768
# may have a very small negative value of -epsilon. The following sets
769769
# these small negative values to 0.
770-
probs[np.abs(probs) < 1e-16] = 0
770+
probs[np.abs(probs) < 1e-10] = 0
771771

772772
sample_hist = np.random.multinomial(1, probs)
773773
sample_idx = list(sample_hist).index(1)

0 commit comments

Comments
 (0)