powered by
Determines whether an operation (matrix) is unitary by comparing its inverse to its adjoint
unitary(m,epsilon=1e-13)
gate operation (gate) that is to be checked
Amount of error to tolerate. Accounts for numerical precision on practical computing systems
boolean indicating whether matrix is unitary or not
# NOT RUN { unitary(mm(0,1,1,0)) unitary(mm(0,1,1,0),1e-15) # }
Run the code above in your browser using DataLab