Ri {qsimulatR} | R Documentation |
The Ri gate
Description
The Ri gate
Usage
Ri(bit, i, sign = +1)
Arguments
bit |
integer. The bit to which to apply the gate |
i |
integer |
sign |
integer |
Details
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.
Value
An S4 class 'sqgate' object is returned
Examples
x <- X(1) * qstate(nbits=2)
z <- Ri(1, i=2) * x
z
[Package qsimulatR version 1.1.1 Index]