Hi All!

I am working on a research problem and wanted to use sympy's quantum module
to do the calculations, because sympy has abstract Ket objects on which one
can do many operations without assigning them actual values. I come up with
a difficulty

Say I have two Hilbert spaces U and V and on each space I have two vectors

from sympy import *
from sympy.physics.quantum import *

u1=Ket('u1')
u2=Ket('u2')
v1=Ket('v1')
v2=Ket('v2')

projU = u1*u1.dual # a projection operator on u1
print qapply(2*projU*u2) # qapply works as expected
projV = v1*v1.dual # an operator on V
projUV = TensorProduct(projU, projV) # operator on UV
vecUV = TensorProduct(u2,v2) # vector in UV
print qapply(tensor_product_simp(projUV*vecUV)) # works as expected again
print qapply(tensor_product_simp(2*projUV*vecUV)) # the number stops the
machinery

outputs:
2*<u1|u2>*|u1>
<u1|u2>*<v1|v2>*|u1>x|v1>
2*(|u1><u1|*|u2>)x(|v1><v1|*|v2>)

I'll be glad if you can tell me how I can qapply on expressions in the form
x*projUV*vecUV.

Have a good day!
ugur

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to