# SlsqpOptimizationResult¶

class SlsqpOptimizationResult(x, fval, variables, status, fx=None, its=None, imode=None, smode=None)[소스]

기반 클래스: qiskit.optimization.algorithms.optimization_algorithm.OptimizationResult

SLSQP optimization result, defines additional properties that may be returned by the optimizer.

Constructs a result object with properties specific to SLSQP.

매개변수
• x (Union[List[float], ndarray]) – The solution of the problem

• fval (float) – The value of the objective function of the solution

• variables (List[Variable]) – A list of variables defined in the problem

• fx (Optional[ndarray]) – The value of the objective function being optimized, may be different from fval

• its (Optional[int]) – The number of iterations.

• imode (Optional[int]) – The exit mode from the optimizer (see the documentation of scipy.optimize.fmin_slsqp).

• smode (Optional[str]) – Message describing the exit mode from the optimizer.

• status (OptimizationResultStatus) – the termination status of the optimization algorithm.

Attributes

fval

Returns the optimal function value.

반환 형식

float

반환값

The function value corresponding to the optimal value found in the optimization.

fx

Returns the final value of the objective function being actually optimized.

반환 형식

Optional[ndarray]

imode

Returns the exit mode from the optimizer.

반환 형식

Optional[int]

its

Returns the number of iterations

반환 형식

Optional[int]

raw_results

Return the original results object from the optimization algorithm.

Currently a dump for any leftovers.

반환 형식

Any

반환값

Additional result information of the optimization algorithm.

samples

Returns the list of solution samples

반환 형식

List[SolutionSample]

반환값

The list of solution samples.

smode

Returns message describing the exit mode from the optimizer.

반환 형식

Optional[str]

status

Returns the termination status of the optimization algorithm.

반환 형식

OptimizationResultStatus

반환값

The termination status of the algorithm.

variable_names

Returns the list of variable names of the optimization problem.

반환 형식

List[str]

반환값

The list of variable names of the optimization problem.

variables

Returns the list of variables of the optimization problem.

반환 형식

List[Variable]

반환값

The list of variables.

variables_dict

Returns the optimal value as a dictionary of the variable name and corresponding value.

반환 형식

Dict[str, float]

반환값

The optimal value as a dictionary of the variable name and corresponding value.

x

Returns the optimal value found in the optimization or None in case of FAILURE.

반환 형식

Optional[ndarray]

반환값

The optimal value found in the optimization.