Consolidate SQRT_ISWAP gate definitions
See original GitHub issueIs your feature request related to a use case or problem? Please describe.
Recently, #4213 added (will add) the SQRT_ISWAP=ISWAP**0.5 gate to the core set of gates. Several places throughout Cirq define it and one place even defines it as ISWAP**-0.5 (see https://github.com/quantumlib/Cirq/search?q=SQRT_ISWAP for the full list) which could lead to inconsistencies or bugs.
Describe the solution you’d like
These duplicate definitions SQRT_ISWAP = ISWAP**0.5
should be removed and all uses of the gate should be updated to ops.SQRT_ISWAP
or cirq.SQRT_ISWAP
as appropriate. https://github.com/quantumlib/Cirq/search?q=SQRT_ISWAP lists all places that need to be updated.
What is the urgency from your perspective for this issue? Is it blocking important work?
P2 - we should do it in the next couple of quarters
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
I like the idea of consolidating these definitions. I’d suggest that we define both
SQRT_ISWAP = ISWAP ** 0.5
andSQRT_ISWAP_INV = ISWAP ** -0.5
.Maybe I can issue a PR, and you can suggest me some changes if I have do something different. Also, I realized need to have my email signature in order to have my cla approved.