-
Notifications
You must be signed in to change notification settings - Fork 604
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
Improving interface determination in pauli_decompose
#4577
Conversation
can you give an example for when this happens? I'm guessing something like batched matrices in a list? Perhaps a test would help highlight what you're fixing. While we're here, what was this line intended to do before this change? |
A very simple example might be the following - |
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 to go as soon as merge conflicts are solved 👍
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4577 +/- ##
=======================================
Coverage 99.64% 99.64%
=======================================
Files 376 376
Lines 33123 33123
=======================================
Hits 33007 33007
Misses 116 116
☔ View full report in Codecov by Sentry. |
**Context:** Improving support for determining the `non-numpy` interfaces when enclosed within builtin types. **Description of the Change:** We use `next(iter([*matrix[0]]), []))` instead of `matrix` to determine the interface to work with. **Benefits:** All interfaces are identified correctly for the provided matrix object. **Possible Drawbacks:** None **Related GitHub Issues:** None
Context: Improving support for determining the
non-numpy
interfaces when enclosed within builtin types.Description of the Change: We use
next(iter([*matrix[0]]), []))
instead ofmatrix
to determine the interface to work with.Benefits: All interfaces are identified correctly for the provided matrix object.
Possible Drawbacks: None
Related GitHub Issues: None