qiskit.optimization.algorithms.MinimumEigenOptimizationResult
class MinimumEigenOptimizationResult(x, fval, variables, status, samples, min_eigen_solver_result=None)
Minimum Eigen Optimizer Result.
Parameters
- x (
Union
[List
[float
],ndarray
]) – the optimal value found byMinimumEigensolver
. - 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. - samples (
List
[Tuple
[str
,float
,float
]]) – the basis state as bitstring, the QUBO value, and the probability of sampling. - min_eigen_solver_result (
Optional
[MinimumEigensolverResult
]) – the result obtained from the underlying algorithm.
__init__
__init__(x, fval, variables, status, samples, min_eigen_solver_result=None)
Parameters
- x (
Union
[List
[float
],ndarray
]) – the optimal value found byMinimumEigensolver
. - 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. - samples (
List
[Tuple
[str
,float
,float
]]) – the basis state as bitstring, the QUBO value, and the probability of sampling. - min_eigen_solver_result (
Optional
[MinimumEigensolverResult
]) – the result obtained from the underlying algorithm.
Methods
__init__ (x, fval, variables, status, samples) | type xUnion [List [float ], ndarray ] |
get_correlations () | Get <Zi x Zj> correlation matrix from samples. |
Attributes
fval | Returns the optimal function value. |
min_eigen_solver_result | Returns a result object obtained from the instance of MinimumEigensolver . |
raw_results | Return the original results object from the optimization algorithm. |
samples | Returns samples. |
status | Returns the termination status of the optimization algorithm. |
variable_names | Returns the list of variable names of the optimization problem. |
variables | Returns the list of variables of the optimization problem. |
variables_dict | 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. |
fval
Returns the optimal function value.
Return type
float
Returns
The function value corresponding to the optimal value found in the optimization.
get_correlations
get_correlations()
Get <Zi x Zj> correlation matrix from samples.
Return type
ndarray
min_eigen_solver_result
Returns a result object obtained from the instance of MinimumEigensolver
.
Return type
MinimumEigensolverResult
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.
samples
Returns samples.
Return type
List
[Tuple
[str
, float
, float
]]
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.