Skip to content
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

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

wshanks
Copy link
Contributor

@wshanks wshanks commented Oct 20, 2022

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 typically inds 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 sort inds 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.

@wshanks wshanks requested review from a team and nonhermitian as code owners October 20, 2022 17:51
@qiskit-bot
Copy link
Collaborator

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:

Copy link
Member

@jakelishman jakelishman left a 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.

@coveralls
Copy link

coveralls commented Oct 20, 2022

Pull Request Test Coverage Report for Build 3309767833

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.412%

Totals Coverage Status
Change from base Build 3300600629: 0.0%
Covered Lines: 61703
Relevant Lines: 73097

💛 - Coveralls

Copy link
Contributor

@nkanazawa1989 nkanazawa1989 left a 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.

@wshanks
Copy link
Contributor Author

wshanks commented Oct 21, 2022

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.

@nkanazawa1989
Copy link
Contributor

close #8981

Copy link
Contributor

@nkanazawa1989 nkanazawa1989 left a 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 nkanazawa1989 added Changelog: Bugfix Include in the "Fixed" section of the changelog automerge labels Oct 24, 2022
@mergify mergify bot merged commit 0ba7a43 into Qiskit:main Oct 24, 2022
@wshanks
Copy link
Contributor Author

wshanks commented Oct 25, 2022

@nkanazawa1989 Should we have labeled this with "stable backport potential"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants