computing correlation function and expectation value

How do I use this algorithm? What does that parameter do?
Post Reply
amankumar
Posts: 30
Joined: 17 Apr 2020, 11:14

computing correlation function and expectation value

Post by amankumar »

I am computing two quantities which I expect should give me the same answer but they are not in the fermi Hubbard model.

Code: Select all

cc_ij = psi.correlation_function("Cdu", "Cu")+psi.correlation_function("Cdd", "Cd")


print(cc_ij[1][2])
print(psi.expectation_value_term([('Cdu', 1), ('Cu', 2)])+psi.expectation_value_term([('Cdd', 1), ('Cd', 2)]))
I expect that correlation function and expectation value should give the same answer. Is there any issue of projection being taken care in any one of them. Please let me know.
Post Reply