-
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
"fold" option unified across drawers #3108
Conversation
This reverts commit bba055f.
Since #3105 got merged, removing |
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.
LGTM, 2 little comments inline about the docstrings, but easy enough to fix in a follow up too.
@@ -604,6 +604,12 @@ def draw(self, scale=0.7, filename=None, style=None, output=None, | |||
idle_wires (bool): Include idle wires. Default is True. | |||
with_layout (bool): Include layout information, with labels on the physical | |||
layout. Default is True. | |||
fold (int): Sets pagination. It can be disabled using -1. | |||
In `text`, sets the length of the lines. This useful when the |
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.
In `text`, sets the length of the lines. This useful when the | |
In `text`, sets the length of the lines. This is useful when the |
drawing does not fit in the console. If None (default), it will try to | ||
guess the console width using `shutil.get_terminal_size()`. However, if | ||
running in jupyter, the default line length is set to 80 characters. | ||
In `mpl` is the amount of operations before folding. Default is 25. |
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.
It might be worth saying explicitly that for latex
and latex_source
this does nothing
drawing does not fit in the console. If None (default), it will try to | ||
guess the console width using `shutil.get_terminal_size()`. However, if | ||
running in jupyter, the default line length is set to 80 characters. | ||
In `mpl` is the amount of operations before folding. Default is 25. |
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.
Same comments as above
* remove line_length * release note Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* test * cast in insinstance * style * layouts are already layouts :) * style['plotbarrier'] is being deprecated * internal param for text drawer renamed to plot_barriers * error when style contains unknown options * better error message * deprecated style option * mp karg fold * text fold * lint * docstring * cregbundle text option * Revert "cregbundle text option" This reverts commit bba055f. * revert 3100 * new pickles * cleaning up the diff * docstring * pickles
…skit#4507) * remove line_length * release note Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fixes partially #2797
On top of PR #3105, so
on hold
until #3105 gets merged.Deprecates
line_length
in favor afold
.