Skip to content

[ITensors] [BUG] Inconsistent Behavior of mindim #1207

Closed
@ryanlevy

Description

@ryanlevy

Description of bug

When using mindim!, the link dimension behavior at the "edge" is different depending on the value of cutoff!.
If there is a cutoff, some tensors get set to the mindim while others are not, and if there isn't a cutoff (cutoff!(sweeps,0)) the link dimensions are symmetric. I'm not sure which output is preferred but I suspect its the latter?

Minimal code demonstrating the bug or unexpected behavior

Minimal runnable code

using ITensors

N = 32
sites = siteinds("S=1/2", N; conserve_qns=false)

ampo = AutoMPO()
for j in 1:(N - 1)
  ampo .+= 0.5, "S+", j, "S-", j + 1
  ampo .+= 0.5, "S-", j, "S+", j + 1
  ampo .+= "Sz", j, "Sz", j + 1
end
H = MPO(ampo, sites)

ψ₀ = randomMPS(sites)

sweeps = Sweeps(6)
maxdim!(sweeps, 4, 16, 64)
mindim!(sweeps, 1, 16,64,)
cutoff!(sweeps,1e-10)
noise!(sweeps, 0)
energy, ψ = @time dmrg(H, ψ₀, sweeps)
@show linkdims(ψ)

Expected output or behavior

Expected Output

If cutoff!(sweeps,0):

linkdims(ψ) = [2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 16, 8, 4, 2]

Actual output or behavior

Output of minimal runnable code

linkdims(ψ) = [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 16, 8, 4, 2]

Version information

  • Output from versioninfo():
julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 24 × Intel(R) Xeon(R) Gold 6128 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake-avx512)
  Threads: 1 on 24 virtual cores
  • Output from using Pkg; Pkg.status("ITensors"):
julia> using Pkg; Pkg.status("ITensors")
Status `~/.julia/environments/v1.8/Project.toml`
  [9136182c] ITensors v0.3.43

Metadata

Metadata

Assignees

No one assigned

    Labels

    ITensorsIssues or pull requests related to the `ITensors` package.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions