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
BinaryQuadraticModel, FujitsuModelListfujitsu.DA3

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)

FujitsuParameterModel

ParameterDescriptionTypeDefaultRange
time_limit_secMaximum running time of DA in secondsint101 to 3600
target_energyThreshold energy for fast exitfloatdisabled-
num_runThe number of parallel attempts of each groupint11 to 16
num_output_solutionThe number of output solutions of each groupint51 to 1024
gs_levelLevel of the global searchint50 to 100
gs_cutoffGlobal search cutoff levelint80000 to 1000000
one_hot_levelLevel of the 1hot constraint searchint30 to 100
one_hot_cutoffLevel of the convergence for 1hot constraint searchint1000 to 1000000
internal_penaltyMode of 1hot constraint internal generationint00 or 1
penalty_auto_modeCoefficient adjustment modeint10 to 10000
penalty_coefCoefficient of the constraint termint11 to 9223372036854775807
penalty_inc_rateParameters for automatic adjustment of constraint termsint150100 to 200
max_penalty_coefMaximum constraint term coefficientint00 to 9223372036854775807
guidance_configInitial value of each variabledict--
fixed_configFixed value of each variabledict--
one_way_one_hot_groupsNumber of variables in each group of one-way one-hot constraintsdict--
two_way_one_hot_groupsNumber of variables in each group of two-way one-hot constraintsdict--