-
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 some bugs in loading Solovay Kitaev decompositions #12579
Conversation
- fix access via .item() - fix storing of global phase - fix storing ofgate sequence labels
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 9516403218Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9546816461Details
💛 - Coveralls |
if isinstance(matrix_and_phase, tuple): | ||
matrix, global_phase = matrix_and_phase | ||
else: | ||
matrix, global_phase = matrix_and_phase, 0 |
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.
Is setting the global phase to zero equivalent to the previous code which didn't set the global phase in the sequence?
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.
Yes, exactly 🙂
Co-authored-by: Elena Peña Tapia <[email protected]>
Pull Request Test Coverage Report for Build 9614416465Warning: 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.
LGTM
@Mergifyio backport stable/0.46 stable/1.1 |
✅ Backports have been created
|
* fix store & load - fix access via .item() - fix storing of global phase - fix storing ofgate sequence labels * undangle a dangling print * fix import order * Update releasenotes/notes/fix-sk-load-from-file-02c6eabbbd7fcda3.yaml Co-authored-by: Elena Peña Tapia <[email protected]> --------- Co-authored-by: Elena Peña Tapia <[email protected]> (cherry picked from commit 6974b45)
* fix store & load - fix access via .item() - fix storing of global phase - fix storing ofgate sequence labels * undangle a dangling print * fix import order * Update releasenotes/notes/fix-sk-load-from-file-02c6eabbbd7fcda3.yaml Co-authored-by: Elena Peña Tapia <[email protected]> --------- Co-authored-by: Elena Peña Tapia <[email protected]> (cherry picked from commit 6974b45)
* fix store & load - fix access via .item() - fix storing of global phase - fix storing ofgate sequence labels * undangle a dangling print * fix import order * Update releasenotes/notes/fix-sk-load-from-file-02c6eabbbd7fcda3.yaml Co-authored-by: Elena Peña Tapia <[email protected]> --------- Co-authored-by: Elena Peña Tapia <[email protected]> (cherry picked from commit 6974b45) Co-authored-by: Julien Gacon <[email protected]>
* fix store & load - fix access via .item() - fix storing of global phase - fix storing ofgate sequence labels * undangle a dangling print * fix import order * Update releasenotes/notes/fix-sk-load-from-file-02c6eabbbd7fcda3.yaml Co-authored-by: Elena Peña Tapia <[email protected]> --------- Co-authored-by: Elena Peña Tapia <[email protected]> (cherry picked from commit 6974b45) Co-authored-by: Julien Gacon <[email protected]>
* fix store & load - fix access via .item() - fix storing of global phase - fix storing ofgate sequence labels * undangle a dangling print * fix import order * Update releasenotes/notes/fix-sk-load-from-file-02c6eabbbd7fcda3.yaml Co-authored-by: Elena Peña Tapia <[email protected]> --------- Co-authored-by: Elena Peña Tapia <[email protected]>
Summary
Fixes #12576 and some other small bugs in storing & loading basic approximations for the Solovay Kitaev algorithm.
Details and comments
.item()
unwrapping when loading the dictionary from thenpy
filelabels
andglobal_phase