Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Sep 13, 2024
1 parent a55d05f commit 02e22f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qibo/quantum_info/superoperator_transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2136,8 +2136,6 @@ def _reshuffling(super_op, order: str = "row", backend=None):
Returns:
ndarray: Choi (Liouville) representation of the quantum channel.
"""
super_op = backend.cast(super_op)

if not isinstance(order, str):
raise_error(TypeError, f"order must be type str, but it is type {type(order)}.")

Expand All @@ -2156,6 +2154,8 @@ def _reshuffling(super_op, order: str = "row", backend=None):

backend = _check_backend(backend)

super_op = backend.cast(super_op, dtype=super_op.dtype)

dim = np.sqrt(super_op.shape[0])

if (
Expand Down

0 comments on commit 02e22f9

Please sign in to comment.