HitachiClient¶
- class HitachiClient¶
ベースクラス:
BaseClientClient for Hitachi Annealing Cloud Web, a CMOS annealing machine whose variables sit on a King's graph. Amplify embeds the model into that graph before it sends the request.
Methods
Attributes
Degrees of the polynomial that the solver accepts.
Parameters that the client sends with every request.
URL of the proxy that the client goes through, or
Nonefor no proxy.API token of the user.
URL of the service that the client sends to.
Version of the API that the client speaks.
Path of the file that receives a copy of the request, or
Noneto write none.Path of the file that receives a copy of the response, or
Noneto write none.- class Parameters¶
Parameters that the client sends with every request.
- class Outputs¶
- __init__(*args, **kwargs)¶
- __repr__(self) str¶
- 戻り値の型:
str
- __str__(self) str¶
- 戻り値の型:
str
- property averaged_energy¶
- property averaged_spins¶
- property energies¶
- property execution_time¶
- property num_outputs¶
- property spins¶
- class TemperatureParameters¶
- __init__(*args, **kwargs)¶
- __repr__(self) str¶
- 戻り値の型:
str
- __str__(self) str¶
- 戻り値の型:
str
- property temperature_initial¶
- property temperature_num_steps¶
- property temperature_step_length¶
- property temperature_target¶
- __init__(*args, **kwargs)¶
- __repr__(self) str¶
- 戻り値の型:
str
- __str__(self) str¶
- 戻り値の型:
str
- property num_executions¶
- property outputs¶
- property parameters¶
- property type¶
- class Result¶
Raw response that the solver returned.
- class Result¶
- __init__(*args, **kwargs)¶
- __repr__(self) str¶
- 戻り値の型:
str
- __str__(self) str¶
- 戻り値の型:
str
- property averaged_energy¶
- property averaged_spins¶
- property energies¶
- property execution_time¶
- property spins¶
- __init__(*args, **kwargs)¶
- __repr__(self) str¶
- 戻り値の型:
str
- __str__(self) str¶
- 戻り値の型:
str
- property job_id¶
- property message¶
- property result¶
- property status¶
- __init__(self) None¶
- __init__(self, token: str = '', url: str = '', proxy: str | None = None) None
- パラメータ:
token (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) Result¶
- 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 returnNone. Defaults toFalse.
- Returns:
amplify.HitachiClient.Result:
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 returnNone.
- property acceptable_degrees¶
Degrees of the polynomial that the solver accepts.
solve()reads it to decide the conversion of the model.- 戻り値の型:
- property graph¶
- property parameters¶
Parameters that the client sends with every request.
- 戻り値の型:
- property proxy¶
URL of the proxy that the client goes through, or
Nonefor no proxy.- 戻り値の型:
str | None
- 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 API that the client speaks.
The client holds this text, so reading it sends no request.
- 戻り値の型:
str
- property write_request_data¶
Path of the file that receives a copy of the request, or
Noneto write none.Use it to inspect what the client sends.
- 戻り値の型:
pathlib.Path | None
- property write_response_data¶
Path of the file that receives a copy of the response, or
Noneto write none.- 戻り値の型:
pathlib.Path | None