Wavefunction.sample_bitstrings

Wavefunction.sample_bitstrings(n_samples)[source]

Sample bitstrings from the distribution defined by the wavefunction.

Parameters

n_samples (int) – The number of bitstrings to sample

Return type

ndarray

Returns

An array of shape (n_samples, n_qubits)