Skip to content

Incorrect reverse bool value after the InfiniteMPS copy function #87

@tingyu-gao

Description

@tingyu-gao

Description of bug

copy produces a wrong reverse value for an infinite MPS.

Minimal code demonstrating the bug or unexpected behavior

using ITensorInfiniteMPS

initstate(n) = isodd(n) ? "" : ""
s = infsiteinds("S=1/2", 2; initstate)
ψ = InfMPS(s, initstate)

Cᴿ = reverse.C)
println("Is reversed? ", Cᴿ.reverse)
println("Is reversed after copy? ", copy(Cᴿ).reverse)

Expected output or behavior

Two true output lines.

Actual output or behavior

Is reversed? true
Is reversed after copy? false

Version information

  • Output from versioninfo():
julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD EPYC 9634 84-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, znver3)
Environment:
  JULIA_NUM_THREADS = 4
  • Output from using Pkg; Pkg.status("ITensors"):
julia> using Pkg; Pkg.status("ITensors")
      Status `~/.julia/environments/v1.7/Project.toml`
  [9136182c] ITensors v0.3.68
      Status `~/.julia/environments/v1.7/Project.toml`
  [1dc1fb26] ITensorInfiniteMPS v0.1.0 `https://github.com/mtfishman/ITensorInfiniteMPS.jl.git#main`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions