qiskit icon indicating copy to clipboard operation
qiskit copied to clipboard

Fix global phase in inverse of UCGate and Isometry

Open israelferrazaraujo opened this issue 2 years ago • 6 comments

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.

israelferrazaraujo avatar Aug 10 '22 05:08 israelferrazaraujo

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

qiskit-bot avatar Aug 10 '22 05:08 qiskit-bot

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 10 '22 05:08 CLAassistant

Thanks for the fix! Could you also add a releasenote? 🙂

Cryoris avatar Aug 10 '22 10:08 Cryoris

Thanks, @israelferrazaraujo. This PR also makes Isometry decomposition phase correct #4687.

adjs avatar Aug 10 '22 11:08 adjs

Thanks for the fix! Could you also add a releasenote? slightly_smiling_face

Hi @Cryoris, I have added the release notes.

israelferrazaraujo avatar Aug 10 '22 18:08 israelferrazaraujo

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 Coverage Status
Change from base Build 2845105967: -0.003%
Covered Lines: 56315
Relevant Lines: 67002

💛 - Coveralls

coveralls avatar Aug 11 '22 13:08 coveralls

LGTM thanks a lot for the contribution!

It's good to contribute to Qiskit. I hope to do more in the future.

israelferrazaraujo avatar Aug 14 '22 16:08 israelferrazaraujo