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

Fix tracking of routing permutation in Sabre with disjoint backends (backport #13833) #13835

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 13, 2025

Summary

If the backing coupling graph is disjoint, and unused components of the coupling graph would not be considered when constructing the complete routing permutation. In practice, Sabre aborts immediately after layout without attempting to route, if it needed to split the DAG across more than one disjoint component, because it can't guarantee correctness of the final routing in the presence of component-spanning barriers or classical communication, so the only way for a component to be forgotten is if the backend is disjoint, but the DAG fits into a single component.

Details and comments

Fix #13732, though there's a whole cornucopia of bugs split between very old versions of Qiskit, this commit's parent, and the example in the issue itself that lead from that issue seeing a regression in Qiskit 1.3 to this one.

In actuality, this bug has been around since the disjoint-coupling handling was first added in #9802 (qiskit-terra 0.24), and the test case in this PR would fail that version too (the fact that TranspileLayout.initial_index_layout wasn't added til later notwithstanding - the first assertion fails).


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

…13833)

If the backing coupling graph is disjoint, and unused components of the
coupling graph would not be considered when constructing the complete
routing permutation.  In practice, Sabre aborts immediately after layout
without attempting to route, if it needed to split the DAG across more
than one disjoint component, because it can't guarantee correctness of
the final routing in the presence of component-spanning barriers or
classical communication, so the only way for a component to be forgotten
is if the backend is disjoint, but the DAG fits into a single component.

(cherry picked from commit b933179)
@mergify mergify bot requested a review from a team as a code owner February 13, 2025 09:39
@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 Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler labels Feb 13, 2025
@github-actions github-actions bot added this to the 1.3.3 milestone Feb 13, 2025
@jakelishman jakelishman added this pull request to the merge queue Feb 13, 2025
Merged via the queue into stable/1.3 with commit 0f591c6 Feb 13, 2025
20 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 13304721044

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • 23 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.003%) to 88.913%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 5 92.73%
crates/qasm2/src/parse.rs 18 96.69%
Totals Coverage Status
Change from base Build 13272982180: -0.003%
Covered Lines: 79167
Relevant Lines: 89039

💛 - Coveralls

@jakelishman jakelishman deleted the mergify/bp/stable/1.3/pr-13833 branch February 13, 2025 20:22
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.

3 participants