Ri: The Ri gate

Description Usage Arguments Details Value Examples

Description

The Ri gate

Usage

1
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

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

qsimulatR documentation built on Jan. 13, 2021, 3:13 p.m.