sample_bitstrings
- qujax.sample_bitstrings(random_key, statetensor, n_samps=1)
Generate random bitstring samples according to statetensor.
- Parameters:
random_key (jax.random.PRNGKeyArray) – JAX random key to seed samples.
statetensor (ndarray) – Statetensor encoding sampling probabilities (in the form of amplitudes).
n_samps (int | None) – Number of samples to generate. Defaults to 1.
- Returns:
Array with sampled bitstrings, shape=(n_samps, statetensor.ndim).
- Return type:
ndarray