Skip to main contentIBM Quantum Documentation

AI Permutation methods


Get available backends

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

GET
/permutations/backends
curl -X GET \
  https://cloud-transpiler.quantum.ibm.com/permutations/backends \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

[
  "example"
]

Benchmark AI-powered Permutation pass

Returns a task ID; use the '/permutations/benchmark/{taskId}' endpoint to get the result.

Query Parameters

Name, TypeDescription
model
string

backend
string

The name of the backend. Refer to https://docs.quantum.ibm.com/run/get-backend-information.

Example: "ibm_kyoto"
topology
string

n_steps
integer

The number of attempts (aka steps) that the RL model should perform to find the best synthesized circuit

Body Parameters (application/json)

Name, TypeDescription
permutation
Required
integer[]

Example: [0,1,2,3,4]
coupling_map
integer[][] | null

Example: [[0,1],[1,0],[1,2],[2,1]]

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

POST
/permutations/benchmark
curl -X POST \
  https://cloud-transpiler.quantum.ibm.com/permutations/benchmark \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"permutation":[0,1,2,3,4]}'

Responses

{
  "task_id": "example"
}

Get benchmark result

Path Parameters

Name, TypeDescription
task_id
Required
string

The ID of the benchmark task. This ID is returned by the '/permutations/benchmark' POST endpoint.

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

GET
/permutations/benchmark/{task_id}
curl -X GET \
  https://cloud-transpiler.quantum.ibm.com/permutations/benchmark/{task_id} \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

{
  "state": "example",
  "result": null
}

Synthesize Permutation circuit

Returns a task ID; use the '/permutations/synthesize/{taskId}' endpoint to get the result.

Query Parameters

Name, TypeDescription
model
string

backend
string

The name of the backend. Refer to https://docs.quantum.ibm.com/run/get-backend-information.

topology
string

qubits
integer

check_result
boolean

If true, the RL model will check the result before returning a response

Default value: false
n_steps
integer

The number of attempts (aka steps) that the RL model should perform to find the best synthesized circuit

keep_layout
boolean

Body Parameters (application/json)

Name, TypeDescription
permutation
Required
integer[]

Example: [0,1,2,3,4]
coupling_map
integer[][] | null

Example: [[0,1],[1,0],[1,2],[2,1]]

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

POST
/permutations/synthesize
curl -X POST \
  https://cloud-transpiler.quantum.ibm.com/permutations/synthesize \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"permutation":[0,1,2,3,4]}'

Responses

{
  "task_id": "example"
}

Get synthesis result

Path Parameters

Name, TypeDescription
task_id
Required
string

The ID of the synthesis task. This ID is returned by the '/permutations/synthesize' POST endpoint.

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

GET
/permutations/synthesize/{task_id}
curl -X GET \
  https://cloud-transpiler.quantum.ibm.com/permutations/synthesize/{task_id} \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

{
  "state": "example",
  "result": null
}

Get available topologies

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

GET
/permutations/topologies
curl -X GET \
  https://cloud-transpiler.quantum.ibm.com/permutations/topologies \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

[
  "example"
]

Transpile Permutation circuit(s)

Returns a task ID; use the '/permutations/transpile/{taskId}' endpoint to get the result.

Query Parameters

Name, TypeDescription
backend
string

The name of the backend. Refer to https://docs.quantum.ibm.com/run/get-backend-information.

Example: "ibm_kyoto"

Body Parameters (application/json)

Name, TypeDescription
permutation
Required
integer[][] | integer[]

Example: [[0,1,3,4,2],[1,0,3,4,2]]
Example: [1,0,2,3,4]
qargs
Required
integer[][] | integer[]

Example: [[0,1,2,3,4],[0,1,2,3,4]]
Example: [0,1,2,3,4]
backend_coupling_map
integer[][] | null

Example: [[1,2],[2,1]]

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

POST
/permutations/transpile
curl -X POST \
  https://cloud-transpiler.quantum.ibm.com/permutations/transpile \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"permutation":[[0,1,3,4,2],[1,0,3,4,2]],"qargs":[[0,1,2,3,4],[0,1,2,3,4]]}'

Responses

{
  "task_id": "example"
}

Get transpilation result

Path Parameters

Name, TypeDescription
task_id
Required
string

The ID of the transpilation task. This ID is returned by the '/permutations/transpile' POST endpoint.

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

GET
/permutations/transpile/{task_id}
curl -X GET \
  https://cloud-transpiler.quantum.ibm.com/permutations/transpile/{task_id} \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

{
  "state": "example",
  "result": null
}
Was this page helpful?
Report a bug or request content on GitHub.