-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Generalize DensePauliString.mul to handle multi-qubit Paulis #7643
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7643 +/- ##
==========================================
- Coverage 99.37% 99.37% -0.01%
==========================================
Files 1078 1078
Lines 96166 96162 -4
==========================================
- Hits 95563 95558 -5
- Misses 603 604 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 with a couple of minor suggestions.
Thank you for taking care of this!
Instead of special blocks to handle paulis on linequbits in each of mul, rmul, imul, and commutes, this PR just converts any paulis to DensePauliString up-front. That allows removal of the special handling blocks, plus generalizes to multi-qubit paulis and eliminates out-of-bounds errors.
Fixes #7640