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 panic in SabreSwap with classical bits #8636

Merged
merged 2 commits into from
Aug 30, 2022

Conversation

mtreinish
Copy link
Member

Summary

This commit fixes a bug introduced in SabreSwap that was caught by the
randomized testing in #8635. A copy paste error was causing the rusty
sabre code to panic in cases where there were classical bits of a
particular index assigned prior to the qubit with the same index. This
commit fixes the typo so the behavior is corrected in general and the
panic is also fixed.

Details and comments

Fixes #8635

This commit fixes a bug introduced in SabreSwap that was caught by the
randomized testing in Qiskit#8635. A copy paste error was causing the rusty
sabre code to panic in cases where there were classical bits of a
particular index assigned prior to the qubit with the same index. This
commit fixes the typo so the behavior is corrected in general and the
panic is also fixed.

Fixes Qiskit#8635
@mtreinish mtreinish added Changelog: None Do not include in changelog Rust This PR or issue is related to Rust code in the repository labels Aug 30, 2022
@mtreinish mtreinish added this to the 0.22 milestone Aug 30, 2022
@mtreinish mtreinish requested a review from a team as a code owner August 30, 2022 12:09
@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 the following people are requested to review this:

jakelishman
jakelishman previously approved these changes Aug 30, 2022
@coveralls
Copy link

coveralls commented Aug 30, 2022

Pull Request Test Coverage Report for Build 2956399426

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 84.125%

Totals Coverage Status
Change from base Build 2950767604: 0.003%
Covered Lines: 56832
Relevant Lines: 67557

💛 - Coveralls

@mergify mergify bot merged commit 367ed4e into Qiskit:main Aug 30, 2022
@mtreinish mtreinish deleted the fix-sabre-panic branch March 10, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog Rust This PR or issue is related to Rust code in the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyO3 panic during SabreLayout
4 participants