-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run_circuits does not respect BackendV1 and passes Qobj #6280
Comments
Yeah, your suggested solution is the path forward here. This needs to be fixed as the current state means that |
@mtreinish Not sure if this is the right ticket or if you would prefer a new one, but another issue that has cropped up out of this exploration-- https://github.com/Qiskit/qiskit-terra/blob/main/qiskit/utils/run_circuits.py#L28 expects a |
It's fine here, it's really the same bug and should be fixed as part of this too. It's basically the same bug, just in a different part of that code path. It's basically that QuantumInstance/run_circuits is hardcoded to assume it's either running with only aer, basicaer, or ibmq and doesn't take any other providers into account. That's why I labeled this as high priority because this basically prevents anyone from running an algorithm class on new backends. Hopefully we'll have fix up shortly and I think this warrants a terra 0.17.2 release as soon as it is up too. As you say |
As was reported in Qiskit#6280 the algorithms path doesn't work on minimal examples of the Backend and Jobs interface and instead only works in practice on ibmq, aer, or basic aer backends. Part of the reason for this was that all the testing of algorithms is done exclusively on those providers and there wasn't a minimal example to test against that doesn't have legacy overhead (like qobj, etc). This commit updates the fake providers and fake backends to use the latest version of the provider, backend, and job interfaces and to be strictly compatible (ie no qobj support). Besides exercising the new interface version it also enables us to test the eventual fix for Qiskit#6280 when it's available.
Looks like this is getting addressed in the PR, but dropping this here for posterity-- https://github.com/Qiskit/qiskit-terra/blob/main/qiskit/utils/run_circuits.py#L309 |
* Update fake backend and fake provider to use versioned interface As was reported in #6280 the algorithms path doesn't work on minimal examples of the Backend and Jobs interface and instead only works in practice on ibmq, aer, or basic aer backends. Part of the reason for this was that all the testing of algorithms is done exclusively on those providers and there wasn't a minimal example to test against that doesn't have legacy overhead (like qobj, etc). This commit updates the fake providers and fake backends to use the latest version of the provider, backend, and job interfaces and to be strictly compatible (ie no qobj support). Besides exercising the new interface version it also enables us to test the eventual fix for #6280 when it's available. * Fix lint * Add legacy fake backends using BaseBackend
…kit/qiskit#6286) * Update fake backend and fake provider to use versioned interface As was reported in Qiskit/qiskit#6280 the algorithms path doesn't work on minimal examples of the Backend and Jobs interface and instead only works in practice on ibmq, aer, or basic aer backends. Part of the reason for this was that all the testing of algorithms is done exclusively on those providers and there wasn't a minimal example to test against that doesn't have legacy overhead (like qobj, etc). This commit updates the fake providers and fake backends to use the latest version of the provider, backend, and job interfaces and to be strictly compatible (ie no qobj support). Besides exercising the new interface version it also enables us to test the eventual fix for Qiskit/qiskit#6280 when it's available. * Fix lint * Add legacy fake backends using BaseBackend
Information
What is the current behavior?
This was originally an issue on the qiskit-ionq provider but it's really at core a terra issue.
Steps to reproduce the problem
produces the following stacktrace:
This is the ionq provider error that stems from expecting only a circuit in this method due to the ionq provider backend being pinned to BackendV1.
Here's the rest of the stacktrace:
(it actually iteratively produces a couple hundred of these terra job errors/traces as it runs the circuits, but they're all the same)
What is the expected behavior?
The helper methods pass circuits instead of qobjs to the job run method like the contract for BackendV1 implies, and this estimation runs successfully.
Suggested solutions
I don't have a ton of context on this part of the codebase or the plans for versioned backends/deprecation of qobj etc, but from my uninformed perspective, it looks like the
run_circuits
helper method needs to be refactored to support versioned backends. Not exactly a complete suggestion but hopefully a start and enough background for someone who has a bit more context.The text was updated successfully, but these errors were encountered: