-
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 generic V1 Fake Backends, replace use in tests #10952
Conversation
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 7733966281Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
5a0dab0
to
30157f9
Compare
c1c0adf
to
a93670b
Compare
c3c77e8
to
a929011
Compare
93db199
to
a9c9005
Compare
74c00f9
to
5ce3a97
Compare
I added the "on hold" label because this PR is built on top of #10918, but there was a lot of back and forth and a lot of conflicts, so I would like to wait until #10918 is merged to rebase and double check that I am not accidentally "undoing" any change from the previous PR here (but the essence is the same to it's still ready for review!). |
ae3ebb8
to
6d98fba
Compare
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.
Looks mostly good to me, just a few minor things like copyright dates.
Thanks for all of this work! 😄
16: Qubit(QuantumRegister(15, "ancilla"), 12), | ||
17: Qubit(QuantumRegister(15, "ancilla"), 13), | ||
18: Qubit(QuantumRegister(15, "ancilla"), 14), | ||
19: Qubit(QuantumRegister(2, "qr2"), 0), |
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.
What exactly makes the output different here? Is it related to how the seed is being used in the new backend?
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.
The vf2_layout
pass tries to solve a subgraph isomorphism problem. From all the possible answers to this problem, it picks the one that minimizes the gate error, which depends on the backend properties. FakeTokyo
and Fake20QV1
share the coupling map (because I inject it manually) but don't have the same backend properties, and this is why the optimal solution is a bit different.
Co-authored-by: Kevin Hartman <kevin@hart.mn>
Summary
(3/4) --> This is the third PR of the
FakeBackend
s refactoring epic.This PR introduces generic V1 fake backends to replace the use of provider-specific backends in unit tests. It's part of the plan laid out in #10954.
Details and comments
FakeGeneric
#10918Replacement chart
Note that some
FakeBackendV1
occurrences have been replaced directly by their coupling map or the V2FakeGeneric
backend. TheFakeMumbaiFractionalCX
is a mumbai-inspired test-specific backend and is not part of the deprecation/migration to provider plan. I think that we could either leave it as-is or rename it to something more general like "FakeFractionalCX".Visualization tests (joint V1 and V2 changes): --> test/visual will be left for a follow-up
Files not covered by this PR that use fake backends V1 -> to be addressed in deprecation/removal PR:
qiskit.test
#10998qiskit_ibm_runtime
, Remove provider-specific fake backends,FakeProvider
class and related tools in 1.0 #11376qiskit_ibm_runtime
, Remove provider-specific fake backends,FakeProvider
class and related tools in 1.0 #11376Files not covered by this PR that use fake provider -> to be addressed in removal PR: #11376