TensorOperations.jl
TensorOperations.jl copied to clipboard
Solving linear equations involving tensors
If you have a fixed tensor X and fix some indices, then contracting this tensor with another tensor along the given indices is a linear map on tensors (of each fixed size). It would be nice if this package provided a way to solve linear systems of this form. Technically, this should be no more difficult than inverting a matrix -- the request is just for a way to support solving the system within the tensor notation.
Do you have a good tensor notation convention for denoting this operation? I/You can of course easily write a function for that and to the necessary permutations and reshapes, but I read your request as having this supported within the @tensor
macro?
Yeah, that was my suggestion, but indeed a great notation does not come to mind. Perhaps a more achievable goal would be a nice notation for reshaping an array within the @tensor macro? E.g. a way if I have a tensor with 4 indices to "combine" the first and second indices, or the second and third, or the first and third and fourth, etc?