ccnotgate: The CCNOT gate

Description Slots Examples

View source: R/cnotgate.R

Description

This class represents a generic CNOT gate

Slots

bits

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

Examples

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

qsimulatR documentation built on Jan. 13, 2021, 3:13 p.m.