-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Implement coeffs method for SummedOp #5931
Comments
Update 6/20/21: Revisited this one and created PR #6610If I understand the enhancement correctly, we need a method to pull the coefficients for the operators listed for the lazy sum, scaled by the overall Does this seem to be starting off on the right path?
Going off of the discussion of Testing this:
|
Hi @woodsp-ibm, Any thoughts on what we have here so far? I think this might meet the use case @jlapeyre is suggesting. However, I'm slightly concerned about how the typing may interact in
Let me know if I should create a pull request to allow others to review/test more easily. |
Hi @john-judge . Thanks for the contribution. I think this is on the right track. You are correct here:
I'm pretty sure that your implementation above already correctly handles Yes, please make a PR, if you like. |
Hi @john-judge are you still working on this? If you have any further questions let us know :) |
@javabster I'm not actively working on this at the moment. I'm fine if anyone wants to jump in and finish this. Next step would be to write tests including for the |
I am a newbie with a desire to learn. I would love to work on this issue. |
@a-freakish Great to hear, please do pick this one up! Let me know if you have any questions and I can try to answer. |
…effs method of PauliSumOp
#6610) * implement coeffs method for SummedOp (Issue #5931), matching coeffs method of PauliSumOp * Move SummedOp.coeffs method to parent class ListOps; raise exceptions for nested ListOps * reformatted automatically by black * Added reno for ListOp.coeffs feature addition Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
It would be useful to have a method
SummedOp.coeffs
analogous toPauliSumOp.coeffs
. This would allow the same code to extract coefficients from both via duck typing (eg inPhaseEstimation
)The text was updated successfully, but these errors were encountered: