# dimod.reference.samplers.random_sampler.RandomSampler.sample¶

RandomSampler.sample(bqm, num_reads=10, seed=None)[source]

Give random samples for a binary quadratic model.

Variable assignments are chosen by coin flip.

Parameters: bqm (BinaryQuadraticModel) – Binary quadratic model to be sampled from. num_reads (int, optional, default=10) – Number of reads. seed (int (32-bit unsigned integer), optional) – Seed to use for the PRNG. Specifying a particular seed with a constant set of parameters produces identical results. If not provided, a random seed is chosen. SampleSet