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

Shorter controlled-hadamard definition #2837

Merged
merged 8 commits into from
Aug 22, 2019
Merged

Conversation

ajavadia
Copy link
Member

Shorter definition for the ch gate, based on #1741

[0, 1, 0, 0],
[0, 0, 0.707, 0.707],
[0, 0, 0.707, -0.707]], dtype=complex)

Copy link
Member

Choose a reason for hiding this comment

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

We should verify the indexing here, and make sure to get enough precision to pass e.g. np.isclose.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kdk I fixed this and added a test. Thanks for the good catch.

@ajavadia ajavadia merged commit 10a0678 into Qiskit:master Aug 22, 2019
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* shorter CH gate definition

* changelog

* add ch matrix

* import numpy

* add test

* fix broken test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants