FujitsuDA4Client

class FujitsuDA4Client

ベースクラス: AmplifyClient

Methods

__init__

__init__

async_solve

async_solve

cancel_job

cancel_job

delete_job_result

delete_job_result

get_job_result

get_job_result

get_jobs

get_jobs

health_check

health_check

solve

solve

Attributes

acceptable_degrees

acceptable_degrees property

parameters

parameters property

proxy

proxy property

set_inequalities

set_inequalities property

set_one_way_one_hot_groups

set_one_way_one_hot_groups property

set_penalty_binary_polynomial

set_penalty_binary_polynomial property

set_two_way_one_hot_groups

set_two_way_one_hot_groups property

token

token property

type_id

type_id property

url

url property

version

version property

write_request_data

write_request_data property

write_response_data

write_response_data property

class CommonError
__init__(*args, **kwargs)
__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

str

property code

code property

戻り値の型:

int

property message

message property

戻り値の型:

str

property title

title property

戻り値の型:

str

class JobStatus

ベースクラス: Enum

__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

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

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

str

property job_id

job_id property

戻り値の型:

str

property job_status

job_status property

戻り値の型:

JobStatus

property start_time

start_time property

戻り値の型:

datetime

class Parameters
__init__(*args, **kwargs)
__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

str

property gs_cutoff

gs_cutoff property

戻り値の型:

int | None

property gs_level

gs_level property

戻り値の型:

int | None

property internal_penalty

internal_penalty property

戻り値の型:

int | None

property max_penalty_coef

max_penalty_coef property

戻り値の型:

int | None

property num_group

num_group property

戻り値の型:

int | None

property num_output_solution

num_output_solution property

戻り値の型:

int | None

property num_run

num_run property

戻り値の型:

int | None

property one_hot_cutoff

one_hot_cutoff property

戻り値の型:

int | None

property one_hot_level

one_hot_level property

戻り値の型:

int | None

property penalty_auto_mode

penalty_auto_mode property

戻り値の型:

int | None

property penalty_coef

penalty_coef property

戻り値の型:

int | None

property penalty_inc_rate

penalty_inc_rate property

戻り値の型:

int | None

property target_energy

target_energy property

戻り値の型:

float | None

property time_limit_sec

time_limit_sec property

戻り値の型:

timedelta | None

class Progress
__init__(*args, **kwargs)
__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

str

property energy

energy property

戻り値の型:

float

property penalty_energy

penalty_energy property

戻り値の型:

float

property time

time property

戻り値の型:

timedelta

QuboResponse

:py:class:`~amplify.FujitsuDA4Client.Result`の別名です。

class QuboSolution
__init__(*args, **kwargs)
__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

str

property configuration

configuration property

戻り値の型:

dict[str, bool]

property energy

energy property

戻り値の型:

float

property frequency

frequency property

戻り値の型:

int

property penalty_energy

penalty_energy property

戻り値の型:

float

class QuboSolutionList
__init__(*args, **kwargs)
__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

str

property progress

progress property

戻り値の型:

list[Progress]

property result_status

result_status property

戻り値の型:

bool

property solutions

solutions property

戻り値の型:

list[QuboSolution]

property timing

timing property

戻り値の型:

SolverTiming

class Result
__init__(*args, **kwargs)
__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

str

property message

message property

戻り値の型:

str

property qubo_solution

qubo_solution property

戻り値の型:

QuboSolutionList

property status

status property

戻り値の型:

JobStatus

class SolverTiming
__init__(*args, **kwargs)
__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

str

property solve_time

solve_time property

戻り値の型:

timedelta

property total_elapsed_time

total_elapsed_time property

戻り値の型:

timedelta

__init__(self) None
__init__(self, token: str = '', type_id: str | None = None, url: str = '', proxy: str | None = None) None

__init__

パラメータ:
  • token (str) -- Defaults to ''.

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

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

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

__repr__(self) str

__repr__

戻り値の型:

str

__str__(self) str

__str__

戻り値の型:

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

cancel_job

パラメータ:

job_id (str)

戻り値の型:

JobStatus

delete_job_result(self, job_id: str) Result

delete_job_result

パラメータ:

job_id (str)

戻り値の型:

Result

get_job_result(self, job_id: str) Result

get_job_result

パラメータ:

job_id (str)

戻り値の型:

Result

get_jobs(self) list[JobStatusInfo]

get_jobs

戻り値の型:

list[JobStatusInfo]

health_check(self) CommonError | None

health_check

戻り値の型:

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

acceptable_degrees property

戻り値の型:

AcceptableDegrees

property parameters

parameters property

戻り値の型:

Parameters

property proxy

proxy property

戻り値の型:

str | None

property set_inequalities

set_inequalities property

戻り値の型:

bool

property set_one_way_one_hot_groups

set_one_way_one_hot_groups property

戻り値の型:

bool

property set_penalty_binary_polynomial

set_penalty_binary_polynomial property

戻り値の型:

bool

property set_two_way_one_hot_groups

set_two_way_one_hot_groups property

戻り値の型:

bool

property token

token property

戻り値の型:

str

property type_id

type_id property

戻り値の型:

str | None

property url

url property

戻り値の型:

str

property version

version property

戻り値の型:

str

property write_request_data

write_request_data property

戻り値の型:

Path | None

property write_response_data

write_response_data property

戻り値の型:

Path | None