-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Define cirq.ISWAP_INV #4624
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
Define cirq.ISWAP_INV #4624
Conversation
| (cirq.ISWAP ** -0.5, np.pi / 4, 0), | ||
| (cirq.ISWAP ** 1.0, -np.pi / 2, 0), | ||
| (cirq.ISWAP ** -1.0, np.pi / 2, 0), | ||
| (cirq.ISWAP_INV, np.pi / 2, 0), |
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.
nit: move down below other ISWAP. Also considering adding another case like cirq.ISWAP_INV ** 0.5
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.
Please create cirq-core/cirq/protocols/json_test_data/ISWAP_INV.json and cirq-core/cirq/protocols/json_test_data/ISWAP_INV.repr to fix the failing tests. You can look at existing json and repr files for ISWAP for reference.
Please also add tests to cirq-core/cirq/ops/swap_gates_test.py by extending the existing tests for cirq.SWAP.
|
@unaiic Gentle reminder. Please address the comments and fix the failing tests so that we can merge the PR. |
|
Implemented in #5613 |
Fixes quantumlib#4615 quantumlib#4624 has not been touched in a long time, so jumping in to fix this.
Fixes quantumlib#4615 quantumlib#4624 has not been touched in a long time, so jumping in to fix this.
Define a global constant for
cirq.ISWAP_INV, similar tocirq.SQRT_ISWAP_INV, and replace usages ofcirq.ISWAP ** -1withcirq.ISWAP_INV.Fixes #4615.