Metrics
Gets metrics of specified job
Get job metrics as an admin
HTTP Response Status Codes
Status code | Description |
---|---|
200 | Various metrics about the execution of a job |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
Code samples
GET
/admin/jobs/{id}/metricscurl -X GET \
https://api.quantum-computing.ibm.com/runtime/admin/jobs/{id}/metrics \
-H 'Authorization: Bearer YOUR-TOKEN' \
-H 'Accept: application/json'
import requests
response = requests.request(
"GET",
"https://api.quantum-computing.ibm.com/runtime/admin/jobs/{id}/metrics",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
},
)
print(response.json())
Responses
{
"bss": {
"seconds": 1
},
"usage": {
"quantum_seconds": 10,
"seconds": 10
},
"timestamps": {
"created": "2022-06-20T12:55:20.268427Z",
"finished": "2022-06-20T12:55:20.268427Z",
"running": "2022-06-20T12:55:20.268427Z"
},
"executions": 10,
"num_circuits": 10,
"num_qubits": [
1,
2,
3
],
"circuit_depths": [
1,
2,
3
],
"qiskit_version": "0.36.2",
"estimated_start_time": "2022-06-20T12:55:20.268427Z",
"estimated_completion_time": "2022-06-20T12:55:20.268427Z",
"position_in_queue": 10,
"position_in_provider": 10
}
{
"type": "object",
"properties": {
"bss": {
"example": {
"seconds": 1
},
"description": "Contains information about billing metrics",
"allOf": [
{
"type": "object",
"properties": {
"seconds": {
"type": "number",
"example": 10,
"description": "Total billed time for the job - quantum seconds only."
}
}
}
]
},
"usage": {
"example": {
"quantum_seconds": 10,
"seconds": 10
},
"description": "Contains information about job usage metrics",
"allOf": [
{
"type": "object",
"properties": {
"quantum_seconds": {
"type": "number",
"example": 10,
"format": "int64",
"description": "Total quantum seconds used by the instance"
},
"seconds": {
"type": "number",
"example": 10,
"description": "Total billed time for the job - quantum seconds only."
}
}
}
]
},
"timestamps": {
"example": {
"created": "2022-06-20T12:55:20.268427Z",
"finished": "2022-06-20T12:55:20.268427Z",
"running": "2022-06-20T12:55:20.268427Z"
},
"description": "A map of status transitions to timestamps",
"allOf": [
{
"type": "object",
"properties": {
"created": {
"type": "string",
"example": "2022-06-20T12:55:20.268427Z",
"description": "Timestamp of when the job create request was received"
},
"finished": {
"type": "string",
"example": "2022-06-20T12:55:20.268427Z",
"description": "Timestamp of when the job finished"
},
"running": {
"type": "string",
"example": "2022-06-20T12:55:20.268427Z",
"description": "Timestamp of when the job started running"
}
}
}
]
},
"executions": {
"type": "number",
"example": 10,
"description": "Number of executions during job"
},
"num_circuits": {
"type": "number",
"example": 10,
"description": "Number of circuits executed on quantum backend"
},
"num_qubits": {
"example": [
1,
2,
3
],
"description": "Number of qubits on quantum backend",
"type": "array",
"items": {
"type": "string"
}
},
"circuit_depths": {
"example": [
1,
2,
3
],
"description": "An array of circuit depths",
"type": "array",
"items": {
"type": "string"
}
},
"qiskit_version": {
"type": "string",
"example": "0.36.2",
"description": "Qiskit version used during execution of the job"
},
"estimated_start_time": {
"type": "string",
"example": "2022-06-20T12:55:20.268427Z",
"description": "UTC timestamp for when the job will start"
},
"estimated_completion_time": {
"type": "string",
"example": "2022-06-20T12:55:20.268427Z",
"description": "UTC timestamp for when the job will complete"
},
"position_in_queue": {
"type": "number",
"example": 10,
"description": "Current position of job in queue"
},
"position_in_provider": {
"type": "number",
"example": 10,
"description": "Current position of job in provider"
}
},
"required": [
"timestamps"
]
}
Was this page helpful?
Report a bug or request content on GitHub.