Can anyone advise on how to use the SymPy TensorProduct function without having to explicitly indicate the full sequence of objects to take the product of. Below (for the simple case N=3) you can see one of my attempts. But the tensor products are still not coinciding, hence I am still having to write out the full sequence to get the correct answer.
import scipy from numpy import* import math from sympy import I, Matrix, symbols from sympy.physics.quantum import TensorProduct N = 3 x = array([1/(math.sqrt(2)),1/(math.sqrt(2))]) V = for i in range(1,N+1): V.append(x) V = array(V) TP1 = TensorProduct(V,V,V) TP2 = TensorProduct(V[:]) print TP1 print TP2
Thanks for any assistance.