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

Adds ability to set ctrl_state on standard gates #4076

Merged
merged 38 commits into from
Apr 24, 2020

Conversation

ewinston
Copy link
Contributor

@ewinston ewinston commented Apr 3, 2020

Summary

This adds the ability to set ctrl_state on standard controlled gates. This change resolves a bug when checking for gate equality since previously setting ctrl_state would potentially not return a gate of the same class. Also, tests were added to check ctrl_state setting on all standard gates.

fixes #4138

Details and comment

Co-authored-by: lbello@gmail.com

@ewinston ewinston added the bug Something isn't working label Apr 3, 2020
@1ucian0 1ucian0 added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Apr 7, 2020
@ewinston ewinston requested a review from jaygambetta as a code owner April 21, 2020 15:05
@1ucian0 1ucian0 added this to the 0.14 milestone Apr 22, 2020
Copy link
Member

@1ucian0 1ucian0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a release note?

@mergify mergify bot merged commit 6a1e8b1 into Qiskit:master Apr 24, 2020
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* ctrl_state for Rotation gates

* docstring

* extending the test to other gates

* lint

* add strl state setting to gate init

* add ctrl_state to standard gates

* move compute_control_matrix

* linting

* remove comment

* linting

* black and add test

* silent deprecation

* deprecation gates

* some ddt

* TestSingleControlledRotationGates

* linting

* merge master

* fix controlled cx gate

* linting

* some missing cases with C*X

* all the logic to MCXGate

* ups

* added release notes

* minor release notes edit

Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@ewinston ewinston deleted the ctrl_state_std 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
bug Something isn't working Changelog: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error while implementing RZGate with single open control
2 participants