-
Notifications
You must be signed in to change notification settings - Fork 35
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
Trim down MCM tests. #754
Trim down MCM tests. #754
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #754 +/- ##
==========================================
- Coverage 93.40% 92.71% -0.70%
==========================================
Files 120 15 -105
Lines 17462 1729 -15733
==========================================
- Hits 16311 1603 -14708
+ Misses 1151 126 -1025 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far!
Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @vincentmr. Great PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vincentmr ! Just a few question but happy to approve.
Please complete the following checklist when submitting a PR: - [x] All new features must include a unit test. If you've fixed a bug or added code that should be tested, add a test to the [`tests`](../tests) directory! - [x] All new functions and code must be clearly commented and documented. If you do make documentation changes, make sure that the docs build and render correctly by running `make docs`. - [x] Ensure that the test suite passes, by running `make test`. - [x] Add a new entry to the `.github/CHANGELOG.md` file, summarizing the change, and including a link back to the PR. - [x] Ensure that code is properly formatted by running `make format`. When all the above are checked, delete everything above the dashed line and fill in the pull request template. ------------------------------------------------------------------------------------------------------------ **Context:** MCM tests are slow and dominate the CI run time. New tests have been incorporated as new features came in without rationalizing the test suite as a whole. There are redundant or overly parametrized tests as a results. **Description of the Change:** Combine a bunch of tests into `test_simple_dynamic_circuit` which tests all possible measurements are handle correctly by `dynamic_one_shot` post-processing. This needs not be parametrized over `reset` since it does not show up in post-processing. Combine some tests into `test_multiple_measurements_and_reset` which checks that multiple measurements are handle correctly and that `reset` is properly applied while getting to the final state. Combine all composite MCM measurements in `test_composite_mcms`. `test_counts_return_type` remains as is. **Benefits:** Faster CI. **Possible Drawbacks:** **Related GitHub Issues:** [sc-65255] --------- Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Before submitting
Please complete the following checklist when submitting a PR:
All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
tests
directory!All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs
.Ensure that the test suite passes, by running
make test
.Add a new entry to the
.github/CHANGELOG.md
file, summarizing thechange, and including a link back to the PR.
Ensure that code is properly formatted by running
make format
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context:
MCM tests are slow and dominate the CI run time. New tests have been incorporated as new features came in without rationalizing the test suite as a whole. There are redundant or overly parametrized tests as a results.
Description of the Change:
Combine a bunch of tests into
test_simple_dynamic_circuit
which tests all possible measurements are handle correctly bydynamic_one_shot
post-processing. This needs not be parametrized overreset
since it does not show up in post-processing.Combine some tests into
test_multiple_measurements_and_reset
which checks that multiple measurements are handle correctly and thatreset
is properly applied while getting to the final state.Combine all composite MCM measurements in
test_composite_mcms
.test_counts_return_type
remains as is.Benefits:
Faster CI.
Possible Drawbacks:
Related GitHub Issues:
[sc-65255]