Hello,
this is my first post so forgive me all the mistakes. I am reaching out to you because since installing julia_1.8 the correlation matrix i defined, does not work.
First I define a Sx operator:
function ITensors.op(::OpName"Sy", ::SiteType"Electron", s1::Index)
S_y = (op("S+", s1) - op("S-", s1))/(2im);
return S_y
end
and then I want to calculate a correlation matrix
N = 6;
Ne=N;
sites = siteinds("Electron", 2*N, conserve_qns=true);
states = ["0" for n=1:2*N];
for n in 1:trunc(Int,Ne/2.0)
states[n] = "Up";
end
for n in trunc(Int,Ne/2.0)+1:Ne
states[n] = "Dn";
end
shuffle!(states);
psi0 = randomMPS(sites,states);
fincorr = correlation_matrix(psi0,"Sy","Sy");
But I get a following error: InexactError: Float64(0.0 - 0.5im)
which refers to the complex value of the S_y
operator.
Do you have any idea why this occurs? And is there a way to by-pass it? I am pretty sure my code worked before on older julia’s version.
Thanks in advance for any help,
Tymek