-
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
Add display of internal circuits for ControlFlowOps to mpl circuit drawer #10207
Conversation
…erra into pre_control_flow_mpl
…-terra into display_mpl_for_switch
…-terra into display_mpl_for_switch
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.
Thanks so much for this Edwin. I've left a couple of minor comments in line, but mostly I'm judging by the test output for this, and it looks fantastic. I think it might be one of those things where we need to put it out in the wild, and see if other people find any issues with visualisation.
I added a test using |
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.
Thanks so much for this, Edwin - I know it was a huge amount of work, both in design and actual execution, and I really appreciate it! These look fantastic, and I'm really keen to get them into the hands of our users, so we've got better ways to actually understand what's going on in a dynamic circuit.
Summary
This PR adds display of the circuits inside ForLoopOps and SwitchCaseOps to the mpl circuit drawer
Details and comments
This PR should be merged after #10096 and #10170. This adds the display of ForLoopOps and SwitchCaseOps in the same manner as was done in #10170 for IfElseOps and WhileLoopOps. This also fixes a bug in how gates were folding introduced in #10170.