MPO for number operators and the calculation of correlation function in VUMPS

Hi Matt,

I have been trying to define the MPO for electron number operators following the definition of the Hamiltonian MPO:

function ITensorInfiniteMPS.unit_cell_terms(::Model"eNumber")
  opsum = OpSum()
  opsum += "Ntot", 1
  return opsum
end													

NumberOp = InfiniteSum{MPO}(Model("eNumber"), s)

However, I got the error “LoadError: MethodError: no method matching translatecell(::ITensorInfiniteMPS.var”#_shift_cell#149"{Int64}, ::Scaled{ComplexF64, Prod{Op}}, ::Int64)".

Another related question is how do we calculate the electron correlation functions in VUMPS? Is there a documentation or example that I could refer to?

Thanks again for your time,
-Meng

Hi Meng-Zeng,

I also would like to calculate correlation functions by VUMPS. Any insights on that? Or do you find any references?

Best,
Feng

This example includes computing a correlation matrix by slicing an infinite MPS to a finite MPS and computing the correlation matrix of that slice with ITensors.jl: https://github.com/ITensor/ITensorInfiniteMPS.jl/blob/main/examples/vumps/vumps_hubbard_extended.jl

@Meng-Zeng could you show a complete runnable example? For example, you don’t show what s is.