horqrux
horqrux copied to clipboard
[Feature] Allow adjoint method to compute derivatives of any Parametric gate. Change to JVP implementation.
As it stands, the adjoint method is only used to calculate gradients via vector jacobian products for Parametric gates with string parameters.
However, it can be :
- extended to allow for float parameters as well.
- use a jacobian-vector product, which is is a bit more flexible than the vector-jacobian product, in that the former allows for forward mode AD as well.
It might make sense to address these two points simultaneously since both involve changing the same lines of code.