XY

pyquil.gates.XY(angle, q1, q2)[source]

Produces a parameterized ISWAP gate:

XY(phi) = [[1,               0,               0, 0],
           [0,      cos(phi/2), 1j * sin(phi/2), 0],
           [0, 1j * sin(phi/2),      cos(phi/2), 0],
           [0,               0,               0, 1]
Parameters
  • angle (Union[Expression, MemoryReference, int64, int, float, complex]) – The angle of the rotation to apply to the population 1 subspace.

  • q1 (Union[Qubit, QubitPlaceholder, FormalArgument, int]) – Qubit 1.

  • q2 (Union[Qubit, QubitPlaceholder, FormalArgument, int]) – Qubit 2.

Return type

Gate

Returns

A Gate object.