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
output as first kwarg in circuit.draw #3632
Conversation
Fully support this! However, it's an API change and we should deprecate the first positional argument as an integer. |
I am not sure if we really need a depreciation warning here as I have never seen anyone use a bare call to draw to set the scale (I have not actually seen anyone set the scale outside of the tutorials showing that it is possible). |
In general, we want to deprecated old behavior, even if we think it was rarely used. However, correctly deprecating changes in function argument order is quite difficult. (I wrote a decorator for changing argument names for #3399 that could maybe be expanded for this purpose, but its still a WIP.) Maybe in this case, the right balance is to change the order, and then check if |
* output as first kwarg * add depreciation warning. * fix import order * add depreciation
Summary
Makes it so one can just do
qc.draw('mpl')
verses always having to writeqc.draw(output='mpl')
Details and comments