Skip to content

Commit

Permalink
value error to type
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles MOUSSA committed Jan 8, 2025
1 parent d066a63 commit 8053a7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion horqrux/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def expectation(
return ad_expectation(state, gates, observables, values)
elif diff_mode == DiffMode.ADJOINT:
if isinstance(state, DensityMatrix):
raise ValueError("Adjoint does not support density matrices.")
raise TypeError("Adjoint does not support density matrices.")
return adjoint_expectation(state, gates, observables, values)
elif diff_mode == DiffMode.GPSR:
checkify.check(
Expand Down

0 comments on commit 8053a7a

Please sign in to comment.