# Issue in the result of two-site MPO operator with density operator.

I am facing an issue regarding the implementation of two site MPO operators with a density matrix.

Basically, I have evolved a density matrix and want to calculate the spin current at each time-steps.

   \rho(t) = \exp(-iHt/h) \rho(0) \exp(iHt/h)


For this, I have used this implementation https://github.com/ITensor/ITensors.jl/blob/main/examples/gate_evolution/mpo_gate_evolution.jl

Now, I want to calculate the spin current < Ii (t)> = Tr{\rho(t) Ji}
where J i = Sx ^i Sy^{i+1} - Sy^i S_x^{i+1}

My implementation in ITensor Julia

p = AutoMPO()

p+= 1,"Sx",50,"Sy",51
p+= -1,"Sy",50,"Sx",51

Operator = MPO(p,s)

I50 = inner(Operator,rhot)

But, I am getting zero as the output for I_50 at every time step. I would appreciate it if you could look into the issue.

commented by (62.7k points)
Thanks for the question. It's hard to be sure exactly of the issue, but here is a first thing to look into more: in the code you said yours is based on, the conservation of total Sz as a good quantum number is turned on (conserve_qns=true). For systems with this property, it's then usually best to work with the "Sz", "S+", and "S-" operators only, not with "Sx" or "Sy". This is because "S+" and "S-" change the total Sz by a definite amount, whereas "Sx" and "Sy" do not.

Can you please retry your calculation using only "Sz", "S+", and "S-" to see if you now get the expected result?

Finally, please note that some properties can actually be different depending on whether quantum number conservation is turned on or not. For example, if it's not turned on, then <S+> on a single site can acquire a non-zero value, whereas it must be exactly zero for an Sz-conserving state.