PennyLaneAI / pennylane

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.
https://pennylane.ai
Apache License 2.0
2.32k stars 595 forks source link

Support training `qml.Hermitian` with `diff_method="adjoint"` #2568

Open antalszava opened 2 years ago

antalszava commented 2 years ago

Feature details

https://github.com/PennyLaneAI/pennylane/pull/2543 noted that training qml.Hermitian for diff_method="adjoint" is not supported. Supporting this feature could still be feasible

Implementation

The gradient of the parametrized Hermitian operator with respect to its input matrix would need to be obtained. This would likely be the "heavy lifting". Once that's done, evolving the internal states as per the adjoint differentiation logic could yield the gradient of the circuit.

How important would you say this feature is?

1: Not important. Would be nice to have.

Additional information

No response

chaeyeunpark commented 2 years ago

Related to https://github.com/PennyLaneAI/pennylane-lightning/issues/216 and https://github.com/PennyLaneAI/pennylane-lightning/pull/294