> > from sympy import * > from sympy.physics.quantum import * > from sympy.physics.quantum.qubit import * > > q0 = Qubit(S(0)) > q1 = Qubit(S(1)) > state = TensorProduct(q0,q1) # a 2-qubit state > id = q0*Dagger(q0)+q1*Dagger(q1) # identity > proj = TensorProduct(id, q1*Dagger(q1)) # a projection op. IxP on H1xH2 > print qapply(tensor_product_simp(proj*state)) # error > > To make it clear I wrote down the intended calculation > here:http://mathurl.com/3pe3v7cIt fails at qapply step.
I did some editing of the quantum modules and I now obtain (for the above): |0>x|1> If this is right, perhaps you or Brian can review this at https://github.com/sympy/sympy/pull/699 -- 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.
