Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the flakey two qubit IRB test #1085

Merged
merged 6 commits into from
Oct 11, 2024
Merged

Fix the flakey two qubit IRB test #1085

merged 6 commits into from
Oct 11, 2024

Conversation

cdbf1
Copy link
Contributor

@cdbf1 cdbf1 commented Oct 4, 2024

Fixes #1084

Cause: The numpy random number generator didn't seem to be patched properly.

Solution: fix the patch and also path the single qubit Clifford generator so that it outputs a fixed value (not strictly necessary but leads to a more predictable test)

@@ -82,9 +81,14 @@ def test_irb_random_clifford() -> None:


def test_random_two_qubit_clifford() -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's too many mocks going on here. Let's delete this test. There are quality end-to-end tests that are getting us the 100% coverage we need.

Copy link
Contributor Author

@cdbf1 cdbf1 Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've removed this test and added a random seed to test_gates_per_clifford() which ensure we still get 100% coverage.

Copy link
Member

@vtomole vtomole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cdbf1 cdbf1 merged commit e8751b8 into main Oct 11, 2024
20 checks passed
@cdbf1 cdbf1 deleted the fix/flakey_two_qubit_irb_test branch October 11, 2024 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

supermarq/qcvv/irb_test.py::test_random_two_qubit_clifford test flakes
2 participants