-
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 global phase in inverse of UCGate #8508
Conversation
The inverse of UCGate is defined by simply inverting the existing decomposition, but the inverse of the global phase was missing.
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:
|
Thanks for the fix! Could you also add a releasenote? 🙂 |
Thanks, @israelferrazaraujo. This PR also makes Isometry decomposition phase correct #4687. |
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Hi @Cryoris, |
releasenotes/notes/bugfix-ucgate-inverse-global_phase-c9655c13c22e5cf4.yaml
Outdated
Show resolved
Hide resolved
Pull Request Test Coverage Report for Build 2845394035
💛 - 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 thanks a lot for the contribution!
* Defines the inverse of the global phase The inverse of UCGate is defined by simply inverting the existing decomposition, but the inverse of the global phase was missing. * Tests the UCGate.inverse() function * Lint * Seed for building the matrices * Replace `unitary_simulator` by using `qiskit.quantum_info.Operator`. Co-authored-by: Julien Gacon <gaconju@gmail.com> * Import `Operator` class * Release notes * Lint * Test the phase of isometry decomposition * Removes the `prelude` from the release notes file * Replaces `matrix_equal` with `np.allclose` Co-authored-by: Julien Gacon <gaconju@gmail.com> (cherry picked from commit 82c85d8)
It's good to contribute to Qiskit. I hope to do more in the future. |
* Defines the inverse of the global phase The inverse of UCGate is defined by simply inverting the existing decomposition, but the inverse of the global phase was missing. * Tests the UCGate.inverse() function * Lint * Seed for building the matrices * Replace `unitary_simulator` by using `qiskit.quantum_info.Operator`. Co-authored-by: Julien Gacon <gaconju@gmail.com> * Import `Operator` class * Release notes * Lint * Test the phase of isometry decomposition * Removes the `prelude` from the release notes file * Replaces `matrix_equal` with `np.allclose` Co-authored-by: Julien Gacon <gaconju@gmail.com> (cherry picked from commit 82c85d8) Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Jake Lishman <jake.lishman@ibm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
The
inverse()
of theUCGate
class is defined by simply inverting the existing decomposition, but the inverse of the global phase was missing.Details and comments
The existing tests did not cover the
inverse()
function of theUCGate
class, so I also included a new test.