Skip to content

Commit

Permalink
Increase tolerance for a flaky test (test_single_return_value) (#703)
Browse files Browse the repository at this point in the history
* 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 <github-ringo-but-quantum@xanadu.ai>
  • Loading branch information
AmintorDusko and ringo-but-quantum committed Apr 29, 2024
1 parent dcfab73 commit 05a98ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Expand Up @@ -132,6 +132,9 @@
* Update the version of `codecov-action` to v4 and fix the CodeCov issue with the PL-Lightning check-compatibility actions.
[(#682)](https://github.com/PennyLaneAI/pennylane-lightning/pull/682)

* Increase tolerance for a flaky test.
[(#703)](https://github.com/PennyLaneAI/pennylane-lightning/pull/703)

### Contributors

This release contains contributions from (in alphabetical order):
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.36.0-dev44"
__version__ = "0.36.0-dev45"
2 changes: 1 addition & 1 deletion tests/lightning_qubit/test_measurements_class.py
Expand Up @@ -474,7 +474,7 @@ def test_single_return_value(self, measurement, observable, lightning_sv, tol):
result = m.measure_final_state(tape)

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

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

0 comments on commit 05a98ae

Please sign in to comment.