-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 a bug in isometry.rs #12469
Fix a bug in isometry.rs #12469
Conversation
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 9273316343Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - 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.
This LGTM thanks for catching and fixing this. TBH, at the time when I added that assert I can't remember what I thought I was guarding against, but do remember explicitly thinking it was needed. But looking at it in retrospect it's clearly not correct for more than 2 target qubits so I'm not sure what I was thinking (I probably had tunnel vision trying to get the tests to pass).
Just one minor nit in the release notes but otherwise this is ready to go.
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
* remove assertion * extend the test * add release notes * fix release notes * Update releasenotes/notes/fix-isometry-rust-adf0eed09c6611f1.yaml Co-authored-by: Matthew Treinish <mtreinish@kortar.org> --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org> (cherry picked from commit 0f0a634)
* remove assertion * extend the test * add release notes * fix release notes * Update releasenotes/notes/fix-isometry-rust-adf0eed09c6611f1.yaml Co-authored-by: Matthew Treinish <mtreinish@kortar.org> --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org> (cherry picked from commit 0f0a634) Co-authored-by: Shelly Garion <46566946+ShellyGarion@users.noreply.github.com>
* remove assertion * extend the test * add release notes * fix release notes * Update releasenotes/notes/fix-isometry-rust-adf0eed09c6611f1.yaml Co-authored-by: Matthew Treinish <mtreinish@kortar.org> --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Summary
After PR #12197 was merged, there is a bug with the following code:
The code is working for
num_qubits = 1
or2
but not for3
or4
or5
, and raises the following error:Details and comments
The solution is to remove the assertion
assert!(j <= 1)
incrates/accelerate/src/isometry.rs:215:13