-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add qubit count and basis gate checks to fake_backend #10961
base: main
Are you sure you want to change the base?
Add qubit count and basis gate checks to fake_backend #10961
Conversation
…e gates and qubit count required by a mimicked machine e.g. FakeLima()
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
@AngeloDanducci tagging you so this issue doesn't slip through the cracks again 😄. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @JustinWoodring, thanks for catching this behavior :). I agree that fake backends should be respect the num_qubits
and basis_gates
specified in their description. However, I wonder if we could find a more efficient way to implement this. Iterating over all of the circuits and all of the instructions within the circuits can be costly, and hinder the performance of the fake backends. I think that we should be able to set these options directly at the simulator level, it might be worth giving it a try.
I also wanted to give you some context about the fake provider module: we are currently working on migrating the IBM-specific fake backends out of the main qiskit repo, as explained in #9553. Until the migration is finalized, we will not focus on merging new fixes to these classes. Once it is complete, we'll likely transfer all relevant issues and PRs to the new location of the module (including this one), which is now planned to be https://github.com/Qiskit/qiskit-ibm-runtime.
Fixes #8509
Summary
This PR adds sanity checks to the fake_backend provider to ensure that it does not run tasks using a greater than supported qubit count or unsupported basis gate for a given provider e.g. FakeLima()