class qiskit.algorithms.optimizers.OptimizerState(x, fun, jac, nfev, njev, nit)[source]#

Bases: object

Base class representing the state of the optimizer.

This class stores the current state of the optimizer, given by the current point and (optionally) information like the function value, the gradient or the number of function evaluations. This dataclass can also store any other individual variables that change during the optimization.



Current optimization parameters.

fun: Callable[[POINT], float] | None#

Function being optimized.

jac: Callable[[POINT], POINT] | None#

Jacobian of the function being optimized.

nfev: int | None#

Number of function evaluations so far in the optimization.

njev: int | None#

Number of jacobian evaluations so far in the opimization.

nit: int | None#

Number of optmization steps performed so far in the optimization.