You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 any Adjoint class is None.
>>> qml.adjoint(qml.X(0)).pauli_rep is None
True
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 our SProd (scalar product) class:
Hi! I would like to take up this issue. Is there anyone else working on it ?
This is my first time trying to contribute to open source codebase and I wanted to know if issues are only assigned after a PR has been raised.
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: