-
Notifications
You must be signed in to change notification settings - Fork 376
Change QuadraticProgramConverter.interpret to convert x
directly
#1196
Conversation
@t-imamichi Thanks, looks good. Seems like this change did not affect the converters seriously and we may replace a pattern where we create two optimization results (base and specific) with a single result. |
Thank you. Yes, you are right. I have to remove the deprecated |
Shouldn't we wait at least 3 months before removing deprecated 'encode' and 'decode' as mentioned in #1178? |
That's why this PR is draft still. |
Currently, no algorithms takes care of the status of algorithm. So, we cannot detect that the algorithms terminates successfully or not. For example, Cplex has My current impl in this pullreq sets |
Thank you for your comments. This will come after #1199 because this requires |
# Conflicts: # qiskit/optimization/algorithms/admm_optimizer.py # qiskit/optimization/algorithms/cplex_optimizer.py # qiskit/optimization/algorithms/grover_optimizer.py # qiskit/optimization/algorithms/minimum_eigen_optimizer.py # qiskit/optimization/algorithms/multistart_optimizer.py # qiskit/optimization/algorithms/recursive_minimum_eigen_optimizer.py # qiskit/optimization/algorithms/slsqp_optimizer.py # qiskit/optimization/converters/inequality_to_equality.py # qiskit/optimization/converters/integer_to_binary.py # qiskit/optimization/converters/linear_equality_to_penalty.py # qiskit/optimization/converters/quadratic_program_converter.py # qiskit/optimization/converters/quadratic_program_to_qubo.py # qiskit/optimization/problems/quadratic_program.py # test/optimization/test_converters.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
a652d3f
…iskit-community/qiskit-aqua#1196) * Change `QuadraticProgramConverter.interpret` to convert `x` directly. * Change `OptimizationAlgorithm._interpret` to return a subclass of `OptimizationResult` by setting variables and status automatically. * Remove deprecated methods `QuadraticProgramConverter.{encode,decode}`. * Remove deprecated classes `QuadraticProgramToIsing` and `IsingToQuadraticProgram`. Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com> Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com>
Summary
QuadraticProgramConverter.interpret
currently converts OptimizationResult to OptimizationResult.The main functionality of
interpret
is the evaluation of the values of variables.The main idea of this pullreq is to simplify
interpret
to deal with onlyx
.It also extends
OptimizationAlgorithm._interpret
to generate a subclass ofOptimizationResult
to set the variables and status automatically.It removes deprecated methods
QuadraticProgramConverter.{encode,decode}
and deprecated classesQuadraticProgramToIsing
andIsingToQuadraticProgram
.Details and comments