My current test for a unitary matrix is shown in the code, I'd also like to know if U = e^(iH) [i is the complex number] is coded correctly. Thanks!
U = exp(i*H) Uinverse = inv(U) UConjTran = U' if UConjTran == Uinverse disp('U is unitary')else disp('U is NOT unitary')end
Best Answer