-
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
Prequel to if/else changes to mpl circuit drawer #10096
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:
|
Pull Request Test Coverage Report for Build 5137779293
💛 - Coveralls |
…erra into pre_control_flow_mpl
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 I understand correctly, most of this is about removing some of the global state from MatplotlibDrawer
, and passing it a little more explicitly around in the (to be added) recursive calls? I'm totally on board with that.
Removing the Anchor
class also seems fine to me, and it's super promising that the tests didn't need any modifications with this. Thanks Edwin!
Wait sorry, I just realised that the MPL tests don't run in the standard format (at least without #9961) - I'll probably merge this in a sec, I'll just check the outputs locally first. |
I've verified locally that this PR introduces no changes to the visual test suite compared to |
Summary
Needed changes to base mpl drawer before implementing if/else display.
Details and comments
This PR changes some of the structure of the mpl circuit drawer as a prelude to providing a full display of the interior of if/else gates. About 200 lines of code are changed and most are repetitive variable name changes. The changes are
plot_coords
method and thex_index
attribute were retained and are now part of the MatplotlibDrawer class._data
and_wire_map
and initiate these variables in thedraw
method and pass them to subsequent methods. The majority of the changes are these variable changes.These changes have been tested with all the existing
ipynb
image tests and the functionality of the drawer should be unchanged from the current main mpl drawer.