-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Infer cregbundle
for all drawers
#9133
Conversation
This swaps the default behaviour for the `cregbundle` to always bundle if possible, but not to emit a warning if the bundles are expanded and no concrete value was given for the parameter. Previously, this sort of logic was only done for the text drawer.
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:
|
Many tests use the internal `_text_circuit_drawer` function, which has different defaults to the standard `circuit_drawer` function. Since this commit chain made this default the same all the way through the tree, several tests changed their output, or needed the keyword arguments updating.
Pull Request Test Coverage Report for Build 3533453309
💛 - Coveralls |
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'm good with this change, but since it's technically a behavior change for the text drawer I'm wondering if we want to actually backport this for 0.22.3. I'm leaning towards yes because I think it'll be good to fix the warning for the other drawers and also I'm not sure the default formatting for the text drawer is really significant api contract as long as it represents the circuit accurately.
The text drawer doesn't actually change public behaviour here. The tests changed because they use a private internal function whose Nothing actually changes public behaviour here - various internal-only functions had |
* Infer `cregbundle` for all drawers This swaps the default behaviour for the `cregbundle` to always bundle if possible, but not to emit a warning if the bundles are expanded and no concrete value was given for the parameter. Previously, this sort of logic was only done for the text drawer. * Update tests for new default behaviour Many tests use the internal `_text_circuit_drawer` function, which has different defaults to the standard `circuit_drawer` function. Since this commit chain made this default the same all the way through the tree, several tests changed their output, or needed the keyword arguments updating. * Fix missing warning test * Revert unrelated expectedFailure changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 35733a5)
* Infer `cregbundle` for all drawers This swaps the default behaviour for the `cregbundle` to always bundle if possible, but not to emit a warning if the bundles are expanded and no concrete value was given for the parameter. Previously, this sort of logic was only done for the text drawer. * Update tests for new default behaviour Many tests use the internal `_text_circuit_drawer` function, which has different defaults to the standard `circuit_drawer` function. Since this commit chain made this default the same all the way through the tree, several tests changed their output, or needed the keyword arguments updating. * Fix missing warning test * Revert unrelated expectedFailure changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 35733a5) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
* Infer `cregbundle` for all drawers This swaps the default behaviour for the `cregbundle` to always bundle if possible, but not to emit a warning if the bundles are expanded and no concrete value was given for the parameter. Previously, this sort of logic was only done for the text drawer. * Update tests for new default behaviour Many tests use the internal `_text_circuit_drawer` function, which has different defaults to the standard `circuit_drawer` function. Since this commit chain made this default the same all the way through the tree, several tests changed their output, or needed the keyword arguments updating. * Fix missing warning test * Revert unrelated expectedFailure changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
This swaps the default behaviour for the
cregbundle
to always bundle if possible, but not to emit a warning if the bundles are expanded and no concrete value was given for the parameter. Previously, this sort of logic was only done for the text drawer.Details and comments
Fix #9129. This was previously done for the text drawer in #8689, but this PR makes it true for all the existing drawers.