Thank you!
Yes, that was one error. Also, I am using c’s and c^{\dagger}'s instead of the earlier version. Using “A” and “F” was giving me some error.
I have a few more questions:
Also, I have another code now that looks like this for creating two states with occupation numbers on multiple sites:
sites = siteinds("Fermion", num_of_occupation_numbers);
and then
for i in 1:number_of_basis_states
for j in 1:i
#state0=Array{Char,1}(num_of_occupation_numbers);
num1=i
num2=j
for l in 1:num_of_occupation_numbers
if num1%2==0
state1[l]="0"
else
state1[l]="1"
end
num1=num1÷(2)
end
for l in 1:num_of_occupation_numbers
if num2%2==0
state2[l]="0"
else
state2[l]="1"
end
num2=num2÷(2)
end
psi1 = productMPS(sites,state1);
psi2 = productMPS(sites,state2);
psi2=Apply(op1_mpo,psi2);
#print(inner(psi1,psi2));
sigma_1_z_matrix[i,j]=(inner(psi1, psi2))*im;
sigma_1_z_matrix[j,i]=-(conj(inner(psi1, psi2)))*im;
#show("done")
end
end
I am now getting the eigenvalues and eigenvectors of sigma_1_z_matrix. Is there a way I can just define the operator corresponding to this matrix and get its eigenvalues and eigenvectors in the occupation number basis?
Similarly, once I get the eigenvectors, can I form linear combinations of states as shown here
Physics (SiteType) System Examples · ITensors.jl
of these multiple site states?
I want to compute inner products involving these linear combinations.
But I am unable to use inner(psi1+psi2, psi3+psi4) like this for instance.
Does inner allow linear combinations to be formed? How would you suggest I use linear combinations of the basis states that I form using the occupation numbers (which can be 0 or 1) and use “apply” and “inner” on these linear combinations?
Thanks a lot for your help again.