Skip to content

Commit

Permalink
Fix sparse matrix conversion for SciPy<Real/Imaginary>Evolver (Qisk…
Browse files Browse the repository at this point in the history
…it/qiskit#9598)

* Fix missing indent

* add reno

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
Cryoris and mergify[bot] authored Feb 16, 2023
1 parent 6718d56 commit 57d0b56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qiskit_algorithms/time_evolvers/classical_methods/evolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ def _operator_to_matrix(operator: BaseOperator | PauliSumOp):
"Trying dense computation",
type(operator),
)
try:
op_matrix = operator.to_matrix()
except AttributeError as ex:
raise AlgorithmError(f"Unsupported operator type `{type(operator)}`.") from ex
try:
op_matrix = operator.to_matrix()
except AttributeError as ex:
raise AlgorithmError(f"Unsupported operator type `{type(operator)}`.") from ex
return op_matrix


Expand Down

0 comments on commit 57d0b56

Please sign in to comment.