SWAP: SWAP

Description Usage Arguments Value Examples

View source: R/SWAP.R

Description

If no argument is supplied, returns the matrix of SWAP gate. If ket given as input, applies an SWAP gate to the input ket and returns the resulting ket

Usage

1

Arguments

...

No argument, or ket (column vector) that is input to the gate

Value

Matrix of the SWAP gate or ket after an SWAP gate is applied

Examples

1
2
 SWAP(ket(0,1,0,0))
 SWAP()

QuantumOps documentation built on Feb. 3, 2020, 5:07 p.m.

Related to SWAP in QuantumOps...