Description
when I used Zygote.hessian to compute the hessian matrix of a circuit, i.e Zygote.hessian(f, params), where params are parameters of a variational circuit and f(params) is a real number, I got a MethodError whose message is below.
It seems that when ForwardDiff use Dual to compute the jacobian matrix, the Dual type is not supported by RotationGate in this circuit. So how can I compute hessian of my real-value function f?
(just for example: f(params) = operator_fidelity(target_unitary, dispatch!(circuit, params)) )
Metadata
Metadata
Assignees
Labels
No labels