dwave.cloud.solver.CQMSolver.upload_cqm#

CQMSolver.upload_cqm(cqm)[source]#

Upload the specified CQM to SAPI, returning a Problem ID that can be used to submit the CQM to this solver (i.e. call the .sample_cqm method).

Parameters:

cqm (ConstrainedQuadraticModel/bytes-like/file-like) – A constrained quadratic model given either as an in-memory ConstrainedQuadraticModel object, or as raw data (encoded serialized model) in either a file-like or a bytes-like object.

Returns:

Problem ID in a Future. Problem ID can be used to submit problems by reference.

Return type:

concurrent.futures.Future[str]

Note

To use this method, dimod package has to be installed.