Solvers Resources¶
solver resources represent resources that run a problem.
SAPI Endpoints¶
The following table provides an overview of the SAPI URLs that map to solver resources.
URL |
Method |
Reference |
---|---|---|
/solvers/remote/ |
GET |
|
/solvers/remote/<solver_id>/ |
GET |
Solver Properties¶
Property |
Description |
---|---|
description |
Description of the solver. |
property |
Solver properties such as supported problem types, active qubits, active couplers, total number of qubits, and so on. |
id |
Unique ID of the solver. |
For details on solver types, solver properties, and the problem-solving parameters that are supported by the different solver types, see the Solver Properties and Parameters Reference.
List Solvers¶
Request¶
Retrieve the list of supported remote solvers by sending an HTTP GET request to $SAPI_HOME/solvers/
.
Note
The solvers that are available vary by region.
This example uses curl
to retrieve the list of remote solvers:
curl -H "X-Auth-Token: $SAPI_TOKEN" $SAPI_HOME/solvers/remote
Response¶
The system responds with 200 OK
and returns list of solvers formatted as a JSON list.
Example of the output:
[
{
"properties": {
"supported_problem_types": ["qubo", "ising"],
"qubits": [ ... ],
"couplers": [ ... ],
"num_qubits": 512
}
"id": "Solver 1",
"description": "Solver #1"
},
{
"properties": {
"supported_problem_types": ["ising"],
"qubits": [ ... ],
"couplers": [ ... ],
"num_qubits": 512
}
"id": "Solver 2",
"description": "Solver #2"
}
]
Get Solver Configuration¶
Request¶
Retrieve the configuration of a solver by sending an HTTP GET request to $SAPI_HOME/solvers/
.
This example uses curl
to retrieve the configuration of a remote solver:
curl -H "X-Auth-Token: $SAPI_TOKEN" $SAPI_HOME/solvers/remote/solver1
Response¶
The system returns solver configuration formatted as a JSON object.
Example of the output:
{
"properties": {
"supported_problem_types": ["qubo", "ising"],
"qubits": [ ... ],
"couplers": [ ... ],
"num_qubits": 512
}
"id": "solver1",
"description": "solver1"
}
The properties
attribute holds the solver properties such as number of active qubits and couplers.
Response codes are as follows:
Response Code |
Meaning |
---|---|
|
Success |
|
Solver with specified |
|
Number of API requests exceeds the permitted limit. |