# What does that mean by "warning : applyExp not converged in 10 steps"?

**URL:** <https://itensor.discourse.group/t/what-does-that-mean-by-warning-applyexp-not-converged-in-10-steps/284>\
**Category:** ITensor C++ Questions\
**Tags:** cpp\
**Created:** [July 26, 2022, 3:44am UTC](https://itensor.discourse.group/t/what-does-that-mean-by-warning-applyexp-not-converged-in-10-steps/284 "2022-07-26T03:44:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wang](https://avatars.discourse-cdn.com/v4/letter/w/edb3f5/32.png) [@Wang](https://itensor.discourse.group/u/Wang)\
**Post date:** [July 26, 2022, 3:44am UTC](https://itensor.discourse.group/t/what-does-that-mean-by-warning-applyexp-not-converged-in-10-steps/284/1 "2022-07-26T03:44:29Z")

</div>

Hello everyone!

I’m trying to use TDVP methods to do some tests.

But here comes many warnings in my output file that say “applyExp not converged in 10 steps”

What is the meaning of this warning?  
Does that mean the results are not reliable or not accurate enough?  
So, do I have to reduce the accuracy demand?

Here is my code.

```cpp
auto sweeps = Sweeps(2);
sweeps.maxdim() = 2000,4000;
sweeps.cutoff() = 1E-12,1E-12;
sweeps.niter() = 10,10;
for(int n = 1; n <= nsw; ++n)
        {
        if(n < 3)
            {
            std::vector<Real> epsilonK = {1E-12, 1E-12};
            addBasis(psi1,H,epsilonK,{"Cutoff",1E-12,
                                      "Method","DensityMatrix",
                                      "KrylovOrd",3,
                                      "DoNormalize",true,
                                      "Quiet",true});
            }
        auto energy = tdvp(psi1,H,Cplx_i*(-t),sweeps,{"Truncate",true,
                                        "DoNormalize",true,
                                        "Quiet",true,
                                        "NumCenter",1});
        }

```

Best,  
Wang

---

<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:** [July 26, 2022, 8:45am UTC](https://itensor.discourse.group/t/what-does-that-mean-by-warning-applyexp-not-converged-in-10-steps/284/2 "2022-07-26T08:45:50Z")

</div>

Hi Wang,  
What time step “t” are you using by the way? I think the reason for the error is that you are telling the Krylov integrator inside the TDVP code it is only allowed to do 10 steps by setting niter() = 10. Then it is hitting this limit when trying to reach the time step at the desired accuracy. So I would just recommend either lowering the time step or raising niter().

---

<div class="post-metadata">

**Author:** ![Wang](https://avatars.discourse-cdn.com/v4/letter/w/edb3f5/32.png) [@Wang](https://itensor.discourse.group/u/Wang)\
**Post date:** [July 28, 2022, 12:58am UTC](https://itensor.discourse.group/t/what-does-that-mean-by-warning-applyexp-not-converged-in-10-steps/284/3 "2022-07-28T00:58:29Z")

</div>

Hi Miles,  
Thanks for your reply.  
In my codes, t-step is equal to 0.1 and t-end is equal to 2 or 3.

---

<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:** [July 28, 2022, 1:15am UTC](https://itensor.discourse.group/t/what-does-that-mean-by-warning-applyexp-not-converged-in-10-steps/284/4 "2022-07-28T01:15:29Z")

</div>

I see, thanks. So a t step (the variable `t` in the above code, I assume) is quite reasonable so it’s a little surprising that 10 Krylov steps wouldn’t be enough. But please just try setting niter() = 20 to see if that fixes the issue. If it works but the code slows down a lot, we could then discuss other things to try.
