Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version.

qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult

class RecursiveMinimumEigenOptimizationResult(x, fval, variables, status, replacements, history)

GitHub

Recursive Eigen Optimizer Result.

Constructs an instance of the result class.

Parameters

  • x (Union[List[float], ndarray]) – the optimal value found in the optimization.
  • fval (float) – the optimal function value.
  • variables (List[Variable]) – the list of variables of the optimization problem.
  • status (OptimizationResultStatus) – the termination status of the optimization algorithm.
  • replacements (Dict[str, Tuple[str, int]]) – a dictionary of substituted variables. Key is a variable being substituted, value is a tuple of substituting variable and a weight, either 1 or -1.
  • history (Tuple[List[MinimumEigenOptimizationResult], OptimizationResult]) – a tuple containing intermediate results. The first element is a list of MinimumEigenOptimizerResult obtained by invoking MinimumEigenOptimizer iteratively, the second element is an instance of OptimizationResult obtained at the last step via min_num_vars_optimizer.

__init__

__init__(x, fval, variables, status, replacements, history)

Constructs an instance of the result class.

Parameters

  • x (Union[List[float], ndarray]) – the optimal value found in the optimization.
  • fval (float) – the optimal function value.
  • variables (List[Variable]) – the list of variables of the optimization problem.
  • status (OptimizationResultStatus) – the termination status of the optimization algorithm.
  • replacements (Dict[str, Tuple[str, int]]) – a dictionary of substituted variables. Key is a variable being substituted, value is a tuple of substituting variable and a weight, either 1 or -1.
  • history (Tuple[List[MinimumEigenOptimizationResult], OptimizationResult]) – a tuple containing intermediate results. The first element is a list of MinimumEigenOptimizerResult obtained by invoking MinimumEigenOptimizer iteratively, the second element is an instance of OptimizationResult obtained at the last step via min_num_vars_optimizer.

Methods

__init__(x, fval, variables, status, …)Constructs an instance of the result class.

Attributes

fvalReturns the optimal function value.
historyReturns intermediate results.
raw_resultsReturn the original results object from the optimization algorithm.
replacementsReturns a dictionary of substituted variables.
statusReturns the termination status of the optimization algorithm.
variable_namesReturns the list of variable names of the optimization problem.
variablesReturns the list of variables of the optimization problem.
variables_dictReturns the optimal value as a dictionary of the variable name and corresponding value.
xReturns the optimal value found in the optimization or None in case of FAILURE.

fval

Returns the optimal function value.

Return type

float

Returns

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

history

Returns intermediate results. The first element is a list of MinimumEigenOptimizerResult obtained by invoking MinimumEigenOptimizer iteratively, the second element is an instance of OptimizationResult obtained at the last step via min_num_vars_optimizer.

Return type

Tuple[List[MinimumEigenOptimizationResult], OptimizationResult]

raw_results

Return the original results object from the optimization algorithm.

Currently a dump for any leftovers.

Return type

Any

Returns

Additional result information of the optimization algorithm.

replacements

Returns a dictionary of substituted variables. Key is a variable being substituted, value is a tuple of substituting variable and a weight, either 1 or -1.

Return type

Dict[str, Tuple[str, int]]

status

Returns the termination status of the optimization algorithm.

Return type

OptimizationResultStatus

Returns

The termination status of the algorithm.

variable_names

Returns the list of variable names of the optimization problem.

Return type

List[str]

Returns

The list of variable names of the optimization problem.

variables

Returns the list of variables of the optimization problem.

Return type

List[Variable]

Returns

The list of variables.

variables_dict

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

Return type

Dict[str, float]

Returns

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.

Return type

Optional[ndarray]

Returns

The optimal value found in the optimization.

Was this page helpful?
Report a bug or request content on GitHub.