powered by
This class represents a generic SWAP gate
bits
Integer vector of length 2. The two bits to swap.
x <- H(1) * qstate(nbits=2) z <- SWAP(c(1,2)) * (H(1) * x)
Run the code above in your browser using DataLab