-
Notifications
You must be signed in to change notification settings - Fork 571
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
Bugfix for split_non_commuting when tape measurements is empty #5869
Conversation
Hello. You may have forgotten to update the changelog!
|
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.
Just one comment, otherwise LGTM! Here's a 🚀
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5869 +/- ##
==========================================
- Coverage 99.68% 99.67% -0.01%
==========================================
Files 421 421
Lines 40457 40165 -292
==========================================
- Hits 40328 40035 -293
- Misses 129 130 +1 ☔ 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.
LGTM
[sc-60186] |
Edit: wrong story ID |
[sc-60188] |
Context:
Currently on master, if we apply
split_non_commuting
to a tape with empty measurements, we delete the tape:Description of the Change:
We add a check for
len(measurements) == 0
and just return the tape if there are no measurements to split, so we get:Benefits:
We don't delete the tape if it has no measurements (came up in catalyst tests)