Skip to content

[BUG] Misleading presence of normalize keyword in orthogonalize! #140

@VinceNeede

Description

@VinceNeede

Description of bug

Function orthogonalize! still accepts normalize keyword even though the normalization is not performed and no warning is printed. I saw the TODO, but while the maxdim is still used so the truncation is still performed, normalize is not used anymore.

Minimal code demonstrating the bug or unexpected behavior

Minimal runnable code

julia> using ITensors, ITensorMPS

julia> s = siteinds("S=1/2",2)
2-element Vector{Index{Int64}}:
 (dim=2|id=429|"S=1/2,Site,n=1")
 (dim=2|id=23|"S=1/2,Site,n=2")

julia> ψ = MPS(s, ["0", "1"]) + MPS(s, ["1", "0"]);

julia> orthogonalize!(ψ, 1; normalize=true)
MPS
[1] ((dim=2|id=429|"S=1/2,Site,n=1"), (dim=2|id=332|"Link,l=1"))
[2] ((dim=2|id=23|"S=1/2,Site,n=2"), (dim=2|id=332|"Link,l=1"))


julia> norm(ψ)  1.
false

Expected output or behavior

Either obtaining the state normalized but with a depwarn or an unexpected keyword error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions