cswapgate {qsimulatR}R Documentation

The CSWAP gate

Description

This class represents a generic SWAP gate, also called Fredkin gate

Slots

bits

Integer vector of length 2. First two bits are the control bits, third the target bit.

Examples

x <- qstate(nbits=3)
z <- CSWAP(c(1,2,3)) * (H(1) * x)


[Package qsimulatR version 1.1.1 Index]