Skip to content

Commit

Permalink
Wrap tree orthogonalize for ttns
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Nov 8, 2024
1 parent f5098e1 commit 629af71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/apply.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function ITensors.apply(
v⃗ = neighbor_vertices(ψ, o)
if length(v⃗) == 1
if ortho
ψ = orthogonalize(ψ, v⃗[1])
ψ = tree_orthogonalize(ψ, v⃗[1])
end
oψᵥ = apply(o, ψ[v⃗[1]])
if normalize
Expand All @@ -215,7 +215,7 @@ function ITensors.apply(
error("Vertices where the gates are being applied must be neighbors for now.")
end
if ortho
ψ = orthogonalize(ψ, v⃗[1])
ψ = tree_orthogonalize(ψ, v⃗[1])
end
if variational_optimization_only || !is_product_env
ψᵥ₁, ψᵥ₂ = full_update_bp(
Expand Down
2 changes: 1 addition & 1 deletion src/tebd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function tebd(
ψ = apply(u⃗, ψ; cutoff, maxdim, normalize=true, ortho, kwargs...)
if ortho
for v in vertices(ψ)
ψ = orthogonalize(ψ, v)
ψ = tree_orthogonalize(ψ, v)
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions src/treetensornetworks/abstracttreetensornetwork.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ function ITensorMPS.orthogonalize(ttn::AbstractTTN, region; kwargs...)
return orthogonalize(ttn, [region]; kwargs...)
end

function tree_orthogonalize(ttn::AbstractTTN, args...; kwargs...)
return orthogonalize(ttn, args...; kwargs...)
end

#
# Truncation
#
Expand Down

0 comments on commit 629af71

Please sign in to comment.