quri_parts.core.estimator.hessian module#

quri_parts.core.estimator.hessian.parameter_shift_hessian_estimates(op: Operator | PauliLabel, state: _ParametricStateT, params: Sequence[float], estimator: Callable[[Operator | PauliLabel, _ParametricStateT, Sequence[Sequence[float]]], Iterable[Estimate[complex]]]) MatrixEstimates[complex]#

Estimate a hessian of an expectation value of a given operator for a parametric state with respect to the state parameter by the parameter shift rule.

The hessian estimates are configured with arguments as follows.

Parameters:
  • op – An operator of which expectation value is estimated.

  • state – A parametric quantum state on which the operator expectation is evaluated.

  • params – Parameter values for which the hessian is estimated.

  • estimator – An estimator that estimates expectation values of the operator for the parametric states.

Returns:

The estimated values (can be accessed with values) with errors of estimation (can be accessed with error_tensor). Currently, error_tensor returns None.

quri_parts.core.estimator.hessian.create_parameter_shift_hessian_estimator(parametric_estimator: Callable[[Operator | PauliLabel, _ParametricStateT, Sequence[Sequence[float]]], Iterable[Estimate[complex]]]) Callable[[Operator | PauliLabel, _ParametricStateT, Sequence[float]], MatrixEstimates[complex]]#