cnotgate | R Documentation |
This class represents a generic CNOT gate
bits
Integer vector of length 2. First bit is the control bit, second the target bit.
x <- qstate(nbits=2)
## A Bell state
z <- CNOT(c(1,2)) * (H(1) * x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.