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
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)
But I do not know how to evaluate \(N_d\), do you have any ideas? Thanks a lot!
Just plug in "Bd Bd" and "B B", i.e. write psi.correlation_function("Bd Bd", "B B", sites1=[i], sites2=[i + 1])[0, 0]
In general, the get_op function used from correlation_function and friends to translate the name into actual tensors accepts space-separated combinations of local operator names to represent (matrix) products of the corresponding local operators.