I am trying to construct the following state of fermions:
which has a correlation matrix
using ITensors
s = siteinds("Fermion", 4);
Ļ0 = productMPS(s, "Emp");
ampo24 = AutoMPO();
ampo24 += (1/sqrt(2), "Id", 1);
ampo24 += (1/sqrt(2), "cā ", 2, "cā ", 4);
ampo31 = AutoMPO();
ampo31 += (1/sqrt(2), "Id", 1);
ampo31 += (1/sqrt(2), "cā ", 3, "cā ", 1);
o24 = MPO(ampo24, s);
o31 = MPO(ampo31, s);
Ļ = product(o31, product(o24, Ļ0));
correlation_matrix(Ļ, "cā ", "cā ")
This gives the correct result.
At the same time, I had expected (based on Mattās response in [julia] TEBD gates involving fermions - ITensor Support Q&A) that it would be possible to do something like
o24_naive = op("Id", s[2])*op("Id", s[4]) + op("cā ", s[2])*op("cā ", s[4]);
o31_naive = op("Id", s[1])*op("Id", s[3]) + op("cā ", s[3])*op("cā ", s[1]);
Ļ_naive = product(o31_naive, product(o24_naive, Ļ0));
correlation_matrix(Ļ_naive, "cā ", "cā ")
However, this returns
4Ć4 Matrix{Float64}:
0.0 0.0 -2.77556e-16 0.0
0.0 0.0 0.0 5.55112e-17
2.77556e-16 0.0 0.0 0.0
0.0 -5.55112e-17 0.0 0.0
Am I missing something crucial with this naive approach? eg, is it necessary to use enable_auto_fermion()
? Or is the best practice to always use OpSum/AutoMPO?