Finding sum of expectation values
Posted: 22 May 2025, 16:37
Hello, I am trying to evaluate these quantities here: \(N_a=<\sum_{i}b_{i}^{\dagger}b_{i+1}> ; N_d= <\sum_{i}(b_{i}^{\dagger})^{2}(b_{i+1})^{2}>\)
I have obtained the operators \(b_{i}^{\dagger}; b_{i+1}\) using and
And to find \(N_a\) I wrote
But I do not know how to evaluate \(N_d\), do you have any ideas? Thanks a lot!
I have obtained the operators \(b_{i}^{\dagger}; b_{i+1}\) using
Python: Select all
ops = ['Bd'] * model_params['L']
Python: Select all
opss=['B']*model_params['L']
And to find \(N_a\) I wrote
Python: Select all
def Na(psi):
K = 0.0
L = psi.L
for i in range(L - 1):
corr = psi.correlation_function("Bd", "B",
sites1=[i],
sites2=[i + 1])[0, 0]
K += corr
return K.real
K = Na(psi)