Fujitsu#

Fujitsu DA4 Sovler#

Fujitsu DA4 is Fujitsu’s QUBO solver with the 4th-generation Digital Annealing Unit (DAU (GPU)).

Solver specification:

Binary variable

Ising variable

Integer variable

Real variable

Objective function

2nd

-

-

-

Equality constraint

*/**

-

-

-

Inequality constraint

1st

-

-

-

*: One-way-one-hot and two-way-one-hot constraints are supported.
**: Can be specified as penalty functions.

Client class:

In addition to the common interface, the client class has the following attributes and methods.

Attribute

Data type

Details

type_id

str | None

Specify the type ID when using the Premium API.

set_penalty_binary_polynomial

bool

Pass the penalty function weight setting for the constraint to the penalty_binary_polynomial parameter if set to True (default: True). If set to False, the penalty function is added to the objective function.

set_inequalities

bool

Pass a first-order inequality constraint to the inequalities parameter (default: True) if set to True.
If set to False, a penalty function for the inequality constraint is generated and processed according to set_penalty_binary_polynomial.

set_one_way_one_hot_groups

bool

If set to True, detect one-hot constraints from the beginning of the decision variables as much as possible and pass them to the one_way_one_hot_groups parameter (default: False).
If set to False, or if the one-hot constraints cannot be passed to the parameter, penalty functions are generated and processed according to set_penalty_binary_polynomial.

set_two_way_one_hot_groups

bool

If set to True, detect equally spaced one_way_one_hot_groups, and if additional one-hot constraints can be added that satisfy the two_way_one_hot_groups condition, they are detected and passed to the two_way_one_hot_groups parameter (default: False).
If set to False, or if no one-hot constraints can be passed to the parameter, penalty functions are generated and processed according to set_penalty_binary_polynomial.
If set to True at the same time as set_one_way_one_hot_groups, two_way_one_hot_groups detection is prioritized.

Method

Return type

Details

health_check()

CommonError | None

Query the health check API and check if the solver is working properly. Returns None if normal.

async_solve()

str

Execute the /async/qubo/solve API asynchronously and return the job ID.

get_jobs()

list[JobStatusInfo]

Obtain a list of job statuses.

cancel_job()

JobStatus

Attempt to abort a job by specifying its job ID

get_job_result()

Result

Obtain the completed result by specifying the job ID.

delete_job_result()

Result

Obtain a completed result and delete the result by specifying the job ID.

Note

solve() in the common interface of the client class is a synchronous version of async_solve(). It waits until the job has completed execution and returns the result of the execution.

Configuration example:
from amplify import FujitsuDA4Client
from datetime import timedelta

client = FujitsuDA4Client()

# Set API token
client.token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Enable detection of one-way one-hot groups
client.set_one_way_one_hot_groups = True

# Set the execution time to 100 seconds
client.parameters.time_limit_sec = timedelta(seconds=100)
Execution example:
from amplify import VariableGenerator, Model

# Create decision variables and the objective function
g = VariableGenerator()
q = g.array("Binary", 2)
f = q[0] * q[1] + q[0] - q[1] + 1

# Create a model
model = Model(f)

# Run a solver
result = solve(model, client)

To perform health check API:

>>> client.health_check()

To retrieve a list of jobs:

>>> client.get_jobs()
[FujitsuDA4ClientJobStatusInfo({"job_id":"...","job_status":"Done","start_time":"..."}),
 FujitsuDA4ClientJobStatusInfo({"job_id":"...","job_status":"Done","start_time":"..."})
 ...]

To obtain and delete job result:

>>> client.delete_job_result("...")
{"qubo_solution":{"progress":[{"energy":417.0,"penalty_energy":366429644.0,"time":1.179},...

To obtain the solver version:

>>> client.version
'v4'

Fujitsu DA3c Solver#

Fujitsu DA3c is Fujitsu’s QUBO solver with the 3rd-generation Digital Annealing Unit (DAU (GPU)).

Note

The client class specification is the same as amplify.FujitsuDA4Client.

Solver specification:

Binary variable

Ising variable

Integer variable

Real variable

Objective function

2nd

-

-

-

Equality constraint

*/**

-

-

-

Inequality constraint

1st

-

-

-

*: One-way-one-hot and two-way-one-hot constraints are supported.
**: Can be specified as penalty functions.