penaltymodel.PenaltyModelCache.insert_penalty_model#

PenaltyModelCache.insert_penalty_model(bqm: BinaryQuadraticModel, samples_like, classical_gap: float)[source]#

Insert a penalty model into the database.

Parameters:
  • bqm – A binary quadratic model.

  • samples_like – Samples to add to the database. ‘samples_like’ is an extension of NumPy’s array_like. See dimod.as_samples().

  • classical_gap – The classical gap. This is not checked for correctness.