Hello,
I am doing DMRG with fixed maximum bond dimension (which I would like to report was not achieved by just specifying maxdim in the call of the dmrg function but I had to on top of the latter specify maxdim in the Sweeps object as well, otherwise the maxdim was not obeyed and the maximum bond dimension was going way over what I was trying to restrict it to) and then saving my MPS to give it as an ansatz for the next higher maximum bond dimension.
The problem I am facing is that I generate a new sites object for the Hamiltonian so in the DMRG the ansatz cannot contract with the MPO Hamiltonian.
I thought of storing the sites object of my ansatz to HDF5 along with the ansatz and then reading it in code when I am going into the next higher bond dimension calculation.
Something like:
Julia code
sites = siteinds("S=1/2", 2*N)
f = h5open(mps_file_path, "w")
write(f, "MPS", psi)
write(f, "sites", sites)
close(f)
f = h5open(mps_file_path, "r")
sites_read = read(f, "sites")
close(f)
However I have the following issue that the form of the sites after reading is different:
typeof(sites) = Vector{Index{Int64}} (alias for Array{Index{Int64}, 1})
typeof(sites_read) = Dict{String, Any}
and elements in sites_read look like
“index_7” => Dict{String, Any}(“dim”=>2, “id”=>0x3ea41398b1111aac, “plev”=>0, “tags”=>Dict{String, Any}(“tags”=>“S=1/2,Site,n=7”), “dir”=>0)
Is there a way to do this cleanly?
Thanks in advance!