Skip to main content

Toshiba

SQBM+ πŸ”— is an optimization solution derived from the Simulated Bifurcation Machine, a combinatorial optimization solver built on the Simulated Bifurcation Algorithm developed by Toshiba Corporation.

Latest Version​

The latest version of the Toshiba optimization solution is 2.1.0.

Solvers​

Loading optimization backends...

Quadratic Unconstrained Binary Optimization (QUBO)​

import strangeworks as sw
from strangeworks_optimization import StrangeworksOptimizer
from strangeworks_optimization_models.parameter_models import ToshibaParameterModel
from dimod import BinaryQuadraticModel

sw.authenticate(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 = ToshibaParameterModel(algo=0, maxout=100, loops=10)

solver = "toshiba.qubo"

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

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

results = so.results(sw_job.slug)

Polynomial Unconstrained Binary Optimization (PUBO)​

QPLIB files can also be used to encode PUBO problems. PUBO stands for Polynomial Unconstrained Binary Optimization.


import strangeworks as sw
from strangeworks_optimization import StrangeworksOptimizer
from strangeworks_optimization_models.parameter_models import ToshibaParameterModel
from strangeworks_optimization_models.problem_models import QplibFile

sw.authenticate(api_key)

options = ToshibaParameterModel(algo=0, maxout=100, loops=10)

solver = "toshiba.pubo"

model = QplibFile.read_file("path/to/qplib/file.qplib")

so = StrangeworksOptimizer(
model=model,
solver=solver,
options=options)

sw_job = so.run()

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

results = so.results(sw_job.slug)

Matrix Market​

Matrix Market is a NIST-sponsored repository of test matrices for use in numerical algorithms.

You can download Matrix Market files from the Matrix Market website.

import strangeworks as sw
from strangeworks_optimization import StrangeworksOptimizer
from strangeworks_optimization_models.parameter_models import ToshibaParameterModel
from strangeworks_optimization_models.problem_models import MatrixMarket

sw.authenticate(api_key)

options = ToshibaParameterModel(algo=0, maxout=100, loops=10)

solver = "toshiba.qubo"

model = MatrixMarket.read_file("path/to/matrixmarket/file.txt")

so = StrangeworksOptimizer(
model=model,
solver=solver,
options=options)

sw_job = so.run()

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

results = so.results(sw_job.slug)

QPLIB​

The QPLIB solver uses a specialized format that differs from the standard QPLIB specification. Standard QPLIB files from the ZIB collection may not be compatible with Toshiba's implementation.

import strangeworks as sw
from strangeworks_optimization import StrangeworksOptimizer
from strangeworks_optimization_models.parameter_models import ToshibaParameterModel
from strangeworks_optimization_models.problem_models import QplibFile

sw.authenticate(api_key)

options = ToshibaParameterModel(algo=0, maxout=100, loops=10)
solver = "toshiba.qplib"

model = QplibFile.read_file("path/to/qplib/file.qplib")

so = StrangeworksOptimizer(
model=model,
solver=solver,
options=options)

sw_job = so.run()

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

results = so.results(sw_job.slug)

Parameters​

from strangeworks_optimization_models.parameter_models import ToshibaParameterModel

options = ToshibaParameterModel(.....)

The ToshibaParameterModel is designed to configure the parameters for the SQBM+. For detailed information on each parameter and how to set them up for your specific optimization problems, please refer to the official User Manual for SQBM+ AWS AMI v2.0.1.

ParameterTypeDefaultDescription
stepsint0Specify 'steps' as described in the Computation structure of the SQBM+ computation API. The value 0 (zero) means auto step specification, where the SQBM+ computation API automatically changes the number of 'steps' each time it finds a solution. Specify an integer between 0 and 100,000,000.
loopsint0Specify 'loops' as described in the Computation structure of the SQBM+ computation API. If 0 (zero) is specified, 'loops' is set to 100,000,000. Specify an integer between 0 and 100,000,000.
timeoutint10 secondsSpecify the maximum computation time (timeout) in seconds. The default value can be modified using the system configuration file.
maxwaitint60 secondsSpecify the maximum waiting time in seconds for each computation request. A computation request accepted by the API server waits in a queue for the preceding requests to be completed. If the specified maximum waiting time elapses during this wait, the computation request ends with a timeout error. Specify a value greater than 0 and less than or equal to 100,000. The default value can be modified using the system configuration file.
targetfloatunspecifiedIf the parameter 'target' is specified, computation will stop when the evaluation value of the objective function reaches 'target'. If 0 (zero) is specified for 'loops', solving will be repeated either until the objective function reaches the value specified in 'target' or until a timeout occurs.
maxoutint1Specify the upper limit of the number of solutions to be outputted. Until the limit specified by 'maxout' is reached, the SQBM+ computation API outputs the obtained solutions in descending order of the value of the objective function. Specify an integer equal to or greater than one.
algointSpecifies the algorithm to be used.
dtfloatSpecifies the time per step.
CfloatCorresponds to the constant ΞΎ0, appearing in the paper by Goto, Tatsumura, & Dixon (2019, p. 2), which is the theoretical basis of SQBM+.
blocksintSpecify the number of blocks of GPUs used to find a solution. If 0 (zero) is specified, the value of 'blocks' will be auto-adjusted. Specify an integer between 0 and 40.
multishotint0When you specify multishot, SQBM+ will get multiple solutions, which start from different initial decision variable values but other parameters are the same. The number of solutions is the multishot number. Default value is 0, which automatically decides multishot from problem size. If multishot > 1, SQBM+ will have less overhead. Specify an integer between 0 and 10.

QPLIB Parameters​

from strangeworks_optimization_models.parameter_models import ToshibaParameterModel

options = ToshibaParameterModel(.....)
ParameterTypeDescription
PD3OrateintParameter that determines the number of PD3O algorithm execution steps. SQBM+ searches for solutions using the SB algorithm, but if PD3Orate is set to anything other than 0, it also searches for solutions using another algorithm (called the PD3O algorithm). For the steps of the SB algorithm, the PD3O algorithm performs PD3Orate*steps times to update decision variables.
phifloatParameters that determine the behavior of the PD3O algorithm. Specify a real number between 0 and 1. If it is close to 0, it behaves like the SB algorithm. If it is close to 1, it narrows the search range of solutions, but it may find a better solution than the SB algorithm.