Skip to main contentIBM Quantum Documentation

AI Clifford methods


Get available backends

Gets the list of backends the user can work with

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

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

Responses

[
  "example"
]

Synthesize Clifford circuit

Returns a task ID; use the '/clifford/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 reinforcement learning (RL) model checks the result before returning a response.

Default value: false
n_steps
integer

The number of attempts (steps) that the RL model should perform to find the best synthesized circuit. More steps could give a better result (not guaranteed) but it will take more time.

keep_layout
boolean

Default value: true

Body Parameters (application/json)

Name, TypeDescription
clifford_dict
Required

Dict that represents a Clifford operator

Example: {"destabilizer":["+IIXXX","+IIXXI","+IXXXI","+IXIXI","+XIIII"],"stabilizer":["+IIIIZ","+IZIZZ","+IZZZI","+IIZZI","+ZIIII"]}
coupling_map
integer[][] | null

A list of pairs that represents physical links between qubits. Must be specified if the query parameter `backend` is not set.

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

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

POST
/clifford/synthesize
curl -X POST \
  https://cloud-transpiler.quantum.ibm.com/clifford/synthesize \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"clifford_dict":{"destabilizer":["+IIXXX","+IIXXI","+IXXXI","+IXIXI","+XIIII"],"stabilizer":["+IIIIZ","+IZIZZ","+IZZZI","+IIZZI","+ZIIII"]}}'

Responses

{
  "task_id": "example"
}

Get synthesis result

Gets a task synthesis result. The Task ID needed for this endpoint is returned by /clifford/synthesize

Path Parameters

Name, TypeDescription
task_id
Required
string

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

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

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

Responses

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

Get available topologies

Gets the list of available topologies for synthesis + transpiling the user can work with

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

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

Responses

[
  "example"
]

Transpile a Clifford circuit

Returns a task ID; use the '/clifford/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
clifford_dict
Required

Dict that represents a Clifford operator

Example: {"destabilizer":["+IIXXX","+IIXXI","+IXXXI","+IXIXI","+XIIII"],"stabilizer":["+IIIIZ","+IZIZZ","+IZZZI","+IIZZI","+ZIIII"]}
Example: [{"destabilizer":["+IIXXX","+IIXXI","+IXXXI","+IXIXI","+XIIII"],"stabilizer":["+IIIIZ","+IZIZZ","+IZZZI","+IIZZI","+ZIIII"]},{"destabilizer":["+IIXXX","+IIXXI","+IXXXI","+IXIXI","+XIIII"],"stabilizer":["+IIIIZ","+IZIZZ","+IZZZI","+IIZZI","+ZIIII"]}]
qargs
Required
integer[][] | integer[]

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

A list of pairs that represents physical links between qubits. Must be specified if the query parameter `backend` is not set.

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

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

POST
/clifford/transpile
curl -X POST \
  https://cloud-transpiler.quantum.ibm.com/clifford/transpile \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"clifford_dict":{"destabilizer":["+IIXXX","+IIXXI","+IXXXI","+IXIXI","+XIIII"],"stabilizer":["+IIIIZ","+IZIZZ","+IZZZI","+IIZZI","+ZIIII"]},"qargs":[0,1,2,3,4]}'

Responses

{
  "task_id": "example"
}

Get transpilation result

Gets a task transpilation result. The Task ID needed for this endpoint is returned by /clifford/transpile

Path Parameters

Name, TypeDescription
task_id
Required
string

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

HTTP Response Status Codes

Status codeDescription
200Successful Response
422Validation Error

Code samples

GET
/clifford/transpile/{task_id}
curl -X GET \
  https://cloud-transpiler.quantum.ibm.com/clifford/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.