qrunch.chemistry.orbital_optimizers.gradient_creator

Gradient calculator sub-creator for orbital optimizers.

Classes

GradientCalculatorSubCreator

Creator for gradient calculators.

class GradientCalculatorSubCreator

Bases: Generic[T]

Creator for gradient calculators.

__init__(parent: T, field_name: str) None

Initialize the gradient calculator sub-creator.

Parameters:
  • parent (T) – The parent object to which the gradient calculator will be added.

  • field_name (str) – The name of the field in the parent object where the gradient calculator will be stored.

Return type:

None

local_gradient(estimator: Estimator) T

Set the gradient calculator to an analytical local gradient calculator.

The local gradient calculator computes the local gradient and hessian of the energy with respect to orbital rotation parameters using an analytical calculation of the gradient and hessian of the energy as a function of reduced density matrices, measured by the provided estimator.

Parameters:

estimator (Estimator) – The estimator used to compute expectation values.

Return type:

T