2
$\begingroup$

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?

$\endgroup$

1 Answer 1

3
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ 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? $\endgroup$ Commented Mar 10, 2022 at 6:00
  • $\begingroup$ @ironmanaudi Answer updated! $\endgroup$
    – ryanhill1
    Commented Mar 10, 2022 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.