---
title: OptimizerState (v0.46)
description: API reference for qiskit.algorithms.optimizers.OptimizerState in qiskit v0.46
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/0.46/qiskit.algorithms.optimizers.OptimizerState
---

# OptimizerState

*class* `qiskit.algorithms.optimizers.OptimizerState(x, fun, jac, nfev, njev, nit)`

[GitHub](https://github.com/qiskit/qiskit/tree/stable/0.46/qiskit/algorithms/optimizers/steppable_optimizer.py)

Bases: [`object`](https://docs.python.org/3/library/functions.html#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.

## Attributes

### x

Type: `POINT`

Current optimization parameters.

### fun

Type: `Callable[[POINT], float] | None`

Function being optimized.

### jac

Type: `Callable[[POINT], POINT] | None`

Jacobian of the function being optimized.

### nfev

Type: `int | None`

Number of function evaluations so far in the optimization.

### njev

Type: `int | None`

Number of jacobian evaluations so far in the opimization.

### nit

Type: `int | None`

Number of optimization steps performed so far in the optimization.
