R {QuantumOps}R Documentation

R

Description

If no second argument is supplied, returns the matrix of an R phase gate of the specified radians. If ket given as second argument, applies the R gate to the input ket and returns the resulting ket. Is equivalent to the more recently added Rz function.

Usage

R(theta,...)

Arguments

theta

Radians to phase rotate the ket

...

No argument, or ket (column vector) that is input to the gate

Value

Matix of the R gate or ket after an R gate is applied

Examples

 R(pi,ket(1,0))
 R(pi)

[Package QuantumOps version 3.0.1 Index]