-
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
Fix handling of controlflow ops when control flow is in basis #8879
Conversation
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:
|
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.
Looks good, thanks for the re-ordering!
Pull Request Test Coverage Report for Build 3236102609
💛 - Coveralls |
Just manually updating the PR so it'll automerge after only one run of tests rather than two, since this PR is on the critical path for 0.22rc2. |
This commit fixes the handling of ControlFlowOps in the Unroll3QOrMore transpiler pass when the the control flow ops are in the basis set. Previously, the check for whether the operation was native to the target was done before recursing into the control flow block. This effectively skipped the conversion that should have happened in the block. To fix this the control flow operation handling is moved before the basis check. Later passes (mainly basis translation) will fail if the control flow operations aren't available on the target and we should always recursively unroll gates in this pass.
ac4b8bf
to
d7d49cd
Compare
This commit fixes the handling of ControlFlowOps in the Unroll3QOrMore transpiler pass when the the control flow ops are in the basis set. Previously, the check for whether the operation was native to the target was done before recursing into the control flow block. This effectively skipped the conversion that should have happened in the block. To fix this the control flow operation handling is moved before the basis check. Later passes (mainly basis translation) will fail if the control flow operations aren't available on the target and we should always recursively unroll gates in this pass. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 985b005)
…#8887) This commit fixes the handling of ControlFlowOps in the Unroll3QOrMore transpiler pass when the the control flow ops are in the basis set. Previously, the check for whether the operation was native to the target was done before recursing into the control flow block. This effectively skipped the conversion that should have happened in the block. To fix this the control flow operation handling is moved before the basis check. Later passes (mainly basis translation) will fail if the control flow operations aren't available on the target and we should always recursively unroll gates in this pass. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 985b005) Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
This commit fixes the handling of ControlFlowOps in the Unroll3QOrMore transpiler pass when the the control flow ops are in the basis set. Previously, the check for whether the operation was native to the target was done before recursing into the control flow block. This effectively skipped the conversion that should have happened in the block. To fix this the control flow operation handling is moved before the basis check. Later passes (mainly basis translation) will fail if the control flow operations aren't available on the target and we should always recursively unroll gates in this pass.
Details and comments