powered by
The Ri gate
Ri(bit, i, sign = +1)
An S4 class 'sqgate' object is returned
integer. The bit to which to apply the gate
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.
x <- X(1) * qstate(nbits=2) z <- Ri(1, i=2) * x z
Run the code above in your browser using DataLab