Learn R Programming

qsimulatR (version 1.1.1)

plot,qstate,missing-method: plot-qstate

Description

Plots a circuit corresponding to a qstate object

Usage

# S4 method for qstate,missing
plot(x, y, ...)

Value

nothing is returned, but a plot created

Arguments

x

qstate object

y

not used here

...

additional parameters to be passed on

Examples

Run this code
x <- qstate(2)
y <- H(1) * x
z <- CNOT(c(1,2)) * y
plot(z)

Run the code above in your browser using DataLab