calculate four-point correlation function
Posted: 26 Apr 2022, 12:25
Hello.
Recently, I have calculated the four-point correlation function \(\braket{C^\dagger_{\downarrow,i} C^\dagger_{\uparrow,i+1} C_{\downarrow,j+1} C_{\uparrow,j}}\) by using the expectation_value_term().
But it cost lots of time to get the result, is there any better way to calculate the four-point correlation function?
Recently, I have calculated the four-point correlation function \(\braket{C^\dagger_{\downarrow,i} C^\dagger_{\uparrow,i+1} C_{\downarrow,j+1} C_{\uparrow,j}}\) by using the expectation_value_term().
Code: Select all
def correlation(psi,a,b,c,d):
L = psi.L
f = np.zeros((L-1,L-1),dtype=complex)
for i in range(L-1):
for j in range(L-1):
f[i,j] = psi.expectation_value_term([(a,i),(b,i+1),
(c,j+1),(d,j)])
return f