Fujitsu¶
Fujitsu DA4 Solver¶
Fujitsu DA4 is Fujitsu’s QUBO solver with the 4th-generation Digital Annealing Unit (DAU (GPU)).
- Solver specification:
Client class
API method
REST API (JSON)
API reference
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
Specify the type ID when using the Premium API.
Pass the penalty function weight setting for the constraint to the
penalty_binary_polynomial
parameter if set toTrue
(default:True
). If set toFalse
, the penalty function is added to the objective function.Pass a first-order inequality constraint to the
inequalities
parameter (default:True
) if set toTrue
.
If set toFalse
, a penalty function for the inequality constraint is generated and processed according toset_penalty_binary_polynomial
.If set to
True
, detect one-hot constraints from the beginning of the decision variables as much as possible and pass them to theone_way_one_hot_groups
parameter (default:False
).
If set toFalse
, or if the one-hot constraints cannot be passed to the parameter, penalty functions are generated and processed according toset_penalty_binary_polynomial
.If set to
True
, detect equally spacedone_way_one_hot_groups
, and if additional one-hot constraints can be added that satisfy thetwo_way_one_hot_groups
condition, they are detected and passed to thetwo_way_one_hot_groups
parameter (default:False
).
If set toFalse
, or if no one-hot constraints can be passed to the parameter, penalty functions are generated and processed according toset_penalty_binary_polynomial
.
If set toTrue
at the same time asset_one_way_one_hot_groups
,two_way_one_hot_groups
detection is prioritized.Method
Return type
Details
Query the health check API and check if the solver is working properly. Returns
None
if normal.Execute the
/async/qubo/solve
API asynchronously and return the job ID.Obtain a list of job statuses.
Attempt to abort a job by specifying its job ID
Obtain the completed result by specifying the job ID.
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 ofasync_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 Model, VariableGenerator, solve # 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)
Perform health check API:
>>> client.health_check()
Obtain a list of jobs:
>>> client.get_jobs() [FujitsuDA4ClientJobStatusInfo({"job_id":"...","job_status":"Done","start_time":"..."}), FujitsuDA4ClientJobStatusInfo({"job_id":"...","job_status":"Done","start_time":"..."}) ...]
Obtain and delete job result:
>>> client.delete_job_result("...") {"qubo_solution":{"progress":[{"energy":417.0,"penalty_energy":366429644.0,"time":1.179},...
Obtain the solver version:
>>> client.version 'v4'
Obtain detailed execution time:
>>> result.client_result.qubo_solution.timing FujitsuDA4Client.SolverTiming({ "solve_time": 101963.0, "total_elapsed_time": 101963.0 })
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:
Client class
API method
REST API (JSON)
API reference
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.