-
Notifications
You must be signed in to change notification settings - Fork 615
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
Add CtrlSequence operator #4688
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4688 +/- ##
==========================================
- Coverage 99.64% 99.63% -0.01%
==========================================
Files 378 379 +1
Lines 34071 33859 -212
==========================================
- Hits 33950 33737 -213
- Misses 121 122 +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.
Thank you Lillian! I have been testing and the results are correct. However, I have tried testing the gradient and for some reason it doesn't work. Do you know why it could be?
I looked at it a bit yesterday afternoon and I'm currently not sure, but working on it. I'll mention it in the core stand-up today. For the autograd gradient, its going in as a |
@lillian542 please could you link to the story? |
[sc-45846] |
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.
Thanks @lillian542 and @KetpuntoG! Left some comments and questions. Will approve when they are addressed.
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.
A lot of work here! Thank you very much for the effort, @lillian542 🚀
pennylane/ops/op_math/controlled.py
Outdated
# pylint: disable=missing-function-docstring | ||
@property | ||
def basis(self): | ||
return self.base.basis |
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.
This inherits from symbolic op so you don't need this since it will be inherited anyways
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.
Operator versus operation thing. easier just to push the attribute up to operator.
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.
this can be removed, it is indeed the same as its super()
Adding a ControlledSequence template as part of the Modular QPE project