diff --git a/src/qibo/quantum_info/random_ensembles.py b/src/qibo/quantum_info/random_ensembles.py index 3d11c0d1ce..18e2eedaa1 100644 --- a/src/qibo/quantum_info/random_ensembles.py +++ b/src/qibo/quantum_info/random_ensembles.py @@ -424,7 +424,7 @@ def random_statevector(dims: int, seed=None, backend=None): state = local_state.standard_normal(dims).astype(complex) state += 1.0j * local_state.standard_normal(dims) state /= np.linalg.norm(state) - state = backend.cast(state, dtype=state.dtype) + state = backend.cast(state, dtype=state.dtype) return state