Skip to content

Conversation

@unaiic
Copy link
Contributor

@unaiic unaiic commented Nov 3, 2021

Define a global constant for cirq.ISWAP_INV, similar to cirq.SQRT_ISWAP_INV, and replace usages of cirq.ISWAP ** -1 with cirq.ISWAP_INV.

Fixes #4615.

@unaiic unaiic requested review from a team, cduck, vtomole and wcourtney as code owners November 3, 2021 19:53
@unaiic unaiic requested a review from dstrain115 November 3, 2021 19:53
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Nov 3, 2021
@CirqBot CirqBot added the size: S 10< lines changed <50 label Nov 3, 2021
@tanujkhattar tanujkhattar self-assigned this Nov 5, 2021
(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),
Copy link
Collaborator

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

Copy link
Collaborator

@tanujkhattar tanujkhattar left a 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.

@tanujkhattar
Copy link
Collaborator

@unaiic Gentle reminder. Please address the comments and fix the failing tests so that we can merge the PR.

@dabacon dabacon requested a review from verult as a code owner May 11, 2022 17:38
@dabacon dabacon mentioned this pull request Jun 24, 2022
@dabacon
Copy link
Collaborator

dabacon commented Jun 25, 2022

Implemented in #5613

@dabacon dabacon closed this Jun 25, 2022
CirqBot pushed a commit that referenced this pull request Jun 25, 2022
Fixes #4615

#4624 has not been touched in a long time, so jumping in to fix this.
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Fixes quantumlib#4615

quantumlib#4624 has not been touched in a long time, so jumping in to fix this.
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
Fixes quantumlib#4615

quantumlib#4624 has not been touched in a long time, so jumping in to fix this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Makes googlebot stop complaining. size: S 10< lines changed <50

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define cirq.ISWAP_INV, similar to cirq.SQRT_ISWAP_INV and replace usages.

4 participants