ffsim.random.random_state_vector

ffsim.random.random_state_vector(dim, *, seed=None, dtype=<class 'complex'>)[source]

Return a random state vector sampled from the uniform distribution.

Parameters:
  • dim (int) – The dimension of the state vector.

  • seed – A seed to initialize the pseudorandom number generator. Should be a valid input to np.random.default_rng.

  • dtype – The data type to use for the result.

Return type:

ndarray

Returns:

The sampled state vector.

Raises:

ValueError – Dimension must be at least one.