SWAP
Overloads
| Name | Description |
|---|---|
SWAP(const List<integer> sites) -> OperatorNamed | Returns a spin-1/2 OperatorNamed for the SWAP gate, taking a vector of site indices. |
SWAP(integer site0, integer site1) -> OperatorNamed | Returns a spin-1/2 OperatorNamed for the SWAP gate, taking two individual site indices. |
SWAP(const List<integer> sites) -> OperatorNamed
Returns a spin-1/2 OperatorNamed for the SWAP gate, taking a vector of site indices.
Parameters
- sites: Vector of two site indices where the operator acts.
Example
var swap2 = SWAP([2, 3])
SWAP(integer site0, integer site1) -> OperatorNamed
Returns a spin-1/2 OperatorNamed for the SWAP gate, taking two individual site indices.
Parameters
- site0: The first site index.
- site1: The second site index.
Example
var swap1 = SWAP(0, 1)