Skip to content

Commit

Permalink
fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Jan 28, 2024
1 parent fe51c4d commit b08034d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/qibo/quantum_info/random_ensembles.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,11 @@ def _set_backend_and_local_state(seed, backend):
if backend is None: # pragma: no cover
backend = GlobalBackend()

if seed is None or isinstance(seed, int): # pragma: no cover
if backend.__class__.__name__ in ["CupyBackend", "CuQuantumBackend"]:
if seed is None or isinstance(seed, int):
if backend.__class__.__name__ in [
"CupyBackend",
"CuQuantumBackend",
]: # pragma: no cover
local_state = backend.np.random.default_rng(seed)
else:
local_state = np.random.default_rng(seed)
Expand Down

0 comments on commit b08034d

Please sign in to comment.