noise | R Documentation |
A noise gate
noise(bit, p = 1, error = "any", type = "ERR", args = list())
bit |
integer or integer array. The bit to which to apply the gate. If an array is provided, the gate will be applied randomly to one of the bits only. |
p |
probability with which noise is applied |
error |
one of "X", "Y", "Z", "small" or "any". The model which the noise
follows. Can be one of the Pauli matrices (X,Y,Z), a random SU(2)-matrix
with a small deviation |
type |
a character vector representing the type of gate |
args |
a list of further arguments passed to specific error models. For
|
An S4 class 'sqgate' object is returned
x <- noise(1, error="X") * qstate(nbits=2)
x
y <- noise(2, p=0.5) * x
y
z <- noise(2, error="small", args=list(sigma=0.1)) * x
z
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.