Skip to main content

Fujitsu

The Fujitsu Digital Annealer provides an alternative to quantum computing technology, which is at present both very expensive and difficult to run.

Solver

ModelsBackend
BQM, FujitsuModelListfujitsu.DA3

FujitsuParameterModel

Parameters:

  • time_limit_sec (int) - Maximum running time of DA in seconds (int64 type) (Default: 10). Specifies the upper limit of running time from 1 to 3600.
  • target_energy (float) - Threshold energy for fast exit (double type) (Default: disabled). Specifies the target energy value. If not specified, the calculation will be performed without setting the target energy value. When the minimum energy value reaches the target energy value, the calculation is terminated even if the running time does not reach the upper limit time.
  • num_run (int) - The number of parallel attempts of each groups (int64 type) (Default: 16). Specifies the number of parallel attempts from 1 to 1024.
  • num_group (int) - The number of groups of parallel attempts (int64 type) (Default: 1). Specifies the number of groups of parallel attempts from 1 to 16.
  • num_output_solution (int) - The number of output solutions of each groups (int64 type) (Default: 5). Specifies the number of output solutions from 1 to 1024.
  • gs_level (int) - Level of the global search (int64 type) (Default: 5). Specifies the level of the global search from 0 to 100.
  • gs_cutoff (int) - Global search cutoff level (int64 type) (Default: 8000). Specifies the convergence judgment level for global search constraint usage search from 0 to 1000000.
  • one_hot_level (int) - Level of the 1hot constraint search (int64 type) (Default: 3). Specifies the level of 1hot constraint search from 0 to 100.
  • one_hot_cutoff (int) - Level of the convergence for 1hot constraint search (int64 type) (Default: 100). Specifies the convergence level for 1hot constraint search from 0 to 1000000.
  • internal_penalty (int) - Mode of 1hot constraint internal generation (int64 type) (Default: 0). Specifies the 1hot constraint internal generation mode from 0 or 1.
  • penalty_auto_mode (int) - Coefficient adjustment mode (int64 type) (Default: 1). Specifies the coefficient adjustment mode for constraint terms from 0 to 10000.
  • penalty_coef (int) - Coefficient of the constraint term (int64 type) (Default: 1). Specifies the coefficient of the constraint term from 1 to 9223372036854775807.
  • penalty_inc_rate (int) - Parameters for automatic adjustment of constraint terms (int64 type) (Default: 150). Specifies the parameter for automatic adjustment of the constraint term in the global search from 100 to 200.
  • max_penalty_coef (int) - Maximum constraint term coefficent (int64 type) (Default: 0). Specifies the maximum constraint term coefficent from 0 to 9223372036854775807.
  • guidance_config (dict) - Initial value of each variable ("uint32 type":boolean type). Specifies an initial value for each polynomial (problem) variable that is set to find an optimal solution.
  • fixed_config (dict) - Fixed value of each variable ("uint32 type":boolean type). Specifies a fixed value for each polynomial (problem) variable that is set to find an optimal solution.
  • one_way_one_hot_groups (dict) - Specifies the number of variables in each group of one-way one-hot constraints. When one_way_one_hot_groups is specified, search for the solution with one "True" value among the variables in the same group.
  • two_way_one_hot_groups (dict) - Specifies the number of variables in each group of two-way one-hot constraints. When two_way_one_hot_groups is specified, search for the solution with one "True" value among the columns and rows of square consisting of variables of rows and columns in the same group.

Binary Quadratic Model

import strangeworks as sw
from strangeworks_optimization import StrangeworksOptimizer
from strangeworks_optimization_models.parameter_models import (
FujitsuParameterModel
)
from dimod import BinaryQuadraticModel

sw.authenticate('your-api-key')

linear = {1: -2, 2: -2, 3: -3, 4: -3, 5: -2}
quadratic = {(1, 2): 2, (1, 3): 2, (2, 4): 2, (3, 4): 2, (3, 5): 2, (4, 5): 2}
model = BinaryQuadraticModel(linear, quadratic, "BINARY")

options = FujitsuParameterModel(
time_limit_sec=1, penalty_coef=10000
)

solver = "fujitsu.DA3"

optimizer = StrangeworksOptimizer(model=model, solver=solver, options=options)
sw_job = optimizer.run()

print(f"Job slug: {sw_job.slug}")
print(f"Job status: {optimizer.status(sw_job.slug)}")

results = optimizer.results(sw_job.slug)

Fujitsu Native Dictionary

For more information see: https://portal.aispf.global.fujitsu.com/apidoc/da/jp/api-ref/da-qubo-v3c-en.html.

import strangeworks as sw
from strangeworks_optimization import StrangeworksOptimizer
from strangeworks_optimization_models.parameter_models import (
FujitsuParameterModel
)
from strangeworks_optimization_models.problem_models import FujitsuModelList

sw.authenticate('your-api-key')

model = FujitsuModelList(
{
"terms": [
{"coefficient": 2, "polynomials": [1, 2]},
{"coefficient": -4, "polynomials": [2, 4]},
{"coefficient": -3, "polynomials": []},
]
}
)

options = FujitsuParameterModel(
time_limit_sec=1, penalty_coef=10000
)

solver = "fujitsu.DA3"

optimizer = StrangeworksOptimizer(model=model, solver=solver, options=options)
sw_job = optimizer.run()

print(f"Job slug: {sw_job.slug}")
print(f"Job status: {optimizer.status(sw_job.slug)}")

results = optimizer.results(sw_job.slug)