-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conversation
[0, 1, 0, 0], | ||
[0, 0, 0.707, 0.707], | ||
[0, 0, 0.707, -0.707]], dtype=complex) | ||
|
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
e6533d8
to
d3f8657
Compare
* shorter CH gate definition * changelog * add ch matrix * import numpy * add test * fix broken test
Shorter definition for the ch gate, based on #1741