ccnotgate: The CCNOT gate

View source: R/cnotgate.R

ccnotgateR Documentation

The CCNOT gate

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

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


qsimulatR documentation built on Oct. 16, 2023, 5:06 p.m.