dwave.cloud.solver.StructuredSolver.sample_problem#

StructuredSolver.sample_problem(problem: tuple[list | dict[int, float], dict[tuple[int, int], float], float], *, problem_type: Literal['ising', 'qubo'] = 'ising', undirected_biases: bool = False, label: str | None = None, upload_params: dict | None = None, **sample_params: Any) Future[source]#

Sample from the specified problem.

Parameters:
  • problem – A 3-tuple with linear/quadratic terms of the model and the offset.

  • problem_type – Problem type, one of the handled problem types by the solver.

  • undirected_biases – Are (quadratic) biases specified on undirected edges? For triangular or symmetric matrix of quadratic biases set it to True.

  • label – Problem label you can optionally tag submissions with for ease of identification.

  • upload_params – Optional upload/encode parameters, not used by structured solvers.

  • **sample_params – Sampling parameters, solver-specific.

Returns:

Response in a future.

Note

sample_problem() accepts the native problem formulation for a solver, and for structured QPU solvers that’s typically the Ising form. Calling sample_problem() with the default arguments is equivallent to calling sample_ising().