Skip to content

Commit

Permalink
add shortcut for normalize! with mixed canonization
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Nov 8, 2024
1 parent fc9c48a commit 84f422e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ function LinearAlgebra.normalize!(::NonCanonical, ψ::AbstractMPO; at=Site(nsite
return ψ
end

LinearAlgebra.normalize!::AbstractMPO, site::Site) = normalize!(mixed_canonize!(ψ, site); at=site)

function LinearAlgebra.normalize!(config::MixedCanonical, ψ::AbstractMPO; at=config.orthog_center)
mixed_canonize!(config, ψ, orthog_center)
normalize!(tensors(ψ; at), 2)
Expand Down

0 comments on commit 84f422e

Please sign in to comment.