Skip to content

Commit

Permalink
In error message converting parametrized diagram to tensor, display t…
Browse files Browse the repository at this point in the history
…he poly.
  • Loading branch information
dlyongemallo committed Nov 20, 2023
1 parent 9575125 commit 2db52bf
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 @@ -144,7 +144,7 @@ def tensorfy(g: 'BaseGraph[VT,ET]', preserve_scalar:bool=True) -> np.ndarray:
else:
p = phases[v]
if isinstance(p, Poly):
raise ValueError(f"Can't convert diagram with parameters to tensor: {str(v)}")
raise ValueError(f"Can't convert diagram with parameters to tensor: {str(p)}")
phase = pi*p
if types[v] == VertexType.Z:
t = Z_to_tensor(d,phase)
Expand Down

0 comments on commit 2db52bf

Please sign in to comment.