amplify.client.FujitsuDA3SolverClient

class FujitsuDA3SolverClient

ベースクラス: pybind11_builtins.pybind11_object

A client class for using the Fujitsu Digital Annealer V3 in Fixstars Amplify SDK.

__init__(self: amplify.client.FujitsuDA3SolverClient, token: str = '', url: str = '', proxy: str = '')None

Methods

__init__(self, token, url, proxy)

solve(*args, **kwargs)

Overloaded function.

Attributes

num_bits

The number of available variables in Fujitsu Digital Annealer V3, which is 100000.

parameters

The parameters for FujitsuDA3Solver FujitsuDA3SolverClientParameters

proxy

The address of a proxy server.

set_penalty_binary_polynomial

When set to True, PenaltyBinaryPolynomial is used to handle a problem with constraints.

token

Authentication token for Fujitsu Digital Annealer V3.

url

The endpoint url for Fujitsu Digital Annealer V3.

version

The version of FujitsuDA3SolverClient of Fixstars Amplify SDK.

property num_bits

The number of available variables in Fujitsu Digital Annealer V3, which is 100000.

property parameters

The parameters for FujitsuDA3Solver FujitsuDA3SolverClientParameters

property proxy

The address of a proxy server. The address of proxy server can be set or read from this attribute.

Type

str

property set_penalty_binary_polynomial

When set to True, PenaltyBinaryPolynomial is used to handle a problem with constraints. If set to False, constraint terms are converted to a penalty function and added to the input polynomial model. The default value is set to False.

Type

bool

solve(*args, **kwargs)

Overloaded function.

  1. solve(self: amplify.client.FujitsuDA3SolverClient, arg0: amplify.BinaryPoly) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

  2. solve(self: amplify.client.FujitsuDA3SolverClient, arg0: amplify.BinaryIntPoly) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

  3. solve(self: amplify.client.FujitsuDA3SolverClient, arg0: amplify.IsingPoly) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

  4. solve(self: amplify.client.FujitsuDA3SolverClient, arg0: amplify.IsingIntPoly) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

  5. solve(self: amplify.client.FujitsuDA3SolverClient, matrix: amplify.BinaryMatrix, constant: float = 0.0) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

  6. solve(self: amplify.client.FujitsuDA3SolverClient, matrix: amplify.BinaryIntMatrix, constant: int = 0) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

  7. solve(self: amplify.client.FujitsuDA3SolverClient, matrix: amplify.IsingMatrix, constant: float = 0.0) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

  8. solve(self: amplify.client.FujitsuDA3SolverClient, matrix: amplify.IsingIntMatrix, constant: int = 0) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

Solves a given polynomial or matrix model.

Overloads

  1. solve(poly)
  2. solve(matrix, constant)
パラメータ
戻り値

The result class of FujitsuDA3Solver client is returned.

戻り値の型

FujitsuDA3SolverClientResult

Example

from amplify import BinarySymbolGenerator
from amplify.client import FujitsuDA3SolverClient

gen = BinarySymbolGenerator()
q = gen.array(4)
f = 2 * q[0] * q[1] - q[2] * q[3] + 1

client = FujitsuDA3SolverClient()
client.token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
client.parameters.time_limit_sec = 1

result = client.solve(f)
>>> f
2 q_0 q_1 - q_2 q_3 + 1
>>> [f"energy = {s.energy}, q = {q.decode(s.values)}" for s in result]
['energy = 0.0, q = [1. 0. 1. 1.]',
 'energy = 0.0, q = [0. 1. 1. 1.]',
 'energy = 0.0, q = [0. 0. 1. 1.]',
 'energy = 1.0, q = [0. 0. 0. 0.]']
  1. solve(self: amplify.client.FujitsuDA3SolverClient, arg0: amplify.IsingPoly, arg1: amplify.IsingConstraints) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

  2. solve(self: amplify.client.FujitsuDA3SolverClient, arg0: amplify.BinaryPoly, arg1: amplify.BinaryConstraints) -> qubo::client::ClientResult<qubo::client::FujitsuDA3Client<qubo::client::DA3SolverClientParameters>, decltype(nullptr)>

property token

Authentication token for Fujitsu Digital Annealer V3.

Type

str

property url

The endpoint url for Fujitsu Digital Annealer V3.

Type

str

property version

The version of FujitsuDA3SolverClient of Fixstars Amplify SDK.