qiskit-documentation/docs/api/qiskit/0.40/qiskit.algorithms.optimizer...

57 lines
2.0 KiB
Plaintext

---
title: OptimizerState
description: API reference for qiskit.algorithms.optimizers.OptimizerState
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.algorithms.optimizers.OptimizerState
---
# OptimizerState
<Class id="qiskit.algorithms.optimizers.OptimizerState" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.23/qiskit/algorithms/optimizers/steppable_optimizer.py" signature="OptimizerState(x, fun, jac, nfev, njev, nit)" modifiers="class">
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.
## Attributes
### x
<Attribute id="qiskit.algorithms.optimizers.OptimizerState.x" attributeTypeHint="Union[float, numpy.ndarray]">
Current optimization parameters.
</Attribute>
### fun
<Attribute id="qiskit.algorithms.optimizers.OptimizerState.fun" attributeTypeHint="Optional[Callable[[Union[float, numpy.ndarray]], float]]">
Function being optimized.
</Attribute>
### jac
<Attribute id="qiskit.algorithms.optimizers.OptimizerState.jac" attributeTypeHint="Optional[Callable[[Union[float, numpy.ndarray]], Union[float, numpy.ndarray]]]">
Jacobian of the function being optimized.
</Attribute>
### nfev
<Attribute id="qiskit.algorithms.optimizers.OptimizerState.nfev" attributeTypeHint="Optional[int]">
Number of function evaluations so far in the optimization.
</Attribute>
### njev
<Attribute id="qiskit.algorithms.optimizers.OptimizerState.njev" attributeTypeHint="Optional[int]">
Number of jacobian evaluations so far in the opimization.
</Attribute>
### nit
<Attribute id="qiskit.algorithms.optimizers.OptimizerState.nit" attributeTypeHint="Optional[int]">
Number of optmization steps performed so far in the optimization.
</Attribute>
</Class>