Ri: The Ri gate

RiR 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


qsimulatR documentation built on Oct. 16, 2023, 5:06 p.m.