View source on GitHub |
Returns a random unit-length vector from the uniform distribution.
cirq.testing.random_superposition(
dim: int, *, random_state: 'cirq.RANDOM_STATE_OR_SEED_LIKE' = None
) -> np.ndarray
Args | |
---|---|
dim
|
The dimension of the vector. |
random_state
|
A seed (int) or np.random.RandomState class to use when
generating random values. If not set, defaults to using the module
methods in np.random .
|
Returns | |
---|---|
The sampled unit-length vector. |