tequila.optimizers.optimizer_scipy.OptimizerSciPy.compile_hessian

OptimizerSciPy.compile_hessian(variables: List[tequila.objective.objective.Variable], grad_obj: Dict[tequila.objective.objective.Variable, tequila.objective.objective.Objective], comp_grad_obj: Dict[tequila.objective.objective.Variable, tequila.objective.objective.Objective], hessian: dict = None, *args, **kwargs) → tuple

Convenience function to compile hessians for optimizers which require it.

Convenience: build and compile (i.e render callable) the hessian of an objective.

Parameters
  • variables – the variables of the hessian.

  • grad_obj – the gradient object, to be differentiated once more

  • comp_grad_obj – the compiled gradient object, used for further compilation of the hessian.

  • hessian (optional:) – extra information to modulate compilation of the hessian.

  • args

  • kwargs

Returns

uncompiled and compiled hessian objects, in that order

Return type

tuple