Maximal bond dimension in basis expansion

Hi,

I propagate large systems with the TDVP1-GSE algorithm (https://journals.aps.org/prb/abstract/10.1103/PhysRevB.102.094315). The expand function is taken from ITensorMPS.jl/src/solvers/expand.jl at main · ITensor/ITensorMPS.jl · GitHub.

I noticed that the bond dimension grew beyond my computer’s RAM capabilities. The error was found in the “expand” function.
The way I use this function is the following-

ψₑ = expand(ψ₀, H; alg="global_krylov", krylovdim=my_krylovdim, cutoff=my_cutoff, apply_kwargs=(; maxdim=apply_maxdim))

The maximal bond dimension of the expanded function is, therefore, my_krylovdim*apply_maxdim. So, if I want to keep the maximal bond dimension at my_maxdim, I should set-

\mathrm{apply\_maxdim}=\frac{\mathrm{my\_maxdim}}{\mathrm{my\_krylovdim}}

Is there a way to limit the bond dimension in a cleaner way that aligns with the GSE protocol?

EDIT: I suppose the considerations above were correct only when ψ₀ is a product state. Projecting on the final bond dimension is less trivial given an initial state and specific input parameters to “expand” function.

I’m not sure if there is a “cleaner way” per se. The global subspace expansion necessarily grows the bond dimension by some amount. So then if you want to reduce the bond dimension afterward, you could perform a sweep over the MPS to truncate each bond back below the desired maximum dimension, say by calling the truncate function in ITensorMPS.

A more integrated way to control the bond dimension would be by adding a maximum bond dimension (or perhaps maximum additional bond dimension) to the expand function itself. I’d have to review the details of the algorithm, but for example the cutoff parameter gets used internally in a call to eigen that is diagonalizing a density matrix. Perhaps there the truncation could also be controlled by a maximum number of eigenvalues kept.

Truncating the number of eigenstate in the SVD part of GSE sounds like a nice approach, in my opinion. I can take a look inside the algorithm and report back on the result.

Ha, I just saw the following comments in the docs:

# Possible improvements:
# - Allow a maxdim argument to be passed to `expand`.
# - Current behavior is letting bond dimension get too big when used in imaginary time evolution.
# ...

So… It’s been encountered before, cool.

1 Like

Great, yes please have a look. Perhaps it is clear how to add this to the code.