Skip to content
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

Unify circuit drawer methods #1055

Merged
merged 3 commits into from
Oct 9, 2018

Conversation

mtreinish
Copy link
Member

Summary

As part of the cleanup of the circuit visualization module we really
only need one entrypoint to draw a circuit. So instead of having 5
separate methods that all do the same thing with different mechanisms or
options this commit condenses that all into the single circuit_drawer()
method. 2 new kwarg flags are added to specify the output technique used
and whether we should open the visualization in a new window after
generating it. For backwards compatibility the old public methods still
exist but are deprecated (which emits the proper warning) and can be
removed after we include the warnings in a release and an appropriate
period of time passes.

Details and comments

Fixes #1048
Fixes #1049

@mtreinish
Copy link
Member Author

The next step here will be to split out the latex drawer and matplotlib drawer into separate modules.

@mtreinish mtreinish force-pushed the reorg-circuit-drawer branch from c386c8a to df1c2ef Compare October 8, 2018 15:47
@jaygambetta jaygambetta mentioned this pull request Oct 8, 2018
@mtreinish mtreinish force-pushed the reorg-circuit-drawer branch from df1c2ef to 0bd91d3 Compare October 8, 2018 17:24
jaygambetta
jaygambetta previously approved these changes Oct 8, 2018
Copy link
Member

@jaygambetta jaygambetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the interactive flag as well.

As part of the cleanup of the circuit visualization module we really
only need one entrypoint to draw a circuit. So instead of having 5
separate methods that all do the same thing with different mechanisms or
options this commit condenses that all into the single circuit_drawer()
method. 2 new kwarg flags are added to specify the output technique used
and whether we should open the visualization in a new window after
generating it. For backwards compatibility the old public methods still
exist but are deprecated (which emits the proper warning) and can be
removed after we include the warnings in a release and an appropriate
period of time passes.

Fixes Qiskit#1048
Fixes Qiskit#1049
@mtreinish mtreinish force-pushed the reorg-circuit-drawer branch from 9850fa1 to 61b8899 Compare October 9, 2018 02:05
@jaygambetta jaygambetta merged commit 5de7f86 into Qiskit:master Oct 9, 2018
@mtreinish mtreinish deleted the reorg-circuit-drawer branch October 9, 2018 04:05
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
* Unify circuit drawer methods

As part of the cleanup of the circuit visualization module we really
only need one entrypoint to draw a circuit. So instead of having 5
separate methods that all do the same thing with different mechanisms or
options this commit condenses that all into the single circuit_drawer()
method. 2 new kwarg flags are added to specify the output technique used
and whether we should open the visualization in a new window after
generating it. For backwards compatibility the old public methods still
exist but are deprecated (which emits the proper warning) and can be
removed after we include the warnings in a release and an appropriate
period of time passes.

Fixes Qiskit#1048
Fixes Qiskit#1049

* Add changelog

* Fix docstring lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants