ToshibaSQBM2ClientΒΆ
- class ToshibaSQBM2ClientΒΆ
Bases:
BaseClientClient for TOSHIBA SQBM+, a solver that runs the Simulated Bifurcation Machine algorithm.
Methods
Send the objective function and the constraints to the solver.
Attributes
Degrees of the polynomial that the solver accepts.
Whether the client compresses the body of the request.
Format of the objective function in the request.
Parameters that the client sends with every request.
URL of the proxy that the client goes through, or
Nonefor no proxy.API token of the user.
URL of the service that the client sends to.
Version of the service.
Path of the file that receives a copy of the request, or
Noneto write none.Path of the file that receives a copy of the response, or
Noneto write none.- class ParametersΒΆ
Parameters that the client sends with every request.
- __init__(*args, **kwargs)ΒΆ
- property CΒΆ
- property HMCstepsΒΆ
- property HMCweightΒΆ
- property PD3OrateΒΆ
- property algoΒΆ
- property algosΒΆ
- property blocksΒΆ
- property detail_levelΒΆ
- property detail_logΒΆ
- property dtΒΆ
- property loopsΒΆ
- property maxoutΒΆ
- property maxwaitΒΆ
- property multishotΒΆ
- property phiΒΆ
- property stepsΒΆ
- property targetΒΆ
- property timeoutΒΆ
- class ResultΒΆ
Bases:
SolutionRaw response that the solver returned.
- __init__(*args, **kwargs)ΒΆ
- property countΒΆ
- property idΒΆ
- property messageΒΆ
- property othersΒΆ
- property paramΒΆ
- property resultΒΆ
- property runsΒΆ
- property timeΒΆ
- property valueΒΆ
- property waitΒΆ
- class SolutionΒΆ
- __init__(*args, **kwargs)ΒΆ
- property countΒΆ
- property paramΒΆ
- property resultΒΆ
- property valueΒΆ
- class SolverΒΆ
Bases:
Enum- classmethod __contains__(value)ΒΆ
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the clsβs members. 3) value is a pseudo-member (flags)
- classmethod __getitem__(name)ΒΆ
Return the member matching name.
- classmethod __iter__()ΒΆ
Return members in definition order.
- classmethod __len__()ΒΆ
Return the number of members (no aliases)
- Pubo = 2ΒΆ
- Qplib = 1ΒΆ
- Qubo = 0ΒΆ
- __members__ = mappingproxy({'Qubo': ToshibaSQBM2ClientSolver.Qubo, 'Qplib': ToshibaSQBM2ClientSolver.Qplib, 'Pubo': ToshibaSQBM2ClientSolver.Pubo})ΒΆ
- __name__ = 'Solver'ΒΆ
- __nb_enum__ = <capsule object NULL>ΒΆ
- __qualname__ = 'ToshibaSQBM2Client.Solver'ΒΆ
- solve( ) ResultΒΆ
- solve(
- self,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[False] = False,
- solve(
- self,
- objective: Poly | Matrix,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[False] = False,
- solve(self, objective: Poly | Matrix, dry_run: Literal[True]) None
- solve(self, constraint: Constraint | ConstraintList, dry_run: Literal[True]) None
- solve(
- self,
- objective: Poly | Matrix,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[True],
Send the objective function and the constraints to the solver.
This method takes the polynomial that the solver accepts, so it runs no conversion of the model. Use
solve()to solve a model that needs a conversion. It returns the raw response of the solver.Overload 1.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
dry_run (typing.Literal[False]): When
True, ask the service to check the request, and returnNone. Defaults toFalse.
- Returns:
amplify.ToshibaSQBM2Client.Result:
Overload 2.
- Args:
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[False]): When
True, ask the service to check the request, and returnNone. Defaults toFalse.
- Returns:
amplify.ToshibaSQBM2Client.Result:
Overload 3.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[False]): When
True, ask the service to check the request, and returnNone. Defaults toFalse.
- Returns:
amplify.ToshibaSQBM2Client.Result:
Overload 4.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
dry_run (typing.Literal[True]): When
True, ask the service to check the request, and returnNone.
Overload 5.
- Args:
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[True]): When
True, ask the service to check the request, and returnNone.
Overload 6.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[True]): When
True, ask the service to check the request, and returnNone.
- property acceptable_degreesΒΆ
Degrees of the polynomial that the solver accepts.
solve()reads it to decide the conversion of the model.- Return type:
- property compressionΒΆ
Whether the client compresses the body of the request.
Compression costs CPU time and it makes the request smaller.
- Return type:
- property objective_formatΒΆ
Format of the objective function in the request.
See
ObjectiveFormat. The answer does not depend on this choice.- Return type:
- property parametersΒΆ
Parameters that the client sends with every request.
- Return type:
- property proxyΒΆ
URL of the proxy that the client goes through, or
Nonefor no proxy.- Return type:
str | None
- property solverΒΆ
- property tokenΒΆ
API token of the user.
The client needs it for every request. Its text never appears in the output of
repr().- Return type:
- property versionΒΆ
Version of the service.
Reading this property sends a request to the service.
- Return type: