-
Notifications
You must be signed in to change notification settings - Fork 627
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
Compute matrix of only the operators that act on overlapping wires #3084
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #3084 +/- ##
=======================================
Coverage 99.69% 99.69%
=======================================
Files 276 276
Lines 24232 24273 +41
=======================================
+ Hits 24159 24200 +41
Misses 73 73
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
[sc-26176] |
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! Just a few comments regarding the implementation and it should be good to go 👍🏼
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
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! Glad to have this in 💯
overlapping_ops
property to theComposite
class.eigvals
,diagonalizing_gates
andProd.matrix
methods using the aforementioned property.eigvals
method to theComposite
class. To do so I defined a new class attribute that defines the math operator that will be applied to the operands eigenvalues (math.prod
forProd
andmath.sum
forSum
).Notes:
When computing the
eigvals
ordiagonalizing_gates
of aComposite
operator, we computed the whole matrix when the operands had overlapping wires.Now we separate the operands into subgroups that commute with each other, and only compute the matrices of these subgroups.