[Numpy-discussion] Can you help me find a dumb matrix multiply mistake

Rick Muller rpmuller at gmail.com
Fri Feb 26 16:01:35 EST 2010


I'm making a mistake here, one that I suspect is a dumb error. I'm not as
familiar with the math of complex hermetian matrices as I am with real
symmetry matrices.

I want to diagonalize the matrix:

Y = matrix([[0,-1j],[1j,0]])     # this is the Y Pauli spin matrix

Ey,Uy = eigh(Y)

When I try to do:

print Uy.H * diag(Ey) * Uy

rather than getting Y back, I get:

[[ 0.+0.j -1.+0.j]
 [-1.+0.j  0.+0.j]]

I also tried

dot(Uy.H,dot(diag(Ey),Uy))

to make sure this isn't a matrix/array problem with the same result. Can
someone spot what I'm doing wrong?



-- 
Rick Muller
rpmuller at gmail.com
505-750-7557
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100226/c5007989/attachment.html>


More information about the NumPy-Discussion mailing list