2

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?

glS
  • 27,670
  • 7
  • 39
  • 126
ironmanaudi
  • 809
  • 4
  • 10

1 Answers1

3

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

ryanhill1
  • 2,668
  • 1
  • 11
  • 39