# About the TDVP function

**URL:** <https://itensor.discourse.group/t/about-the-tdvp-function/752>\
**Category:** DMRG and Numerical Methods\
**Tags:** julia, excited\_states, entanglement, mps\
**Created:** [April 9, 2023, 1:04pm UTC](https://itensor.discourse.group/t/about-the-tdvp-function/752 "2023-04-09T13:04:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsegev](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@tsegev](https://itensor.discourse.group/u/tsegev)\
**Post date:** [April 9, 2023, 1:04pm UTC](https://itensor.discourse.group/t/about-the-tdvp-function/752/1 "2023-04-09T13:04:04Z")

</div>

Hey all,

The tdvp function is a function to propagate in time my MPS object. Does this method can applied for an imaginary time approach ?

```auto
site=siteinds("Qubit",n)
psi= randomITensor(site)
dt=0.1 
psi= tdvp(H,psi,-dt)

```

Or this method must be used only in real time ?

---

<div class="post-metadata">

**Author:** ![miles](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/miles/32/6_2.png) [@miles](https://itensor.discourse.group/u/miles)\
**Post date:** [April 9, 2023, 1:38pm UTC](https://itensor.discourse.group/t/about-the-tdvp-function/752/2 "2023-04-09T13:38:04Z")

</div>

Yes it works for imaginary time also

---

<div class="post-metadata">

**Author:** ![tsegev](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@tsegev](https://itensor.discourse.group/u/tsegev)\
**Post date:** [April 9, 2023, 2:24pm UTC](https://itensor.discourse.group/t/about-the-tdvp-function/752/3 "2023-04-09T14:24:43Z")

</div>

Hey, miles  
Thank you for your answer.

So, I want to ask a follow-up question about this function. Is it possible to create a thermal state using that method ? that mean, if dt is the same and I am just changing the number of the steps I am taking.

```auto
site=siteinds("Qubit",n)
psi= randomITensor(site)
dt=0.1 
num=t/dt
for j=1:num
  psi= tdvp(H,psi,-dt)
normalize!(psi)
end

```

I know from reading that this method is usually good for getting the ground state in the limit where n dt \rightarrow \infty, but I am asking if in ITensor this thing can go around, and get your thermal state for ndt =t

Thanks for the help
