FujitsuDA3cClient¶
- class FujitsuDA3cClient¶
ベースクラス:
FujitsuDA4ClientClient for the Fujitsu Digital Annealer DA3c solver. It has the same interface as
FujitsuDA4Clientand it reaches another endpoint.Methods
async_solve
Send the objective function and the constraints to the solver.
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 JobStatus¶
ベースクラス:
Enum- classmethod __contains__(value)¶
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls's members. 3) value is a pseudo-member (flags)
- classmethod __getitem__(name)¶
Return the member matching name.
- classmethod __iter__()¶
Return members in definition order.
- classmethod __len__()¶
Return the number of members (no aliases)
- Canceled = 3¶
- Deleted = 5¶
- Done = 0¶
- Error = 4¶
- Running = 1¶
- Waiting = 2¶
- __members__ = mappingproxy({'Done': FujitsuDA4ClientJobStatusEnum.Done, 'Running': FujitsuDA4ClientJobStatusEnum.Running, 'Waiting': FujitsuDA4ClientJobStatusEnum.Waiting, 'Canceled': FujitsuDA4ClientJobStatusEnum.Canceled, 'Error': FujitsuDA4ClientJobStatusEnum.Error, 'Deleted': FujitsuDA4ClientJobStatusEnum.Deleted})¶
- __name__ = 'JobStatus'¶
- __nb_enum__ = <capsule object NULL>¶
- __qualname__ = 'FujitsuDA4Client.JobStatus'¶
- class JobStatusInfo¶
- __init__(*args, **kwargs)¶
- property job_id¶
- property job_status¶
- property start_time¶
- class Parameters¶
Parameters that the client sends with every request.
- __init__(*args, **kwargs)¶
- property gs_cutoff¶
- property gs_level¶
- property internal_penalty¶
- property max_penalty_coef¶
- property num_group¶
- property num_output_solution¶
- property num_run¶
- property one_hot_cutoff¶
- property one_hot_level¶
- property penalty_auto_mode¶
- property penalty_coef¶
- property penalty_inc_rate¶
- property target_energy¶
- property time_limit_sec¶
- class QuboSolution¶
- __init__(*args, **kwargs)¶
- property configuration¶
- property energy¶
- property frequency¶
- property penalty_energy¶
- class QuboSolutionList¶
- __init__(*args, **kwargs)¶
- property progress¶
- property result_status¶
- property solutions¶
- property timing¶
- class Result¶
Raw response that the solver returned.
- __init__(*args, **kwargs)¶
- property message¶
- property qubo_solution¶
- property status¶
- __init__(self) None¶
- __init__(self, token: str = '', type_id: str | None = None, url: str = '', proxy: str | None = None) None
- async_solve(self, objective: Poly) str¶
- async_solve(self, constraint: Constraint | ConstraintList) str
- async_solve(self, objective: Poly, constraint: Constraint | ConstraintList) str
async_solve
Overload 1.
- Args:
objective (amplify.Poly)
- Returns:
str:
Overload 2.
- Args:
constraint (amplify.Constraint | amplify.ConstraintList)
- Returns:
str:
Overload 3.
- Args:
objective (amplify.Poly)
constraint (amplify.Constraint | amplify.ConstraintList)
- Returns:
str:
- get_jobs(self) list[JobStatusInfo]¶
- 戻り値の型:
- health_check(self) CommonError | None¶
- 戻り値の型:
CommonError | None
- solve(
- self,
- objective: Poly | Matrix,
- dry_run: Literal[False] = False,
- retry_after_delete: bool = True,
- delete_after_solve: bool = True,
- solve(
- self,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[False] = False,
- retry_after_delete: bool = True,
- delete_after_solve: bool = True,
- solve(
- self,
- objective: Poly | Matrix,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[False] = False,
- retry_after_delete: bool = True,
- delete_after_solve: bool = True,
- solve(
- self,
- objective: Poly | Matrix,
- dry_run: Literal[True],
- retry_after_delete: bool = True,
- delete_after_solve: bool = True,
- solve(
- self,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[True],
- retry_after_delete: bool = True,
- delete_after_solve: bool = True,
- solve(
- self,
- objective: Poly | Matrix,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[True],
- retry_after_delete: bool = True,
- delete_after_solve: bool = True,
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.retry_after_delete (bool): When
True, delete a job that already finished and send the request again after the service refuses a new job. WhenFalse, raise the error of the service instead. Defaults toTrue.delete_after_solve (bool): When
True, delete the job from the service after the client reads the answer. Defaults toTrue.
- Returns:
amplify.FujitsuDA4Client.Result:
Overload 2.
- Args:
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[False]): When
True, ask the service to check the request, and returnNone. Defaults toFalse.retry_after_delete (bool): When
True, delete a job that already finished and send the request again after the service refuses a new job. WhenFalse, raise the error of the service instead. Defaults toTrue.delete_after_solve (bool): When
True, delete the job from the service after the client reads the answer. Defaults toTrue.
- Returns:
amplify.FujitsuDA4Client.Result:
Overload 3.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[False]): When
True, ask the service to check the request, and returnNone. Defaults toFalse.retry_after_delete (bool): When
True, delete a job that already finished and send the request again after the service refuses a new job. WhenFalse, raise the error of the service instead. Defaults toTrue.delete_after_solve (bool): When
True, delete the job from the service after the client reads the answer. Defaults toTrue.
- Returns:
amplify.FujitsuDA4Client.Result:
Overload 4.
- 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.retry_after_delete (bool): When
True, delete a job that already finished and send the request again after the service refuses a new job. WhenFalse, raise the error of the service instead. Defaults toTrue.delete_after_solve (bool): When
True, delete the job from the service after the client reads the answer. Defaults toTrue.
Overload 5.
- Args:
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[True]): When
True, ask the service to check the request, and returnNone.retry_after_delete (bool): When
True, delete a job that already finished and send the request again after the service refuses a new job. WhenFalse, raise the error of the service instead. Defaults toTrue.delete_after_solve (bool): When
True, delete the job from the service after the client reads the answer. Defaults toTrue.
Overload 6.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[True]): When
True, ask the service to check the request, and returnNone.retry_after_delete (bool): When
True, delete a job that already finished and send the request again after the service refuses a new job. WhenFalse, raise the error of the service instead. Defaults toTrue.delete_after_solve (bool): When
True, delete the job from the service after the client reads the answer. Defaults toTrue.
- property acceptable_degrees¶
Degrees of the polynomial that the solver accepts.
solve()reads it to decide the conversion of the model.- 戻り値の型:
- 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 set_inequalities¶
- property set_one_way_one_hot_groups¶
- property set_penalty_binary_polynomial¶
- property set_two_way_one_hot_groups¶
- property token¶
API token of the user.
The client needs it for every request. Its text never appears in the output of
repr().- 戻り値の型:
- property type_id¶
- property version¶
Version of the API that the client speaks.
The client holds this text, so reading it sends no request.
- 戻り値の型: