class cirq.FSimGate(theta: float, phi: float)[source]

Fermionic simulation gate family.

Contains all two qubit interactions that preserve excitations, up to
single-qubit rotations and global phase.

The unitary matrix of this gate is:

[[1, 0, 0, 0],
 [0, a, b, 0],
 [0, b, a, 0],
 [0, 0, 0, c]]


a = cos(theta)
b = -i·sin(theta)
c = exp(-i·phi)
Note the difference in sign conventions between FSimGate and the
ISWAP and CZPowGate:
FSimGate(θ, φ) = ISWAP**(-2θ/π) CZPowGate(exponent=-φ/π)
__init__(theta: float, phi: float) → None[source]
  • theta – Swap angle on the |01⟩ |10⟩ subspace, in radians. Determined by the strength and duration of the XX+YY interaction. Note: uses opposite sign convention to the iSWAP gate. Maximum strength (full iswap) is at pi/2.

  • phi – Controlled phase angle, in radians. Determines how much the |11⟩ state is phased. Note: uses opposite sign convention to the CZPowGate. Maximum strength (full cz) is at pi/2.