# What does PhISwap gate mean in Cirq?

I am currently using the Cirq pakage and when drawing the circuit structure, I constantly encountered the PhISwap gate, like in here. What does this gate mean?

In Cirq, the PhasedISwapPowGate (i.e. PhISwap) is a fractional ISWAP conjugated by Z rotations. With phase exponent $$p$$ and exponent $$t$$, it is equivalent to the composition $$(\text{Z}^{-p} \otimes \text{Z}^p) \text{ISWAP}^t (\text{Z}^p \otimes \text{Z}^{-p})$$ and is given by the matrix: $$\left(\begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & c & i\cdot s\cdot f & 0 \\ 0 & i\cdot s \cdot f^* & c & 0 \\ 0 & 0 & 0 & 1 \end{array}\right)$$ where: $$c = \cos(\pi \cdot t/2)$$ $$s = \sin(\pi \cdot t/2)$$ $$f = \exp(2\pi i \cdot p)$$ and star indicates complex conjugate.

The PhasedISwapPowGate is initialized with the following parameters:

phase_exponent: Union[float, sympy.Symbol] = 0.25
exponent: Union[float, sympy.Symbol] = 1.0


In the circuit diagram, these parameters relate to the string gate representation as:

0: ───PhISwap(phase_exponent)────────────
│
1: ───PhISwap(phase_exponent)^exponent───


These parameters relate to the matrix representation as:

c = np.cos(np.pi * exponent / 2)
s = np.sin(np.pi * exponent / 2)
f = np.exp(2j * np.pi * phase_exponent)


Source: phase_iswap_gate.py

• Thanks for the reply. I find that the ciruict contains PhISwap(0.25)^-0.645. I suppose in this case p=0.25 and t=1. However, what does the ^-0.645 mean? Mar 10 at 6:00
• @ironmanaudi Answer updated! Mar 10 at 16:46