qiskit-community / qiskit-machine-learning

Quantum Machine Learning
https://qiskit-community.github.io/qiskit-machine-learning/
Apache License 2.0
628 stars 317 forks source link

Add support for EstimatorV2 from ibm-qiskit-runtime to run circuits over hardware #810

Open Siddharthgolecha opened 2 weeks ago

Siddharthgolecha commented 2 weeks ago

What should we add?

Currently, the EstimatorQNN uses Estimator from qiskit.primitives as the default and the only way to run circuits over the hardware. I would like to add a condition that checks if its an EstimatorV2 from the ibm-qiskit-runtime and runs the circuit using that. I already have the implementation ready and I would like to propose that change to the EstimatorQNN.

edoaltamura commented 1 week ago

Hi @Siddharthgolecha, thank you for your feedback. The support for V2 primitives and the consequences for hardware compliance are aspects we are currently working on: https://github.com/qiskit-community/qiskit-machine-learning/issues/742 and (somewhat related) https://github.com/qiskit-community/qiskit-machine-learning/issues/786.

Nevertheless, it would still be very valuable for the community if you could describe your fix for EstimatorV2 in detail in this thread!