dimod.reference.composites.roofduality.RoofDualityComposite.sample¶
-
RoofDualityComposite.sample(bqm, sampling_mode=True, **parameters)[source]¶ Sample from the provided binary quadratic model.
Uses the
fix_variables()function to determine which variables to fix.Parameters: - bqm (
dimod.BinaryQuadraticModel) – Binary quadratic model to be sampled from. - sampling_mode (bool, optional, default=True) – In sampling mode, only roof-duality is used. When sampling_mode is false, strongly connected components are used to fix more variables, but in some optimal solutions these variables may take different values.
- **parameters – Parameters for the child sampler.
Returns: - bqm (