-
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
Add logic to return channels to FakeBackendV2 #8444
Add logic to return channels to FakeBackendV2 #8444
Conversation
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:
|
This has partial overlap with #8318 although this covers more of the optional attributes in the BackendV2 interface. @gadial are you ok with closing #8318 in favor of this? Or do you want to take @nkanazawa1989's additions into #8318 too |
The question is if we can instantiate |
I think Naoki's PR is better since it is more focused; I intend to close #8318 . |
Pull Request Test Coverage Report for Build 2907173820
💛 - Coveralls |
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.
LGTM, one inline comment/question but not a blocker.
"measure": pulse.MeasureChannel, | ||
"control": pulse.ControlChannel, | ||
} | ||
identifier_pattern = re.compile(r"\D+(?P<index>\d+)") |
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.
Not that regex time here will be a big deal but do you think it'll be worthwhile to move this to a class level variable so we don't have to have the compile time on each instantiation of a FakeBackendV2
?
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 3f9edfc)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 3f9edfc) Co-authored-by: Naoki Kanazawa <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
This PR adds a logic to FakeBackendV2 that parses the reported channel mapping and returns the pulse channels with method call, such as
.drive_channel(qubit)
. Because the corresponding V1 backend returns the channels, this is kind of a bug due to missing logic.Details and comments
Fix #7832