Skip to content

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

@ryanhill1

Description

@ryanhill1

There are inconsistent display issues when using pyqasm.draw() and pyqasm.printer.mpl_draw() in Jupyter notebooks:

pyqasm.draw() behavior:

  • The circuit diagram displays correctly the first time it’s called.
  • Subsequent calls produce no diagram output.
  • Restarting the kernel resets this behavior — it works once and then fails on following calls.
draw-bug.mov

pyqasm.printer.mpl_draw() behavior:

  • The circuit diagram displays twice on the first call.
  • Subsequent calls show the diagram only once, as expected.
  • After restarting the kernel, the double-display issue repeats on the first call.
mpl_draw_bug.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions