Skip to content

Fix draw bug in pyqasm printer #168

Merged
TheGupta2012 merged 3 commits intomainfrom
fix-draw-bug
Apr 8, 2025
Merged

Fix draw bug in pyqasm printer #168
TheGupta2012 merged 3 commits intomainfrom
fix-draw-bug

Conversation

@TheGupta2012
Copy link
Copy Markdown
Member

Fixes #165

Summary of changes

  • Internal to the mpl_draw function, the image is being generated during the matplotlib initialization. While I couldn't find that source, closing it with plt.close does not display the figure before it is returned to the notebook
  • Also, in the original draw implementation, the plt.show is disabled by default due to the plt.ioff. So, needed a check to know if we were in interactive mode or not.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@TheGupta2012 TheGupta2012 requested a review from ryanhill1 April 7, 2025 05:57
@TheGupta2012 TheGupta2012 merged commit aa0e00f into main Apr 8, 2025
20 checks passed
@TheGupta2012 TheGupta2012 deleted the fix-draw-bug branch April 21, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Inconsistent draw() and mpl_draw() behavior

2 participants