Open ThomasYangth opened 5 months ago
Are these with complex numbers? Tensor contraction on complex numbers have some known bugs
Are these with complex numbers? Tensor contraction on complex numbers have some known bugs
Yes, they are with complex numbers. I managed to overcome the problem by doing the contractions pair by pair.
I am using einsum on four tensors, in a line like
einsum<Index<1,2,3>,Index<6,1,4,5>,Index<7,4,2>,Index<8,5,3>>(A, B, C, D)
the shapes of A,B,C,D are, respectively: {3, 4, 4}, {3, 3, 2, 2}, {4, 2, 4}, {4, 2, 4}. This lines raises an error upon compilation, the error message is:As I see it,
einsum
first contracts A, B, and D. Yet there seems to be a mismatch in the ordering of indices and tensor dimensions after this contraction. The indices are ordered as <6,4,2,8>, which seems to use the order {B,A,D}; however, the resulting tensor dimension is {4,3,2,4}, which is ordered like {A,B,D}, and should actually correspond to indices <2,6,4,8>.Is this an issue with the implementation of einsum, or a misuse of the function?