qiskit-documentation/docs/api/qiskit/0.26/qiskit.optimization.algorit...

198 lines
11 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: RecursiveMinimumEigenOptimizationResult (v0.26)
description: API reference for qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult in qiskit v0.26
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult
---
<span id="qiskit-optimization-algorithms-recursiveminimumeigenoptimizationresult" />
# qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult
<Class id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/optimization/algorithms/recursive_minimum_eigen_optimizer.py" signature="RecursiveMinimumEigenOptimizationResult(x, fval, variables, status, replacements, history)" modifiers="class">
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`](qiskit.optimization.algorithms.MinimumEigenOptimizer "qiskit.optimization.algorithms.MinimumEigenOptimizer") iteratively, the second element is an instance of `OptimizationResult` obtained at the last step via min\_num\_vars\_optimizer.
### \_\_init\_\_
<Function id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.__init__" signature="__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`](qiskit.optimization.algorithms.MinimumEigenOptimizer "qiskit.optimization.algorithms.MinimumEigenOptimizer") iteratively, the second element is an instance of `OptimizationResult` obtained at the last step via min\_num\_vars\_optimizer.
</Function>
## Methods
| | |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [`__init__`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.__init__ "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.__init__")(x, fval, variables, status, …) | Constructs an instance of the result class. |
## Attributes
| | |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [`fval`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.fval "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.fval") | Returns the optimal function value. |
| [`history`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.history "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.history") | Returns intermediate results. |
| [`raw_results`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.raw_results "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.raw_results") | Return the original results object from the optimization algorithm. |
| [`replacements`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.replacements "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.replacements") | Returns a dictionary of substituted variables. |
| [`samples`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.samples "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.samples") | Returns the list of solution samples |
| [`status`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.status "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.status") | Returns the termination status of the optimization algorithm. |
| [`variable_names`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.variable_names "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.variable_names") | Returns the list of variable names of the optimization problem. |
| [`variables`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.variables "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.variables") | Returns the list of variables of the optimization problem. |
| [`variables_dict`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.variables_dict "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.variables_dict") | Returns the optimal value as a dictionary of the variable name and corresponding value. |
| [`x`](#qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.x "qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.x") | Returns the optimal value found in the optimization or None in case of FAILURE. |
### fval
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.fval">
Returns the optimal function value.
**Return type**
`float`
**Returns**
The function value corresponding to the optimal value found in the optimization.
</Attribute>
### history
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.history">
Returns intermediate results. The first element is a list of `MinimumEigenOptimizerResult` obtained by invoking [`MinimumEigenOptimizer`](qiskit.optimization.algorithms.MinimumEigenOptimizer "qiskit.optimization.algorithms.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`]
</Attribute>
### raw\_results
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.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.
</Attribute>
### replacements
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.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`]]
</Attribute>
### samples
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.samples">
Returns the list of solution samples
**Return type**
`List`\[`SolutionSample`]
**Returns**
The list of solution samples.
</Attribute>
### status
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.status">
Returns the termination status of the optimization algorithm.
**Return type**
`OptimizationResultStatus`
**Returns**
The termination status of the algorithm.
</Attribute>
### variable\_names
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.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.
</Attribute>
### variables
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.variables">
Returns the list of variables of the optimization problem.
**Return type**
`List`\[`Variable`]
**Returns**
The list of variables.
</Attribute>
### variables\_dict
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.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.
</Attribute>
### x
<Attribute id="qiskit.optimization.algorithms.RecursiveMinimumEigenOptimizationResult.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.
</Attribute>
</Class>