Hello,

I want to time evolve an operator in the Heisenberg picture using MPO methods. Let us call the operator A. So I want to compute A(t) = U'AU (U' is the adjoint of U). Note that I am using the Julia version throughout.

I have an array containing Trotter gates for U' called `gates_adjoint`

. These can be applied to the MPO representation of A from the left (or rather, from "above") by using `apply(gates_adjoint, A)`

. This is basically the same as what is done in https://itensor.github.io/ITensors.jl/stable/tutorials/MPSTimeEvolution.html for an MPS.

However, my issue is in applying U on the right (or rather, on the "bottom" indices of the MPO A). My first approach was to try the following:

```
A = dag(apply(gates_adjoint, dag(apply(gates_adjoint, A; cutoff = 1E-8)); cutoff = 1E-8));
```

where I am basically trying to carrying out the sequence A --->(`apply`

) U'A --->(`dag`

) A'U --->(`apply`

) U'A'U --->(`dag`

) U'AU = A(t)

But, `dag`

doesn't appear to work the way I expected it to. For example, in the following code:

```
using ITensors
s = siteinds("S=1/2", 1);
A = op("S+", s[1]);
B = op("S+", s[1]);
@show C = apply(A,B)
@show D = apply(A,dag(B))
```

C comes out correctly as a zero ITensor but D also comes out as a zero ITensor even though I want it to be @@S_+S_-@@. I think I may not be fully understanding how `dag`

works.

My question now is how do I correctly evolve my MPO A? Is there a nice direct way to apply the gates from both sides and/or if I have to use `dag`

, how do I use it correctly? Am I perhaps making a mistake with how I deal with indices (for example, do I also have prime/unprime some indices at some point)?

This is my first time working with ITensor and any help would be much appreciated!

(Edit: Formatting)