qiskit-optimization
qiskit-optimization copied to clipboard
Add convertor chaining
What is the expected enhancement?
Right now all optimizers manually deal with converters. Sometime this logic is the same across several optimizers. This issue suggests to stream line the way converters are applied in optimizers.
Problem conversion should be placed in the base class. Then, the base class should have a generic solve() method, that makes everything ready for sub-classes and call an abstract _solve() method of the base class, which, in turns, is implemented in a concrete optimizer. This concrete _solve() implementation is tailored to the needs of the optimizer and does not deal with converters unless it is truly required by the optimizer.
So, ideally optimizers should not know of any conversions took place before theirs _solve() method is called.