Learn R Programming

QuantumOps (version 3.0.1)

Z: Z

Description

If no argument is supplied, returns the matrix of Z gate. If ket given as input, applies a Z gate to the input ket and returns the resulting ket

Usage

Z(...)

Arguments

...

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

Value

Matix of the Z gate or ket after a Z gate is applied

Examples

Run this code
# NOT RUN {
 Z(ket(1,0))
 Z()
# }

Run the code above in your browser using DataLab