Skip to content

Commit

Permalink
Merge pull request #186 from dlyongemallo/parametrized_diagram_error_msg
Browse files Browse the repository at this point in the history
In error message converting parametrized diagram to tensor, display the poly.
  • Loading branch information
jvdwetering authored Nov 20, 2023
2 parents 1b276dc + 2db52bf commit 71802a8
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 71802a8

Please sign in to comment.