Skip to content
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

redress global_phase in controlled UnitaryGate #4799

Merged
merged 9 commits into from
Aug 21, 2020

Conversation

ewinston
Copy link
Contributor

Summary

This is a follow-up to a PR #4565 to simplify handling of global_phase in controlled UnitaryGate similar to the rest of the PR.

Details and comments

@ewinston ewinston requested a review from a team as a code owner July 25, 2020 04:24
ewinston added 3 commits July 27, 2020 14:14
Previously, the matrix for UnitaryGate internally used ctrl_state
when generating the matrix. However, when getting classes definition
method, X gates would be composed with the circuit undoing the controls.

This change makes the internally stored matrix be the one with closed
controls.
@Cryoris Cryoris added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Aug 20, 2020
@Cryoris
Copy link
Contributor

Cryoris commented Aug 20, 2020

LGTM 👍

This fixes a bug when the control state wasn't None right? If so, could you add a short reno?

@ewinston
Copy link
Contributor Author

LGTM +1

This fixes a bug when the control state wasn't None right? If so, could you add a short reno?

Added reno which mentions this.

@mergify mergify bot merged commit fbe429a into Qiskit:master Aug 21, 2020
@ewinston ewinston deleted the cuniglobal branch April 6, 2021 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants