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.

Solvers

ModelBackends
BinaryQuadraticModel, MatrixMarkettoshiba.qubo
QplibFiletoshiba.qplib
Polynomial Unconstrained Binary Optimizationtoshiba.pubo

Binary Quadratic Model

import strangeworks as sw
from strangeworks_optimization import StrangeworksOptimizer
from strangeworks_optimization_models.parameter_models import ToshibaParameterModel
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 = 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)

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('your-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

QPLIB is a collection of test problems for quadratic programming (QP) and quadratic unconstrained binary optimization (QUBO).

You can download QPLIB files from the QPLIB 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 QplibFile

sw.authenticate('your-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)

Polynomial Unconstrained Binary Optimization

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('your-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)

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.

ParameterTypeDescription
stepsintSpecifies the number of steps in a computation request.
loopsintSpecifies the number of loops in SQBM+ computation.
timeoutintSpecifies the maximum computation time (timeout) in seconds.
targetfloatSpecifies the end condition of a computation request.
maxoutintSpecifies the upper limit of the number of solutions to be outputted.
maxwaitintSpecifies the upper limit of the number of solutions to be outputted.
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.
multishotintWhen 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 solution is multishot number. Default value is 0, which automatically decide multishot from problem size. If multishot > 1, SQBM+ will have less overhead. Specify an integer between 0 and 10.

QPLIB Solver-specific parameters

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.