-
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
fix edge coloring bug in plot_coupling_map #12369
Conversation
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 9021050859Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - 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.
This looks good to me. It relies on the internal implementation detail about how the to_undirected
method works in rustworkx (internally iterates over the edges in id order). But while undocumented it is unlikely to ever change so it's fine. The only thing is could you add a release note to document this fix?
Sorry, I don't understand. I think the iteration order doesn't matter because |
Sorry that was mistake I misread the |
* fix edge coloring bug in plot circuit layout * add release note (cherry picked from commit 24f1436)
* fix edge coloring bug in plot circuit layout * add release note (cherry picked from commit 24f1436) Co-authored-by: Kevin J. Sung <[email protected]>
* fix edge coloring bug in plot circuit layout * add release note
Summary
Fixes #12354 .
Details and comments
The conversion to an undirected graph changes the edge ordering, causing it not to match the color ordering. This change uses a dictionary to recover the correct ordering.