dwave.system.composites.ParallelEmbeddingComposite.sample#

ParallelEmbeddingComposite.sample(bqm: BinaryQuadraticModel, chain_strength: float | None = None, **kwargs) SampleSet[source]#

Sample from the specified binary quadratic model.

Sample sets are concatenated in the same order as the embeddings parameter used to instantiate the ParallelEmbeddingComposite class.

Parameters:
  • bqm – Binary quadratic model (BQM) to be sampled from.

  • chain_strength – The chain strength parameter of the BQM.

  • **kwargs – Optional keyword arguments for the sampling method, specified per embedding. Note that if auto_scale=True (the default for QPU-derived composites) then all bqms are independently scaled to maximize the programmable range.

Returns:

SampleSet.

The info field is returned from the child sampler unmodified.

Examples

See examples in the ParallelEmbeddingComposite class.

See also

If the bqm or chain_strength parameter varies by embedding, or if you want a list of sample sets as the output, use the sample_multiple() method.