qiskit-machine-learning icon indicating copy to clipboard operation
qiskit-machine-learning copied to clipboard

Enhance optimizer support as per recent VQE/QAOA change

Open woodsp-ibm opened this issue 3 years ago • 3 comments
trafficstars

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

woodsp-ibm avatar Apr 06 '22 19:04 woodsp-ibm

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.

adekusar-drl avatar Apr 07 '22 09:04 adekusar-drl

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.

woodsp-ibm avatar Apr 07 '22 15:04 woodsp-ibm

The above PR was changed, ahead of merging, so that Minimizer interface is exposed at the optimizers level

woodsp-ibm avatar Oct 06 '22 14:10 woodsp-ibm