Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Jun 12, 2024
1 parent 4bc0183 commit 9e14f14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/abstractitensornetwork.jl
Original file line number Diff line number Diff line change
Expand Up @@ -806,13 +806,14 @@ function ITensorMPS.add(tn1::AbstractITensorNetwork, tn2::AbstractITensorNetwork

edges_tn1, edges_tn2 = edges(tn1), edges(tn2)

if !issetequal(tn1, tn2)
if !issetequal(edges_tn1, edges_tn2)
new_edges = union(edges_tn1, edges_tn2)
tn1 = insert_linkinds(tn1, new_edges)
tn2 = insert_linkinds(tn2, new_edges)
end

edges_tn1, edges_tn2 = edges(tn1), edges(tn2)
@assert issetequal(edges_tn1, edges_tn2)

tn12 = copy(tn1)
new_edge_indices = Dict(
Expand All @@ -833,6 +834,7 @@ function ITensorMPS.add(tn1::AbstractITensorNetwork, tn2::AbstractITensorNetwork

e1_v = filter(x -> src(x) == v || dst(x) == v, edges_tn1)
e2_v = filter(x -> src(x) == v || dst(x) == v, edges_tn2)
@assert issetequal(e1_v, e2_v)

tn1v_linkinds = Index[only(linkinds(tn1, e)) for e in e1_v]
tn2v_linkinds = Index[only(linkinds(tn2, e)) for e in e1_v]
Expand Down
3 changes: 1 addition & 2 deletions src/solvers/alternating_update/alternating_update.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function alternating_update(
nsweeps,
init_state;
root_vertex,
sweep_plan_func,
extracter,
extracter_kwargs,
updater,
Expand All @@ -53,7 +52,7 @@ end

function alternating_update(
projected_operator,
init_state,
init_state::AbstractTTN,
sweep_plans;
outputlevel=default_outputlevel(),
checkdone=default_checkdone(), #
Expand Down

0 comments on commit 9e14f14

Please sign in to comment.