Skip to content

Commit 3a2a341

Browse files
committed
Lower shots, increase tol.
1 parent 7fbc261 commit 3a2a341

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_measurements.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def test_sample_values(self, qubit_device, tol):
669669
@pytest.mark.parametrize("nwires", range(1, 11))
670670
def test_sample_variations(self, qubit_device, nwires, seed):
671671
"""Tests if `sample(wires)` returns correct statistics."""
672-
shots = 100000
672+
shots = 20000
673673
n_qubits = max(5, nwires + 1)
674674
np.random.seed(seed)
675675
wires = qml.wires.Wires(np.random.permutation(nwires))
@@ -694,7 +694,7 @@ def reshape_samples(samples):
694694
reshape_samples(samples), wire_order=wires
695695
)
696696

697-
assert np.allclose(probs, ref, atol=1.0e-2, rtol=1.0e-4)
697+
assert np.allclose(probs, ref, atol=2.0e-2, rtol=1.0e-4)
698698

699699

700700
@pytest.mark.skipif(

0 commit comments

Comments
 (0)