Reproducible test flake in parallel_xeb_test.py
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 56/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- quantum-computing, testing
Research direction
Start with cirq-core/cirq/experiments/benchmarking/parallel_xeb_test.py, especially test_parallel_two_qubit_xeb_with_device near line 335, and reproduce the failure using the supplied pytest command and seed. Investigate the root cause, including the possible connection to #6916. Done when the test passes reliably across random seeds; the issue also suggests a retry decorator as a fallback.
Written by the indexing model from the issue text.
Description
Describe the issue
A CI failure of test_parallel_two_qubit_xeb_with_device can be locally reproduced by using the same random seed. I suspect there are more random seeds where this test fails resulting in a flaky CI behavior.
pytest --randomly-seed=2045490064 \
cirq-core/cirq/experiments/benchmarking/parallel_xeb_test.py::test_parallel_two_qubit_xeb_with_device
...
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.3
E
E Mismatched elements: 2 / 6 (33.3%)
E Mismatch at indices:
E [4]: 0.3318661144454391 (ACTUAL), 0.9 (DESIRED)
E [5]: 0.0 (ACTUAL), 0.9 (DESIRED)
E Max absolute difference among violations: 0.9
E Max relative difference among violations: 1.
E ACTUAL: array([0.944047, 0.917741, 0.914741, 0.83415 , 0.331866, 0. ])
E DESIRED: array(0.9)
cirq-core/cirq/experiments/benchmarking/parallel_xeb_test.py:335: AssertionError
Tell us the version of Cirq where this happens
1.8.0.dev0 at 75c5cd2b8cc242fd1c9440c9f55ec4a1621138aa
Reproduced in a Python 3.11 virtual environment with numpy-2.4.6.
Proposed solution
Identify and fix the root cause of this test failure (possible similarity with #6916).
If that is too tedious, we can slap on the @cirq.testing.retry_once_with_later_random_values decorator to reduce the flakes.
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 48
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quantumlib/Cirq
-
Potential missed optimization: `drop_diagonal_before_measurement` leaves an identity `PhasedXZGate` that blocks further removalPossibly taken @jangyoujin0917 claimed this 22 days ago. Openarea/gates area/optimization kind/feature-request triage/accepted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
quantumlib/Cirq#8523 · 1 comment ·
Maintainers usually reply within 1 day
-
`defer_measurements` ignores `BitMaskKeyCondition.index` and changes circuit behaviorMay be free again @Tejendra-06 claimed this 54 days ago, and no pull request is open. Opengood for learning help wanted kind/bug-report skill/experienced triage/accepted triage/wont-fix
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
quantumlib/Cirq#8361 · 8 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
kind/feature-request triage/discuss
quantumlib/Cirq#8598 ·
Maintainers usually reply within 1 day
-
area/docstrings area/google kind/bug-report triage/discuss
Difficulty 1/5 1-3 hours Newbie friendliness 91/100
quantumlib/Cirq#8587 ·
Maintainers usually reply within 1 day
-
kind/bug-report triage/discuss
Difficulty 2/5 1-3 hours Newbie friendliness 57/100
quantumlib/Cirq#8580 ·
Maintainers usually reply within 1 day
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day