News for hackers. Stuff that matters.
Re:Matrices as Tensor Network Diagrams by mcabbott on Friday May 17, 2019 @01:58PM (#19941983)
A tensor product of two matrices is just this, with 4 loose ends:

    ---A---
    ---B---
A_ab B_cd = (A⊗B)_acbd. If a,c=1...N then you can think of (ac) as being an index with N^2 possible values, which is what the double line now means... if you like, you may compact it a bit:

    ===(A⊗B)===
Re:Matrices as Tensor Network Diagrams by JWKennington on Friday May 17, 2019 @02:46PM (#19942364)
But how am I supposed to know that AB is one mathematical object here instead of the 2 separate objects A, B? My point is that there should be a graphical way other than "put them arbitrarily close" to link them together

I prefer your second notation, with the tensor product happening in parenthesis, but it kind of defeats the point of the graphical nature of the notation if we need to explictly write the tensor product I think..

Re:Matrices as Tensor Network Diagrams by kmill on Friday May 17, 2019 @03:22PM (#19942635)
Speaking as someone who uses this tensor notation quite a lot: putting multiple objects into the same diagram is what a tensor product is, and a great thing about the notation is that it reveals that a tensor product of two matrices is not an essential object in itself.

If you wish, you can draw a circle around A and B to "factor out" that part of the diagram as a sub tensor product. Here might be a way to show that matrix multiplication is both "tensor product then contract" and "function composition": https://imgur.com/tcCycYj.png (though I didn't give this gray-circle notation much thought).

Think about this: how is it in a product abcd of plain old numbers am I supposed to see the mathematical object ad without putting them arbitrarily close together? (Well, in standard notation, you do put them close together and write (ad)bc or something.)

Re:Matrices as Tensor Network Diagrams by Certhas on Friday May 17, 2019 @07:24PM (#19944528)
The equations satisfied by tensor products are exactly those of drawing things next to each other. Look up Bob Coeckes Kindergarten Quantum Mechanics which was linked elsewhere here.

What you need is two parallel walls where lines can start and end. The rest is all fine.