Skip to content

Commit

Permalink
cleaning the code-2
Browse files Browse the repository at this point in the history
  • Loading branch information
rochisha0 committed Jul 16, 2024
1 parent 8210e1f commit e25e006
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions qutip/core/qobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,7 @@ def expm(self, dtype: LayerType = _data.Dense) -> Qobj:
"""
if not self._dims.issquare:
raise TypeError("expm is only valid for square operators")
if isinstance(self.data, (_data.CSR, _data.Dia)):
dtype = self.dtype
else:
if not isinstance(self.data, (_data.CSR, _data.Dia)):
dtype = None
return Qobj(_data.expm(self._data, dtype=dtype),
dims=self._dims,
Expand Down

0 comments on commit e25e006

Please sign in to comment.