File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -603,7 +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 ))
606+ ! has_edge (tn, edge) && throw ( ArgumentError ( " Edge not in graph. " ))
607607 tn = copy (tn)
608608 left_inds = uniqueinds (tn, edge)
609609 ltags = tags (tn, edge)
678678
679679# TODO : decide whether to use graph mutating methods when resulting graph is unchanged?
680680function _truncate_edge (tn:: AbstractITensorNetwork , edge:: AbstractEdge ; kwargs... )
681- @assert src ( edge) ∈ neighbors (tn, dst (edge ))
681+ ! has_edge (tn, edge) && throw ( ArgumentError ( " Edge not in graph. " ))
682682 tn = copy (tn)
683683 left_inds = uniqueinds (tn, edge)
684684 ltags = tags (tn, edge)
You can’t perform that action at this time.
0 commit comments