-
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
Avoid skipping channels in pulse visualizer #8974
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:
|
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.
If it's a bug fix, we always do a release note - since it got noticed in the Slack, it definitely warrants one! It doesn't really matter how easy / small the internal code change was.
Pull Request Test Coverage Report for Build 3309767833
💛 - 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. I'll approve after release note.
783f05c
to
0d68ae1
Compare
Okay, I found the relevant test and modified it to fail. All the tests in the class use the same set of channels and I didn't want to have to update every test so I just modified the channel list in the one test to get it to fail. If that's too weird, maybe we can just drop that commit. It was a nice sanity check that the fix actually changed a fail into a pass. I also added a release note. I opened #8981 because it seemed cleanest to reference an issue in the release note. |
close #8981 |
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 thanks for adding test and note.
@nkanazawa1989 Should we have labeled this with "stable backport potential"? |
Summary
This PR fixes some cases where the pulse visualizer would skip some channels.
Details and comments
inds
is a set that is iterated over and compared to sorted lists that get their values popped off the end when they match. I guess typicallyinds
has iterated in a way that matches the sorting of the lists so this wasn't noticed before, but the order is random in principle. This PR is a quick fix to sortinds
so it matches the ordering of the lists. This problem was first noticed in Qiskit Slack.This is a pretty small change -- we could add a release note or tests (I haven't looked at the tests for this part of the code) if they seemed worthwhile.