unitary {QuantumOps}R Documentation

unitary

Description

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

Usage

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

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

[Package QuantumOps version 3.0.1 Index]