# MPO Evolution in ITensor example

**URL:** <https://itensor.discourse.group/t/mpo-evolution-in-itensor-example/1411>\
**Category:** ITensor Julia Questions\
**Created:** [January 11, 2024, 10:52am UTC](https://itensor.discourse.group/t/mpo-evolution-in-itensor-example/1411 "2024-01-11T10:52:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sourav](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@sourav](https://itensor.discourse.group/u/sourav)\
**Post date:** [January 11, 2024, 10:52am UTC](https://itensor.discourse.group/t/mpo-evolution-in-itensor-example/1411/1 "2024-01-11T10:52:29Z")

</div>

Dear ITensors team,

I was looking at some examples of MPO evolutions given in ITensors github page’s example i.e., [ITensors.jl/examples at main · ITensor/ITensors.jl · GitHub](https://github.com/ITensor/ITensors.jl/tree/main/examples)

For the example of purification ([ITensors.jl/examples/finite\_temperature/purification.jl at main · ITensor/ITensors.jl · GitHub](https://github.com/ITensor/ITensors.jl/blob/main/examples/finite_temperature/purification.jl)), MPO evolution is used and the apply function is used as

```auto
apply(gates, rho; cutoff).

```

Whereas in another example of MPO gate evolution ([ITensors.jl/examples/gate\_evolution/mpo\_gate\_evolution.jl at main · ITensor/ITensors.jl · GitHub](https://github.com/ITensor/ITensors.jl/blob/main/examples/gate_evolution/mpo_gate_evolution.jl)) , I see the gate evolution is done via

```auto
apply(gates, rho; cutoff, apply_dag=true)

```

Ok, so the main question is can you clarify why apply\_dag=true is missing in the first example? I am not sure which procedure is correct (may be both are but then can you please point out when to use apply\_dag=True for MPO evolution and when not)?

Best,  
Sourav

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [January 11, 2024, 2:44pm UTC](https://itensor.discourse.group/t/mpo-evolution-in-itensor-example/1411/2 "2024-01-11T14:44:17Z")

</div>

`apply` when `apply_dag=false` (the default) applies the gate to just one side of the MPO (the primed side), while `apply_dag=true` applies the gate and it’s conjugate on either side of the MPO.

---

<div class="post-metadata">

**Author:** ![sourav](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@sourav](https://itensor.discourse.group/u/sourav)\
**Post date:** [January 11, 2024, 3:01pm UTC](https://itensor.discourse.group/t/mpo-evolution-in-itensor-example/1411/3 "2024-01-11T15:01:56Z")

</div>

Thanks a lot !
