Skip to content

Commit

Permalink
Merge pull request #1446 from qiboteam/fix_superop
Browse files Browse the repository at this point in the history
Fix bug in `quantum_info._reshuffling`
  • Loading branch information
renatomello authored Sep 15, 2024
2 parents a55d05f + 02e22f9 commit 434989e
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 434989e

Please sign in to comment.