Hi,
I have a couple of questions which relate to indexing in ITensor.
Firstly, I have an MPS in a spin-1/2 1D chain denoted by T. I can get the local 2-D tensors (at each) by doing setting the site-index to 1 or 2. I am pretty sure about this but can you confirm that this would give me the components in the computational (Sz) basis ? Now, I would like to change modify the tensor so that I can get this in the (Sx) basis. This basically amounts to adding and subtracting the local 2-D tensors. However, I am not sure how to put them back in the original tensor without messing up the indexing. Here is some minimal code:
using ITensors
N=20
sites = siteinds("S=1/2",N)
bond_dim=24
T = randomMPS(sites,bond_dim);
for j=1:length(T)
T0=T[j]*setelt(sites[j]=>1)
T1=T[j]*setelt(sites[j]=>2)
Tx0=(T0+T1)/sqrt(2)
Tx1=(T0-T1)/sqrt(2)
#I would like to assign Tx0 to something like T[j]*setelt(sites[j]=>1) but how?
end
Finally, I have been recently doing a lot of calculations involving contraction of ITensor objects and I was wondering if there is some in-built function that returns the different index of any ITensor object ( somewhat like how "linkind" works for MPS objects ).
In general, is the handling of ITensor indexing in Julia well documented somewhere?