# PSWAP¶

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

Produces a parameterized SWAP gate:

PSWAP(phi) = [[1, 0,             0,             0],
[0, 0,             exp(1j * phi), 0],
[0, exp(1j * phi), 0,             0],
[0, 0,             0,             1]]

Parameters: angle (Union[Expression, MemoryReference, int64, int, float, complex]) – The angle of the phase to apply to the swapped states. This phase is applied to q1 when it is in the 1 state and to q2 when it is in the 0 state. q1 (Union[Qubit, QubitPlaceholder, int]) – Qubit 1. q2 (Union[Qubit, QubitPlaceholder, int]) – Qubit 2. Gate A Gate object.