ITensor / ITensor/ITensorMPS.jl
dmrg_x does not support write to disk
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 85
- Forks
- 27
- Avg merge
- 22m
- Merged PRs (30d)
- 1
Description
Here is a minimal code:
using ITensorMPS
let
N = 10
sites = siteinds("S=1/2",N)
os = OpSum()
for j=1:N-1
os += 0.5,"S+",j,"S-",j+1
os += 0.5,"S-",j,"S+",j+1
os += "Sz",j,"Sz",j+1
end
H = MPO(os,sites)
nsweeps = 3
maxdim = [10,20,40]
cutoff = [1E-10]
psi0 = MPS(sites,[isodd(i) ? "Up" : "Dn" for i=1:N])
energy,psi = dmrg_x(H,psi0;nsweeps,maxdim,cutoff,write_when_maxdim_exceeds=20,outputlevel=1)
end
And here is the output I got, at sweep 3 it should start writing to disk
After sweep 1: maxlinkdim=4 maxerr=1.04E-16 time=0.009
After sweep 2: maxlinkdim=16 maxerr=3.24E-11 time=0.162
ERROR: MethodError: Cannot `convert` an object of type Vector{ITensor} to an object of type SerializedElementArrays.SerializedElementArray{ITensor, 1}
The issue appears to be associated with DiskProjMPO(...) in abstractprojmpo\diskprojmpo.jl but it's unclear to me how to proceed from there.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the minimal Julia reproduction and confirm the failure at sweep 3 when write_when_maxdim_exceeds=20. Then inspect abstractprojmpo/diskprojmpo.jl, especially DiskProjMPO(...), and trace the Vector{ITensor} to SerializedElementArray conversion. Done means dmrg_x proceeds past sweep 3 and writes to disk without the MethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100