Skip to content

Commit

Permalink
clarify error message
Browse files Browse the repository at this point in the history
Co-authored-by: jselig-rigetti <[email protected]>
  • Loading branch information
MarquessV and jselig-rigetti authored May 31, 2024
1 parent 380e16c commit 604a135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyquil/paulis.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def __eq__(self, other: object) -> bool:
def __hash__(self) -> int:
"""Return a hash of the PauliTerm."""
if not isinstance(self.coefficient, Complex):
raise ValueError("PauliTerm cannot be hashed if the coefficient is not a number.")
raise ValueError("PauliTerm cannot be hashed if the coefficient is not a complex number.")
return hash(
(
round(self.coefficient.real * HASH_PRECISION),
Expand Down

0 comments on commit 604a135

Please sign in to comment.