Skip to content
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

Don't run ElidePermutation if routing is disabled (backport #13184) #13194

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 19, 2024

Summary

We have a routing plugin named "none" which is used to assert that no routing should be performed (it errors if there is routing required). We were previously running the ElidePermutations pass in this case which is not the expected or correct behavior because it causes the same kind of permutation as routing and would eliminate and swap gates in the circuit. As the typical use case for routing_method='none' is when you've already routed a circuit (or constructed it by hand to match the connectivity constraints) we shouldn't be doing this. This commit fixes this behavior so if the routing_method is set to "none" we no longer run the ElidePermutations pass.

Details and comments

Fixes #13144


This is an automatic backport of pull request #13184 done by Mergify.

* Don't run ElidePermutation if routing is disabled

We have a routing plugin named "none" which is used to assert that no
routing should be performed (it errors if there is routing required).
We were previously running the ElidePermutations pass in this case which
is not the expected or correct behavior because it causes the same kind
of permutation as routing and would eliminate and swap gates in the
circuit. As the typical use case for routing_method='none' is when
you've already routed a circuit (or constructed it by hand to match the
connectivity constraints) we shouldn't be doing this. This commit fixes
this behavior so if the routing_method is set to "none" we no longer run
the ElidePermutations pass.

Fixes #13144

* Move release note to the correct location

(cherry picked from commit 9a896d3)
@mergify mergify bot requested a review from a team as a code owner September 19, 2024 21:19
@qiskit-bot
Copy link
Collaborator

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 following people are relevant to this code:

  • @Qiskit/terra-core

@github-actions github-actions bot added this to the 1.2.2 milestone Sep 19, 2024
@github-actions github-actions bot added Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler labels Sep 19, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10949090882

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 10 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.009%) to 89.767%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 4 92.48%
crates/qasm2/src/parse.rs 6 97.61%
Totals Coverage Status
Change from base Build 10938909061: 0.009%
Covered Lines: 66881
Relevant Lines: 74505

💛 - Coveralls

@jakelishman jakelishman added this pull request to the merge queue Sep 19, 2024
Merged via the queue into stable/1.2 with commit 01b4cc7 Sep 20, 2024
18 checks passed
@mtreinish mtreinish deleted the mergify/bp/stable/1.2/pr-13184 branch September 20, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants