Skip to content

Commit

Permalink
fix mypy (#101)
Browse files Browse the repository at this point in the history
* update mypy ini

* fix mypy
  • Loading branch information
cqc-melf authored Jul 9, 2024
1 parent 2cc3c9a commit 328d5e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ ignore_errors = True
[mypy-lark.*]
ignore_missing_imports = True
ignore_errors = True

[mypy-sympy.*]
ignore_missing_imports = True
4 changes: 2 additions & 2 deletions pytket/extensions/qulacs/backends/qulacs_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ def get_operator_expectation_value(

qulacs_qps = " ".join(_items)
if isinstance(coeff, Expr):
qulacs_coeff = complex(coeff.evalf()) # type: ignore
qulacs_coeff = complex(coeff.evalf())
else:
qulacs_coeff = complex(coeff) # type: ignore
qulacs_coeff = complex(coeff)
observable.add_operator(qulacs_coeff, qulacs_qps)

expectation_value = self._expectation_value(state_circuit, observable)
Expand Down

0 comments on commit 328d5e7

Please sign in to comment.