Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Deprecate provider-specific fake backends,FakeProvider class and related tools in 0.46 #11381
Deprecate provider-specific fake backends,FakeProvider class and related tools in 0.46 #11381
Changes from all commits
c5532d0
a4e4f6a
592e93b
a89d95c
8e489ae
1508e8f
04f389f
7fd1e25
cf830b4
706de09
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is this class still used by anything in Qiskit? And, how about
FakeBackendV1
which this ultimately uses as a base class? Can all of this be deprecated?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.
Ah I see, you're doing this in a separate PR it looks like 😄.
Or wait, are you? I'm a bit confused since I would think this file wouldn't have changes at all here since it's part of the V1 hierarchy?
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.
This is confusing, but the V1 base classes (
FakeBackendV1
,FakePulseBackend
,FakeQasmBackend
) cannot be deprecated yet because they are used in the "generic" backend version too. The "fake backend alternatives" in #10952 are effectively snapshot-based fake backends with "more generic" names. This was agreed to be the best temporary alternative while BackendV1 is around, the plan is to eventually fully transition to BackendV2 but this will not happen for 1.0.So now we have the challenge to deprecate ~45 subclasses without deprecating the base classes. This warning is only for the subclasses, and this is why I don't use the decorator here, so that the message doesn't say
"FakeBackendV1 is deprecated"
but"All fake backend instances based on real device snapshots..."
. And about the V1 hierarchy, I am taking advantage of the fact that these "V1 alternatives" to fake backends live on the main branch and the deprecations live on 0.46, so the warning would never appear on the non-deprecated alternatives.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.
Ah okay, thank you! I was missing that subtly 😄.
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.
It might be nice to have this message in the deprecation for
FakeBackendV2
as well, since as it is I believe it won't tell users that the classes which inherit fromFakeBackendV2
are deprecated.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.
I tested the warnings locally and they show up in my environment (I also checked when running the unit tests):

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.
Ah, I specifically meant the bit "All fake backend instances based on real device snapshots" might be helpful, since the user might think it's a bug otherwise to get a warning about a base class.
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.
aah sure, that makes sense
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.
I actually realized thanks to that screenshot that the message said "it will be removed Qiskit 1.0", so I updated the removal timeline of all the classes that were missing the "in" in 706de09.
