unitary: unitary

Description Usage Arguments Value Examples

View source: R/unitary.R

Description

Determines whether an operation (matrix) is unitary by comparing its inverse to its adjoint

Usage

1
unitary(m,epsilon=1e-13)

Arguments

m

gate operation (gate) that is to be checked

epsilon

Amount of error to tolerate. Accounts for numerical precision on practical computing systems

Value

boolean indicating whether matrix is unitary or not

Examples

1
2
 unitary(mm(0,1,1,0))
 unitary(mm(0,1,1,0),1e-15)

QuantumOps documentation built on Feb. 3, 2020, 5:07 p.m.