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)