Skip to content

Commit

Permalink
Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
boldar99 committed Jul 16, 2024
1 parent e49c74c commit 8ba8451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyzx/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def tensorfy(g: 'BaseGraph[VT,ET]', preserve_scalar:bool=True) -> np.ndarray:
elif g.edge_type(sl) == EdgeType.SIMPLE:
t = np.trace(t)
else:
raise NotImplementedError(f"Tensor contraction for {repr(sl)} self loops are not implemented.")
raise NotImplementedError(f"Tensor contraction with {repr(sl)} self-loops is not implemented.")
nn = list(filter(lambda n: rows[n]<r or (rows[n]==r and n<v), neigh)) # TODO: allow ordering on vertex indices?
ety = {n:g.edge_type(g.edge(v,n)) for n in nn}
nn.sort(key=lambda n: ety[n])
Expand Down

0 comments on commit 8ba8451

Please sign in to comment.