Submit Quantum Chip Computing Task

URL: https://xxx.com/task/realQuantum/run

Submit computing tasks to real physical quantum chips. Note: Tasks submitted to the quantum chip must include a Measurement operation.

Request Method: Post

Required Parameters:

  • QProg(str): Quantum circuit;

  • TaskType(int): Task type:

Optional Parameters:

  • Priority(uint): Priority; 0 means normal task (default), larger numbers mean higher priority;

  • ChipID(str): Chip ID used. Currently 72- and 102-qubit chips are provided, default is 72;

  • Configuration(dict): Configurations:

    • shot(uint): Measurement count, default 1000, range 10-20000

    • circuitOptimization(bool): Whether to enable circuit optimization. true enables (default), false disables

Return Values:

  • taskState(str): Task status:

  • taskId(str): Task ID of the submitted task.

Request Examples:

1. Normal Measurement Task:

{
  "token": "c3f7fe35-xxxx-xxxx-a178-070cc311d03b",
  "QMachineType": 5,
  "QProg": [
    "QINIT 6\nCREG 6\nH q[0]\nCNOT q[0],q[1]\nMEASURE q[0],c[0]\nMEASURE q[1],c[1]"
  ],
  "ChipID": "72",
  "TaskType": 0,
  "Priority": 0,
  "taskDescribe":"default",
  "Configuration": {
    "shot": 1000,
    "circuitOptimization": True,
    "use_cz_pattern": False,
    "amendFlag": 0,
    "mappingFlag": True,
    "specified_block": [],
    "PointLabel": 1
  }
}

2. Quantum State Tomography Task:

{
  "token": "c3f7fe35-xxxx-xxxx-a178-070cc311d03b",
  "QMachineType": 5,
  "QProg": [
    "QINIT 6\nCREG 6\nH q[0]\nCNOT q[0],q[1]\nMEASURE q[0],c[0]\nMEASURE q[1],c[1]"
  ],
  "ChipID": "72",
  "TaskType": 2,
  "Priority": 0,
  "Configuration": {
    "shot": 1000,
    "circuitOptimization": True,
    "use_cz_pattern": False,
    "amendFlag": 0,
    "mappingFlag": True,
    "specified_block": [],
    "PointLabel": 1
  }
}

3. Distributed Task:

{
    "QMachineType": 5,
    "ChipID": "72",
    "TaskType": 10,
    "token": "c3f7fe35-xxxx-xxxx-a178-070cc311d03b",
    "QProg": [
        "QINIT 6\nCREG 6\nRY(q[0], 0.162461319481123)\nRY(q[1], 1.13411443752956)\nRY(q[2], 0.349219035305167)\nCNOT(q[0], q[1])\nRY(q[0], -1.30314609114098)\nRY(q[1], -0.000403011347911202)\nCNOT(q[1], q[2])\nRY(q[1], -0.0668867624864373)\nRY(q[2], 0.751632608892654)\nCNOT(q[2], q[0])\nRY(q[2], 0.943957761048972) \nRY(q[0], 0.877382733682492)\nCNOT(q[2], q[0])\nCNOT(q[1], q[2])\nCNOT(q[0], q[1])"
    ],
    "Configuration": {
        "shot": 1000,
        "mappingFlag": true,
        "construction_type" : 0,
        "max_supported_qubits" : 2
    }
}

4. Expectation Task:

{
    "token": "c3f7fe35-xxxx-xxxx-a178-070cc311d03b",
    "QMachineType": 5,
    "QProg": ["QINIT 6\nCREG 6\nH q[0]\nCNOT q[0],q[1]"],
    "ChipID": "72",
    "TaskType": 5,
    "Configuration": {
        "shot": 1000,
        "circuitOptimization": True,
        "hamiltonian": "\"\": -1.0534210769165204,\"Z0\": 0.394844363355904,\"Z1\": -0.39484436335590417,\"Z0 Z1\": -0.01124615715082114,\"X0 X1\": 0.18121046201519694"
    }
}

Response Example:

{
    "taskId": "098D12FE69184646BF16DDF53930C569",
    "taskState": 1
}