Learn R Programming

qsimulatR (version 1.1.1)

Ri: The Ri gate

Description

The Ri gate

Usage

Ri(bit, i, sign = +1)

Value

An S4 class 'sqgate' object is returned

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.

Examples

Run this code
x <- X(1) * qstate(nbits=2)
z <- Ri(1, i=2) * x
z

Run the code above in your browser using DataLab