6e9a58b20848646f37fcf24179fc29f28cabda3d,qiskit/optimization/algorithms/minimum_eigen_optimizer.py,MinimumEigenOptimizer,solve,#MinimumEigenOptimizer#Any#,158
Before Change
samples = [(x_str, offset, 1.0)]
// translate result back to integers
result = OptimizationResult(x=x, fval=fval, variables=problem_.variables,
status=OptimizationResultStatus.SUCCESS)
result = self._interpret(result, self._converters)
if result.fval is None or result.x is None:
// if not function value is given, then something went wrong, e.g., a
// NumPyMinimumEigensolver has been configured with an infeasible filter criterion.
return MinimumEigenOptimizationResult(x=None, fval=None,
variables=result.variables,
status=OptimizationResultStatus.FAILURE,
samples=None,
min_eigen_solver_result=eigen_result)
return MinimumEigenOptimizationResult(x=result.x, fval=result.fval,
variables=result.variables,
status=self._get_feasibility_status(problem,
result.x),
samples=samples, min_eigen_solver_result=eigen_result)
After Change
samples=None,
min_eigen_solver_result=eigen_result)
// translate result back to integers
return cast(MinimumEigenOptimizationResult,
self._interpret(x=x, converters=self._converters, problem=problem,
result_class=MinimumEigenOptimizationResult,
samples=samples,
min_eigen_solver_result=eigen_result))
def _eigenvector_to_solutions(eigenvector: Union[dict, np.ndarray, StateFn],
qubo: QuadraticProgram,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
Instances
Project Name: Qiskit/qiskit-aqua
Commit Name: 6e9a58b20848646f37fcf24179fc29f28cabda3d
Time: 2020-11-25
Author: 31178928+t-imamichi@users.noreply.github.com
File Name: qiskit/optimization/algorithms/minimum_eigen_optimizer.py
Class Name: MinimumEigenOptimizer
Method Name: solve
Project Name: Qiskit/qiskit-aqua
Commit Name: 6e9a58b20848646f37fcf24179fc29f28cabda3d
Time: 2020-11-25
Author: 31178928+t-imamichi@users.noreply.github.com
File Name: qiskit/optimization/algorithms/grover_optimizer.py
Class Name: GroverOptimizer
Method Name: solve
Project Name: Qiskit/qiskit-aqua
Commit Name: 6e9a58b20848646f37fcf24179fc29f28cabda3d
Time: 2020-11-25
Author: 31178928+t-imamichi@users.noreply.github.com
File Name: qiskit/optimization/algorithms/recursive_minimum_eigen_optimizer.py
Class Name: RecursiveMinimumEigenOptimizer
Method Name: solve