parameters: (hilb, key, *, size=None, dtype=np.float32)
return_statement: return random_state(hilb, key, size, dtype=dtype)
docstring: r"""Generates either a single or a batch of uniformly distributed random states.
  
      Args:
          hilb: The hilbert space
          key: The Jax PRNGKey
          size: If provided, returns a batch of configurations of the form (size, #) if
              size is an integer or (*size, #) if it is a tuple and where # is the Hilbert
              space size. By default, a single random configuration with shape (#,) is
              returned.
          dtype: The dtype of the resulting states.
  
      Example:
  
          >>> import netket, jax
          >>> hi = netket.hilbert.Qubit(N=2)
          >>> print(hi.random_state(key=jax.random.PRNGKey(0)))
          [1. 0.]
          >>> print(hi.random_state(size=2, key=jax.random.PRNGKey(1)))
          [[0. 1.]
           [0. 0.]]
docstring_summary: r"""Generates either a single or a batch of uniformly distributed random states.
docstring_tokens: r Generates either a single or a batch of uniformly distributed random states .
function: def random_state(hilb, key, *, size=None, dtype=np.float32):
      r"""Generates either a single or a batch of uniformly distributed random states.
  
      Args:
          hilb: The hilbert space
          key: The Jax PRNGKey
          size: If provided, returns a batch of configurations of the form (size, #) if
              size is an integer or (*size, #) if it is a tuple and where # is the Hilbert
              space size. By default, a single random configuration with shape (#,) is
              returned.
          dtype: The dtype of the resulting states.
  
      Example:
  
          >>> import netket, jax
          >>> hi = netket.hilbert.Qubit(N=2)
          >>> print(hi.random_state(key=jax.random.PRNGKey(0)))
          [1. 0.]
          >>> print(hi.random_state(size=2, key=jax.random.PRNGKey(1)))
          [[0. 1.]
           [0. 0.]]
      """
      return random_state(hilb, key, size, dtype=dtype)
function_tokens: def random_state ( hilb , key , * , size = None , dtype = np . float32 ) : return random_state ( hilb , key , size , dtype = dtype )