统一入口只有两个函数:submit_task(circuit, backend="dummy:local:simulator", shots=1024) 把线路交给 backend 指定的后端并立刻返回任务号(执行是异步的),wait_for_result(task_id) 持号等待,返回 UnifiedResult。输出摘录为 UnifiedResult(counts={'00': 512, '11': 512}, probabilities={'00': 0.5, '11': 0.5}, shots=1024, ...),字段之间有确定的换算关系:$\hat{p}(\text{'00'}) = 512/1024 = 0.5$、$\hat{p}(\text{'11'}) = 512/1024 = 0.5$,且 $\sum_x \hat{p}(x) = 0.5+0.5 = 1$——归一化是判断程序出错的第一道检查线。counts 的键是二进制串,probabilities 即 counts/shots,另有 shots、platform、task_id 等元信息。换到真实芯片只需改 backend 字符串,代码与后处理一字不动(token 配置见第 11 课)。