Skip to content

Commit

Permalink
Fix cupy
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroSopena committed Jan 22, 2023
1 parent 80139d4 commit cfba10c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qibo/gates/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ def __init__(self, q, lam=0):

def apply_density_matrix(self, backend, state, nqubits):
lam = self.init_kwargs["lam"]
return (1 - lam) * backend.cast(state) + lam / 2**nqubits * I(
*range(nqubits)
).asmatrix(backend)
return (1 - lam) * backend.cast(state) + lam / 2**nqubits * backend.cast(
I(*range(nqubits)).asmatrix(backend)
)

def apply(self, backend, state, nqubits):
num_qubits = len(self.target_qubits)
Expand Down

0 comments on commit cfba10c

Please sign in to comment.