Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
5.3k stars 2.37k forks source link

Fake backends return simulator=False #9572

Open nonhermitian opened 1 year ago

nonhermitian commented 1 year ago

Environment

What is happening?

Fake backends are just wrappers around the Aer simulator. However they themselves do not return simulator=True. This is problematic because there are cases where knowing if the execution is on a simulator, as opposed to a real device, can be used to select methods that are more efficient. Example, using independent (single-qubit) calibrations in M3 vs. the balanced method used on real-hw.

How can we reproduce the issue?


from qiskit.providers.fake_provider import FakeKolkata
backend = FakeKolkata()
backend.configuration().simulator

yields False. As a corollary, on V2 fake backends, there is no configuration, so it is not clear how to determine if a V2 backend is a simulator or not.

What should happen?

Being a simulator, the fake backends should indicate this in the configuration, or wherever the same info is found on V2 backends.

Any suggestions?

No response

nonhermitian commented 1 month ago

Any updates on this? It is a constant thorn when working with backends of various kinds

nonhermitian commented 3 weeks ago

Closed by https://github.com/Qiskit/qiskit-ibm-runtime/pull/2005

yaelbh commented 2 weeks ago

This issue has to move to qiskit-ibm-runtime. See a comment that I wrote in the PR: https://github.com/Qiskit/qiskit-ibm-runtime/pull/2005#issuecomment-2454755261.