Query Task

URL: https://xxx.com/management/query/taskinfo

Query previously submitted tasks to return their execution status and related information. If the task is completed, the task result is also returned.

Request Method: Post

Required Parameters:

  • taskid(str): Task ID

  • token(str): Identity Token

Return Values:

  • taskId(str): Task ID

  • TaskType(int): Task type

  • taskState(uint): Task status

  • qProgLength(uint): Number of quantum circuits

  • qProg(arr[str]): Quantum circuit details

  • taskResult(str): Quantum task execution result

Request Example:

{
    "taskid":"098D12FE69184646BF16DDF53930C569",
    "token":"c3f7fe35-xxxx-xxxx-a178-070cc311d03b"
}

Response Example:

{
    "taskId": "098D12FE69184646BF16DDF53930C569",
    "TaskType": 1,
    "taskState": 3,
    "qProgLength": 1,
    "without_compensate_prog": "",
    "qProg": [
        "QINIT 4\nCREG 4\nH q[0]\nMEASURE q[0],c[0]"
    ],
    "taskResult": "[{\"key\":[\"0x0\", \"0x1\"],\"value\":[0.52, 0.48]}]"
}