_ibm_http_client.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:ProjectQ 作者: ProjectQ-Framework 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号