-
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
Add option to user config to control reverse_bits in circuit drawer #9211
Add option to user config to control reverse_bits in circuit drawer #9211
Conversation
…ent user configuration
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 3949034173
💛 - Coveralls |
… file only if `wire_order` option is not passed to drawer This avoids confusion when user tries to pass `wire_order` to the drawer, but reverse_bits has been set to `True` in the user config file, which will then throw an error. This means that the `wire_order` option passed to the drawer takes precedence over the `reverse_bits` option set in the user config file.
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.
I tweaked the release note slightly and added an extra test that the changes to the user configuration file are correctly loaded up. I hope you don't mind, sorry - normally I'd have asked them in a comment for you to do, but we're getting a little close to the target release of 0.23.0rc1 (my fault for not looking at the PR sooner).
This looks good to me - congratulations on your first code merged to Terra! It'll be released on PyPI as a pre-release hopefully this Thursday and as a full release hopefully a week on Thursday.
Thank you @jakelishman! |
No worries! There's no need for you do anything more here, by the way - the bot will take care of merging. We're just having minor problems with our CI at the moment, which should be cleared out in a couple of hours' time. @Mergifyio requeue |
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
Summary
Fixes #9150.
Details and comments
This PR adds the option
circuit_reverse_bits
to the user config file to modify the default behavior of thereverse_bits
option in thecircuit_drawer
. For example, the following configuration in thesettings.conf
file:the circuit drawer will display a circuit with the most significant bit at the top without explicitly passing the
reverse_bits=True
option to thedraw()
method: