dimod.binary.BinaryQuadraticModel.to_coo

BinaryQuadraticModel.to_coo(fp=None, vartype_header: bool = False)[source]

Serialize the binary quadratic model to a COOrdinate format encoding.

If fp is provided, the serialized BQM is written to a file, otherwise it is returned as a string.

Note

This method is deprecated, use dump() or dumps() instead.