FujitsuDA4ClientΒΆ

class FujitsuDA4ClientΒΆ

Bases: BaseClient

Methods

Attributes

acceptable_degrees

Returns: amplify.AcceptableDegrees:

parameters

Returns: amplify.FujitsuDA4Client.Parameters:

proxy

Returns: str | None:

set_inequalities

Returns: bool:

set_one_way_one_hot_groups

Returns: bool:

set_penalty_binary_polynomial

Returns: bool:

set_two_way_one_hot_groups

Returns: bool:

token

Returns: str:

type_id

Returns: str | None:

url

Returns: str:

version

Returns: str:

write_request_data

Returns: pathlib.Path | None:

write_response_data

Returns: pathlib.Path | None:

class CommonErrorΒΆ
__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property codeΒΆ

Returns: int:

property messageΒΆ

Returns: str:

property titleΒΆ

Returns: str:

class JobStatusΒΆ

Bases: 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)

__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

Canceled = 3ΒΆ
Deleted = 5ΒΆ
Done = 0ΒΆ
Error = 4ΒΆ
Running = 1ΒΆ
Waiting = 2ΒΆ
__nb_enum__ = <capsule object NULL>ΒΆ
class JobStatusInfoΒΆ
__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property job_idΒΆ

Returns: str:

property job_statusΒΆ

Returns: amplify.FujitsuDA4Client.JobStatus:

property start_timeΒΆ

Returns: datetime.datetime:

class ParametersΒΆ
__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property gs_cutoffΒΆ

Returns: int | None:

property gs_levelΒΆ

Returns: int | None:

property internal_penaltyΒΆ

Returns: int | None:

property max_penalty_coefΒΆ

Returns: int | None:

property num_groupΒΆ

Returns: int | None:

property num_output_solutionΒΆ

Returns: int | None:

property num_runΒΆ

Returns: int | None:

property one_hot_cutoffΒΆ

Returns: int | None:

property one_hot_levelΒΆ

Returns: int | None:

property penalty_auto_modeΒΆ

Returns: int | None:

property penalty_coefΒΆ

Returns: int | None:

property penalty_inc_rateΒΆ

Returns: int | None:

property target_energyΒΆ

Returns: float | None:

property time_limit_secΒΆ

Returns: datetime.timedelta | None:

class ProgressΒΆ
__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property energyΒΆ

Returns: float:

property penalty_energyΒΆ

Returns: float:

property timeΒΆ

Returns: datetime.timedelta:

QuboResponseΒΆ

alias of Result

class QuboSolutionΒΆ
__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property configurationΒΆ

Returns: dict[str, bool]:

property energyΒΆ

Returns: float:

property frequencyΒΆ

Returns: int:

property penalty_energyΒΆ

Returns: float:

class QuboSolutionListΒΆ
__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property progressΒΆ

Returns: list[amplify.FujitsuDA4Client.Progress]:

property result_statusΒΆ

Returns: bool:

property solutionsΒΆ

Returns: list[amplify.FujitsuDA4Client.QuboSolution]:

property timingΒΆ

Returns: amplify.FujitsuDA4Client.SolverTiming:

class ResultΒΆ
__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property messageΒΆ

Returns: str:

property qubo_solutionΒΆ

Returns: amplify.FujitsuDA4Client.QuboSolutionList:

property statusΒΆ

Returns: amplify.FujitsuDA4Client.JobStatus:

class SolverTimingΒΆ
__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property solve_timeΒΆ

Returns: datetime.timedelta:

property total_elapsed_timeΒΆ

Returns: datetime.timedelta:

__init__(self) NoneΒΆ
__init__(self, token: str = '', type_id: str | None = None, url: str = '', proxy: str | None = None) None
Parameters:
  • token (str) – Defaults to ''.

  • type_id (str | None) – Defaults to None.

  • url (str) – Defaults to ''.

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

__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

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:

cancel_job(self, job_id: str) JobStatusΒΆ
Parameters:

job_id (str)

Return type:

JobStatus

delete_job_result(self, job_id: str) ResultΒΆ
Parameters:

job_id (str)

Return type:

Result

get_job_result(self, job_id: str) ResultΒΆ
Parameters:

job_id (str)

Return type:

Result

get_jobs(self) list[JobStatusInfo]ΒΆ
Return type:

list[JobStatusInfo]

health_check(self) CommonError | NoneΒΆ
Return type:

CommonError | None

solve(
self,
objective: Poly | Matrix,
dry_run: Literal[False] = False,
retry_after_delete: bool = True,
delete_after_solve: bool = True,
) ResultΒΆ
solve(
self,
constraint: Constraint | ConstraintList,
dry_run: Literal[False] = False,
retry_after_delete: bool = True,
delete_after_solve: bool = True,
) Result
solve(
self,
objective: Poly | Matrix,
constraint: Constraint | ConstraintList,
dry_run: Literal[False] = False,
retry_after_delete: bool = True,
delete_after_solve: bool = True,
) Result
solve(
self,
objective: Poly | Matrix,
dry_run: Literal[True],
retry_after_delete: bool = True,
delete_after_solve: bool = True,
) None
solve(
self,
constraint: Constraint | ConstraintList,
dry_run: Literal[True],
retry_after_delete: bool = True,
delete_after_solve: bool = True,
) None
solve(
self,
objective: Poly | Matrix,
constraint: Constraint | ConstraintList,
dry_run: Literal[True],
retry_after_delete: bool = True,
delete_after_solve: bool = True,
) None

solve

Overload 1.

Args:
  • objective (amplify.Poly | amplify.Matrix)

  • dry_run (typing.Literal[False]): Defaults to False.

  • retry_after_delete (bool): Defaults to True.

  • delete_after_solve (bool): Defaults to True.

Returns:

amplify.FujitsuDA4Client.Result:

Overload 2.

Args:
  • constraint (amplify.Constraint | amplify.ConstraintList)

  • dry_run (typing.Literal[False]): Defaults to False.

  • retry_after_delete (bool): Defaults to True.

  • delete_after_solve (bool): Defaults to True.

Returns:

amplify.FujitsuDA4Client.Result:

Overload 3.

Args:
  • objective (amplify.Poly | amplify.Matrix)

  • constraint (amplify.Constraint | amplify.ConstraintList)

  • dry_run (typing.Literal[False]): Defaults to False.

  • retry_after_delete (bool): Defaults to True.

  • delete_after_solve (bool): Defaults to True.

Returns:

amplify.FujitsuDA4Client.Result:

Overload 4.

Args:
  • objective (amplify.Poly | amplify.Matrix)

  • dry_run (typing.Literal[True])

  • retry_after_delete (bool): Defaults to True.

  • delete_after_solve (bool): Defaults to True.

Overload 5.

Args:
  • constraint (amplify.Constraint | amplify.ConstraintList)

  • dry_run (typing.Literal[True])

  • retry_after_delete (bool): Defaults to True.

  • delete_after_solve (bool): Defaults to True.

Overload 6.

Args:
  • objective (amplify.Poly | amplify.Matrix)

  • constraint (amplify.Constraint | amplify.ConstraintList)

  • dry_run (typing.Literal[True])

  • retry_after_delete (bool): Defaults to True.

  • delete_after_solve (bool): Defaults to True.

property acceptable_degreesΒΆ

Returns: amplify.AcceptableDegrees:

property parametersΒΆ

Returns: amplify.FujitsuDA4Client.Parameters:

property proxyΒΆ

Returns: str | None:

property set_inequalitiesΒΆ

Returns: bool:

property set_one_way_one_hot_groupsΒΆ

Returns: bool:

property set_penalty_binary_polynomialΒΆ

Returns: bool:

property set_two_way_one_hot_groupsΒΆ

Returns: bool:

property tokenΒΆ

Returns: str:

property type_idΒΆ

Returns: str | None:

property urlΒΆ

Returns: str:

property versionΒΆ

Returns: str:

property write_request_dataΒΆ

Returns: pathlib.Path | None:

property write_response_dataΒΆ

Returns: pathlib.Path | None: