Thanks a lot.
With all the hints given, I am able to do all things that I initially
intended to do.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more o
> Hi
>
> I was going through a book(on quantum computation) , which uses
> tensor
> products. I wanted to experiment with these tensor products. Is there
> any function like tensor_product(), which will take 2 or more vectors
> as input and return their tensor product?
>
> I tried to searc
This would surely be easy to implement for vectors: if v and w have
respective entries v[i] for i in range(m), and w[j] for j in range(n)
then v.tensor_product(w) would have m*n entries v[i]*w[j] index by k
in range(m*n) where k=n*i+j. The only issue is whether i moves faster
than j instead (k
You can do so with matrices (so think of vectors as 1xn or nx1
matrices...):
sage: M = matrix(ZZ, [[1,0],[0,1]])
sage: N = matrix(ZZ, [[1,2],[3,4]])
sage: M.tensor_product(N)
[1 2|0 0]
[3 4|0 0]
[---+---]
[0 0|1 2]
[0 0|3 4]
On Apr 23, 11:14 am, vivek <[EMAIL PROTECTED]> wrote:
> Hi
>
> I was