dwave.preprocessing.composites.FixVariablesComposite.sample#

FixVariablesComposite.sample(bqm, **parameters)[source]#

Sample from the provided binary quadratic model.

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

  • fixed_variables (dict, optional, default=None) – A dictionary of variable assignments used when self.algorithm is ‘explicit’.

  • strict (bool, optional, default=True) – Only used if self.algorithm is ‘roof_duality’. If True, only fixes variables for which assignments are true for all minimizing points (strong persistency). If False, also fixes variables for which the assignments are true for some but not all minimizing points (weak persistency).

  • **parameters – Parameters for the sampling method, specified by the child sampler.

Returns:

dimod.SampleSet