Thanks for the answer. So now if I consider an impurity at N/2 (I wanted the impurity at origin so I wanted -N/2 to N/2, which is not applicable), I need to put the index for correlation functions of the type i= (N/2 - x)*scale, j= (N/2 - xp)*scale and so on. But when I do so I get the following error.
In the program itensor/itensor/itensor_interface.ih
Wrong number of IndexVals passed to real/cplx (expected 4, got 0)
If I put i=x*scale and j=xp*scale, it works fine. Can you please tell me why this happens?