Ri | R Documentation |
The Ri gate
Ri(bit, i, sign = +1)
bit |
integer. The bit to which to apply the gate |
i |
integer |
sign |
integer |
Implements the gate ( 1 0 ) ( 0 exp(+-2pi1i/2^i) )
If 'sign < 0', the inverse of the exponential is used. This gate is up to global phase identical with the 'Rz' gate with specific values of the angle.
An S4 class 'sqgate' object is returned
x <- X(1) * qstate(nbits=2)
z <- Ri(1, i=2) * x
z
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.