qiskit
qiskit copied to clipboard
Fix global phase in inverse of UCGate and Isometry
Summary
The inverse()
of the UCGate
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 the UCGate
class, so I also included a new test.
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:
- @Qiskit/terra-core
Thanks for the fix! Could you also add a releasenote? 🙂
Thanks, @israelferrazaraujo. This PR also makes Isometry decomposition phase correct #4687.
Thanks for the fix! Could you also add a releasenote? slightly_smiling_face
Hi @Cryoris, I have added the release notes.
Pull Request Test Coverage Report for Build 2845394035
- 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
- 2 unchanged lines in 1 file lost coverage.
- Overall coverage decreased (-0.003%) to 84.05%
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
qiskit/extensions/quantum_initializer/squ.py | 2 | 79.78% |
<!-- | Total: | 2 |
Totals | |
---|---|
Change from base Build 2845105967: | -0.003% |
Covered Lines: | 56315 |
Relevant Lines: | 67002 |
💛 - Coveralls
LGTM thanks a lot for the contribution!
It's good to contribute to Qiskit. I hope to do more in the future.