LeapHybridSamplerClient

class LeapHybridSamplerClient

ベースクラス: BaseClient

Methods

__init__

solve

Send the objective function and the constraints to the solver.

Attributes

acceptable_degrees

Degrees of the polynomial that the solver accepts.

compress_qpu_problem_data

parameters

Parameters that the client sends with every request.

properties

proxy

URL of the proxy that the client goes through, or None for no proxy.

solver

solver_names

token

API token of the user.

url

URL of the service that the client sends to.

version

Version of the service.

write_request_data

Path of the file that receives a copy of the request, or None to write none.

write_response_data

Path of the file that receives a copy of the response, or None to write none.

class Parameters

Parameters that the client sends with every request.

__init__(self) None
__repr__(self) str
戻り値の型:

str

__str__(self) str
戻り値の型:

str

property label
property time_limit
__init__(self) None
__init__(self, token: str = '', solver: str = '', url: str = '', proxy: str | None = None) None
パラメータ:
  • token (str) -- Defaults to ''.

  • solver (str) -- Defaults to ''.

  • url (str) -- Defaults to ''.

  • proxy (str | None) -- Defaults to None.

__repr__(self) str
戻り値の型:

str

__str__(self) str
戻り値の型:

str

solve(
self,
objective: Poly | Matrix,
dry_run: Literal[False] = False,
) SampleSet
solve(self, objective: Poly | Matrix, dry_run: Literal[True]) None

Send the objective function and the constraints to the solver.

This method takes the polynomial that the solver accepts, so it runs no conversion of the model. Use solve() to solve a model that needs a conversion. It returns the raw response of the solver.

Overload 1.

Args:
  • objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.

  • dry_run (typing.Literal[False]): When True, ask the service to check the request, and return None. Defaults to False.

Returns:

dimod.sampleset.SampleSet:

Overload 2.

Args:
  • objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.

  • dry_run (typing.Literal[True]): When True, ask the service to check the request, and return None.

property acceptable_degrees

Degrees of the polynomial that the solver accepts.

solve() reads it to decide the conversion of the model.

戻り値の型:

AcceptableDegrees

property compress_qpu_problem_data
property parameters

Parameters that the client sends with every request.

戻り値の型:

Parameters

property properties
property proxy

URL of the proxy that the client goes through, or None for no proxy.

戻り値の型:

str | None

property solver
property solver_names
property token

API token of the user.

The client needs it for every request. Its text never appears in the output of repr().

戻り値の型:

str

property url

URL of the service that the client sends to.

戻り値の型:

str

property version

Version of the service.

Reading this property sends a request to the service.

戻り値の型:

str

property write_request_data

Path of the file that receives a copy of the request, or None to write none.

Use it to inspect what the client sends.

戻り値の型:

Path | None

property write_response_data

Path of the file that receives a copy of the response, or None to write none.

戻り値の型:

Path | None