Skip to content

Commit 05a98ae

Browse files
Increase tolerance for a flaky test (test_single_return_value) (#703)
* update dev version * increase tolerance * update changelog * trigger CIs * Auto update version from '0.36.0-dev44' to '0.36.0-dev45' --------- Co-authored-by: ringo-but-quantum <[email protected]>
1 parent dcfab73 commit 05a98ae

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@
132132
* Update the version of `codecov-action` to v4 and fix the CodeCov issue with the PL-Lightning check-compatibility actions.
133133
[(#682)](https://github.com/PennyLaneAI/pennylane-lightning/pull/682)
134134

135+
* Increase tolerance for a flaky test.
136+
[(#703)](https://github.com/PennyLaneAI/pennylane-lightning/pull/703)
137+
135138
### Contributors
136139

137140
This release contains contributions from (in alphabetical order):

pennylane_lightning/core/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
Version number (major.minor.patch[-label])
1717
"""
1818

19-
__version__ = "0.36.0-dev44"
19+
__version__ = "0.36.0-dev45"

tests/lightning_qubit/test_measurements_class.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ def test_single_return_value(self, measurement, observable, lightning_sv, tol):
474474
result = m.measure_final_state(tape)
475475

476476
# a few tests may fail in single precision, and hence we increase the tolerance
477-
assert np.allclose(result, expected, max(tol, 1.0e-5))
477+
assert np.allclose(result, expected, max(tol, 1.0e-4))
478478

479479
@flaky(max_runs=5)
480480
@pytest.mark.parametrize("shots", [None, 1000000])

0 commit comments

Comments
 (0)