VUMPS, How to use saved MPS file as an initial MPS

I want to read an MPS from a saved file with less convergence and use it as the initial MPS.
How can i apply it?

    s = infsiteinds(SiteType, N_site; conserve_qns, initstate)
    ψ = InfMPS(s, initstate)
    model = Model("Hamiltonian_test")
    H = InfiniteSum{MPO}(model, s;t)
    vumps_kwargs = (tol=vumps_tol, maxiter=max_vumps_iters, solver_tol)
    subspace_expansion_kwargs = (cutoff=cutoff, maxdim=maxdim)

    ψ = vumps_subspace_expansion(H, ψ; outer_iters, subspace_expansion_kwargs, vumps_kwargs)

From another answer of mine, here is a code snippet to save/load infinite MPSs

using HDF5
using ITensorInfiniteMPS
using ITensorMPS

# do stuff to get a state
psi = ...
h5open("my_wavefunction.h5","w") do fo
  write(fo,"psi",psi)
  # example metadata, needs vector for hdf5 conversion
  write(fo, "model_params", [model_params]) 
end

#######

psi, model_params = h5open("my_wavefunction.h5","r") do fi
  read(fi,"psi",InfiniteCanonicalMPS), read(fi,"model_params")[1]
end
s = siteinds(psi) 

model = #...
# load H using matching indices from old calculation
H = InfiniteSum{localham_type}(model, s; model_params...)
1 Like

How can I increase only the convergence of the VUMPS loop without increasing the bond dimension of the previously saved MPS?

You can either pass outer_iters=0 and keep the same maxdim as the input, or you can directly call the vumps routine with tdvp(H, ψ; time_step=-Inf, vumps_kwargs...)

Thanks.
Is it possible to set the initial bond dimension of the MPS as a random state?

We don’t quite have that functionality built in. You can always build it yourself, or start from a different Hamiltonian as a proxy.
Matt has some suggestions here as well: Difficulty with simulating a specific model with VUMPS (that works perfectly fine with regular DMRG) - #5 by mtfishman