def _run(qasm, device, user_id, access_token, shots):
suffix = 'codes/execute'
r = requests.post(urljoin(_api_url, suffix),
data=qasm,
params={"access_token": access_token,
"deviceRunType": device,
"fromCache": "false",
"shots": shots},
headers={"Content-Type": "application/json"})
r.raise_for_status()
r_json = r.json()
execution_id = r_json["id"]
return execution_id
评论列表
文章目录