# Questions about 'max dim' and 'cutoff' when ensuring convergence in TDVP

**URL:** <https://itensor.discourse.group/t/questions-about-max-dim-and-cutoff-when-ensuring-convergence-in-tdvp/2041>\
**Category:** DMRG and Numerical Methods\
**Created:** [October 5, 2024, 12:56pm UTC](https://itensor.discourse.group/t/questions-about-max-dim-and-cutoff-when-ensuring-convergence-in-tdvp/2041 "2024-10-05T12:56:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshperry3110](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@joshperry3110](https://itensor.discourse.group/u/joshperry3110)\
**Post date:** [October 5, 2024, 12:56pm UTC](https://itensor.discourse.group/t/questions-about-max-dim-and-cutoff-when-ensuring-convergence-in-tdvp/2041/1 "2024-10-05T12:56:15Z")

</div>

Hi,  
I wanted to ask a general question regarding the maxdim and cutoff parameters which are passed to the TDVP algorithm. How do these parameters interplay when performing TDVP? Does the algorithm try to satisfy the cutoff that you pass it without going over the max dims? For instance once the max dim is reached when performing TDVP does this imply that when continuing TDVP the cutoff that you have chosen is no longer being reached?  
I am trying to work out how I can best ensure numerical convergence of my results by varying maxdim and cutoff.  
Thanks for any comments and help

---

<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:** [October 6, 2024, 1:11am UTC](https://itensor.discourse.group/t/questions-about-max-dim-and-cutoff-when-ensuring-convergence-in-tdvp/2041/2 "2024-10-06T01:11:31Z")

</div>

The way `maxdim` and `cutoff` are used together can seem complicated at first. Here is a good way to think about it:

1. first the code uses `cutoff` to truncate the smallest singular values. It adds their squares (density matrix eigenvalues), normalized by the total of all of them, and when this sum exceeds the `cutoff`, it tries to truncate all of the ones summed up.
2. however, if this truncation would end up keeping more than `maxdim` value, it only keeps a `maxdim` number of them instead.

You can also think of `maxdim` as a kind of ironclad “guarantee” that the bond dimension will never exceed its value (unless we have a bug in our code, then please tell us). And then you can think of `cutoff` as working to try to both ensure accuracy (sometimes `maxdim` forces it to not reach its accuracy goal) and also to be “greedy” some cases where the bond dimension can actually be taken much lower, while still delivering the target accuracy.

There are a few different styles of using these together:

- small cutoff, large maxdim: accuracy at all costs, may become expensive
- large-to-medium cutoff, large maxdim: want an “accuracy dominated” calculation. need accuracy, and hoping that maxdim will not grow too much or too quickly for the given problem. (This is probably the most common one for time evolution.)
- large cutoff, small maxdim: prefer speed, just trying to get a rough estimate, maybe to initialize later passes of an algorithm or to estimate some properties of a system quickly
- small cutoff, small maxdim: want to “flatten” the bond dimension to be very close to `maxdim`

---

<div class="post-metadata">

**Author:** ![joshperry3110](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@joshperry3110](https://itensor.discourse.group/u/joshperry3110)\
**Post date:** [October 6, 2024, 2:45pm UTC](https://itensor.discourse.group/t/questions-about-max-dim-and-cutoff-when-ensuring-convergence-in-tdvp/2041/3 "2024-10-06T14:45:29Z")

</div>

This is really helpful, thank you.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/itensor/original/1X/d3072b13e047cd06df7f3981547c0917d940dfa4.png) [@system](https://itensor.discourse.group/u/system)\
**Post date:** [October 16, 2024, 2:45pm UTC](https://itensor.discourse.group/t/questions-about-max-dim-and-cutoff-when-ensuring-convergence-in-tdvp/2041/4 "2024-10-16T14:45:58Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
