Quil-T
API Reference
pyquil.gates.
SWAP
Produces a SWAP gate which swaps the state of two qubits:
SWAP = [[1, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]
q1 (Union[Qubit, QubitPlaceholder, FormalArgument, int]) – Qubit 1.
Union
Qubit
QubitPlaceholder
FormalArgument
int
q2 (Union[Qubit, QubitPlaceholder, FormalArgument, int]) – Qubit 2.
Gate
A Gate object.