PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
This definition always returns the inverse of the original operation. However, it doesn't consider the case when the original operation was inverted already.
Expected behavior
Non-parametric operations have an adjoint method definition such as:
This definition always returns the inverse of the original operation. However, it doesn't consider the case when the original operation was inverted already.
E.g.,
returns
Actual behavior
Would expect to have
returned.
Additional information
This type of change is upcoming in https://github.com/PennyLaneAI/pennylane/pull/1955. The things todo include implementing the same changes for other similar cases.
Source code
No response
Tracebacks
No response
System information