File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -603,6 +603,7 @@ function gauge_edge(
603603 # # TODO : Implement as `only(common_neighbors(tn, src(edge), dst(edge)))`
604604 # new_vertex = only(neighbors(tn, src(edge)) ∩ neighbors(tn, dst(edge)))
605605 # return contract(tn, new_vertex => dst(edge))
606+ @assert src (edge) ∈ neighbors (tn, dst (edge))
606607 tn = copy (tn)
607608 left_inds = uniqueinds (tn, edge)
608609 ltags = tags (tn, edge)
677678
678679# TODO : decide whether to use graph mutating methods when resulting graph is unchanged?
679680function _truncate_edge (tn:: AbstractITensorNetwork , edge:: AbstractEdge ; kwargs... )
681+ @assert src (edge) ∈ neighbors (tn, dst (edge))
680682 tn = copy (tn)
681683 left_inds = uniqueinds (tn, edge)
682684 ltags = tags (tn, edge)
You can’t perform that action at this time.
0 commit comments