qiskit-machine-learning
qiskit-machine-learning copied to clipboard
Enhance optimizer support as per recent VQE/QAOA change
What is the expected enhancement?
Recently VQE and QAOA were enhanced to have more flexibility around provisioning of an optimizer see Qiskit/qiskit-terra#7191. It might be nice that ML had equivalent capability. I will note the the interface typing of the callable is the subject of a current improvement PR but the function as such remains the same Qiskit/qiskit-terra#7846
Interesting and a good addition. What I don't understand is why callable support was added on a VQE/QAOA level only. So, if I want to re-use the definitions, e.g., MINIMIZER or Minimizer introduced in these two PRs, I have to import them from VQE and introduce a dependency on the VQE implementation. I'd prefer to see these definitions next to optimizers.
It was probably added there since this is the only place that consumes optimizers. It seems very reasonable to me though to have the Minimizer be defined in optimizers. I'll comment in the latter PR referenced above.
The above PR was changed, ahead of merging, so that Minimizer interface is exposed at the optimizers level