qiskit.opflow.gradients.Hessian.get_hessian¶
- Hessian.get_hessian(operator, params=None)[source]¶
Get the Hessian for the given operator w.r.t. the given parameters
- প্যারামিটার
operator (OperatorBase) -- Operator w.r.t. which we take the Hessian.
params (Optional[Union[Tuple[ParameterExpression, ParameterExpression], List[Tuple[ParameterExpression, ParameterExpression]], List[ParameterExpression], ParameterVector]]) -- Parameters w.r.t. which we compute the Hessian. If not explicitly passed, the full Hessian is constructed. The parameters are then inferred from the operator and sorted by name.
- রিটার্নস
Operator which represents the gradient w.r.t. the given params.
- রেইজেস
ValueError -- If
params
contains a parameter not present inoperator
.ValueError -- If
operator
is not parameterized.OpflowError -- If the coefficient of the operator could not be reduced to 1.
OpflowError -- If the differentiation of a combo_fn requires JAX but the package is not installed.
TypeError -- If the operator does not include a StateFn given by a quantum circuit
TypeError -- If the parameters were given in an unsupported format.
Exception -- Unintended code is reached
MissingOptionalLibraryError -- jax not installed
- রিটার্ন টাইপ