penaltymodel.PenaltyModelCache.insert_binary_quadratic_model#

PenaltyModelCache.insert_binary_quadratic_model(bqm: BinaryQuadraticModel)[source]#

Insert a binary quadratic model into the database.

Parameters:

bqm – A binary quadratic model.

Raises:

ValueError – If the variables of the binary quadratic model are not labelled [0, n).