require 'matrix'


i = Complex::I
matrix = Matrix[[i, 0, 0],
                [0, i, 0],
                [0, 0, i]]



conjt = matrix.conj.t           
print 'conjugate tranpose: '; puts conjt

if matrix.square?
  
  print 'Hermitian? '; puts matrix.hermitian?
  print '   normal? '; puts matrix.normal?
  print '  unitary? '; puts matrix.unitary?
else
  
  
  print 'Hermitian? false'
  print '   normal? false'
  print '  unitary? false'
end