-
Notifications
You must be signed in to change notification settings - Fork 631
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 pauli_rep
property to Adjoint
when possible
#6876
Comments
Hi! I would like to take up this issue. Is there anyone else working on it ? Thanks!! |
Thanks for reaching out @vivek-kumar9696 . I've assigned you the issue. If you have any questions, feel free to either reach out here, or open up a draft PR to start a discussion there. |
@albi3ro Thanks for the reply. I will provide biweekly updates regularly. |
Hi @albi3ro, Love to give this a try as well. Would that be cool? |
@albi3ro I created a draft PR for your review. |
@vivek-kumar9696 since @Hazarre has already opened a PR, I'm going to go ahead and review that one. I'll try and come up with some more issues for external contributions. |
**Context:** #6876 **Description of the Change:** add pauli_rep property for adjoint operation **Benefits:** pauli_rep property is available after adjoint operation **Possible Drawbacks:** impact downstream functions that relies on pauli_rep **Related GitHub Issues:** #6876 --------- Co-authored-by: Christina Lee <[email protected]>
@albi3ro No problem. I'll try working on some other issue. Thanks!! |
Cloed by #6971 . |
Context:
The
Operator.pauli_rep
property is a provides an efficient representation of an operator as a linear combination of pauli's, if the operator is an obvious linear combination of pauli's.The returned object is a special dictionary mapping pauli words to coefficients, the
PauliSentence
Currently, the
pauli_rep
for anyAdjoint
class isNone
.But if the target has a pauli rep, we should be able to provide one on the
Adjoint
class. We only need to take the conjugate of all the coefficients. You can see similar "modify pauli rep of target" behavior in ourSProd
(scalar product) class:pennylane/pennylane/ops/op_math/sprod.py
Line 151 in 8a12fa5
The task
This issue would require initializing the
_pauli_rep
during initialization of allAdjoint
operators to be the adjoint of the target's pauli rep.The PR should also:
The text was updated successfully, but these errors were encountered: