Inv = o.inverse AttributeError: 'RX' object has no attribute 'inverse'


I have been trying to use the pennylane lightning plugin, but I keep getting the error RX object has no attribute inverse.

I have been using the scipy Powell minimizer to do VQE, and this error pops up.

Does anybody know how to fix this, or do I have to either use default qubit or a different minimizer.

Hey @trifire! Welcome back!

inverse() is deprecated. You can use adjoint() instead :grin:.

>>> qml.adjoint(qml.RX)(0.1, 0)
Adjoint(RX(0.1, wires=[0]))

For more information on deprecations, check out our deprecation tracker: Deprecations — PennyLane 0.29.1 documentation