dimod.serialization.coo.dumps#

dumps(bqm: BinaryQuadraticModel, vartype_header: bool = False) str[source]#

Dump a binary quadratic model to a string in COOrdinate format.

Parameters:
  • bqm – Binary quadratic model to save as a string in COO format.

  • vartype_header – If True, prefixes the Vartype to the output as a comment line (e.g., # vartype=SPIN).