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 |
mtreinish
left a comment
There was a problem hiding this comment.
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.
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>
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