I am trying to do some operations to a 6 leg tensor. I would like to combine two of the legs together and to do so I use combiner. However, for the dimensions of my tensor this operation is the bottleneck of my code; my code could work without combining the indices but I think it keeps everything cleaner, is there a better way to combine two tensors? (Simple code below so you can see my problem):
using ITensors
i1 = Index(30)
i2 = Index(30)
i3 = Index(30)
i4 = Index(30)
i5 = Index(30)
i6 = Index(30)
T = randomITensor(i1,i2,i3,i4,i5,i6)
c = combiner(i1,i2)
@time T*c
which is consistent with the amount of time it takes to permute that tensor (internally contracting with a combiner performs a permutation and then a reshape).
I am using Julia 1.9.2 and the ITensor version I have installed is ITensors v0.3.51.
I have seen that there has been performance issues with certain versions of Julia. Should I upload Julia to the newest version or go back to Julia 1.8?
Your improvements has decreased significaly the time of execution. I still do not get your speed but that is probably because of my laptop or my Julia version. Thank you very much,
Aleix