> But, unforunately, when I tried "proj=TensorProduct(1,qb2*qb2.dual)" I got > this error: > AttributeError: 'int' object has no attribute 'is_commutative' > > I think 1 is an integer an does not behaved as an identity operator. Are > there any identity operators in Sympy? > vug
This is a bug in the quantum module. It needs to have a SymPy Integer, not a Python int. The quantum function should do this conversion automatically, but it seems that this one doesn't. Try using TensorProduct(Integer(1),qb2*qb2.dual) as a workaround. Aaron Meurer -- 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.
