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
Update calibration and mixin tests to work with BackendV2 #900
Update calibration and mixin tests to work with BackendV2 #900
Changes from all commits
25fadf2
e4bf2a8
b4312be
c8ab136
f386e78
9923e92
babf0ec
8847ac1
57336cc
2d8a247
02dc7eb
a9d0c38
44cd94d
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.
I'm curious about the reason not to use BackendV2Converter.
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 main reason is that I started this PR before it existed. I wonder if it would work or would suffer from the issues that I hack around below.
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 tried this:
but I encountered several test errors. A lot of them were this problem:
FakeBackendV2
follows a different code path fromBackendConverter
. They use differentconvert_to_target
functions.BackendConverter
assumes thatreadout_length
is in the properties here:https://github.com/Qiskit/qiskit-terra/blob/a1a67a11741000f8f3b6d6a8766dab7e3cd06847/qiskit/providers/backend_compat.py#L86-L89
while
FakeBackendV2
checks forreadout_length
but does not error if it is not there:https://github.com/Qiskit/qiskit-terra/blob/a1a67a11741000f8f3b6d6a8766dab7e3cd06847/qiskit/providers/fake_provider/utils/backend_converter.py#L80-L85
I tried working around that with this (thisi is also working around errors from
description
andmax_experiments
being missing):but I still had further errors. The next one that needed to be addressed was that
u2
andid
were in the basis gates but not in the properties which led to an error in a transpiler pass.At that point, I decided it was more trouble than it was worth to get this working. Maybe
BackendConverter
should be more robust, but likelyFakeOpenPulse2Q
just does not have complete enough metadata to match what is expected of a BackendV1 instance. We could fix that but likely it would be better just to make a BackendV2 equivalent class directly in terra.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.
Thanks Will. This is good to know. I agree we should have Fake V2 in Terra in future.