Skip to content

Commit

Permalink
Avoid 502 error when waiting for IBM Q results, resolves #291 (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgogolin authored and thomashaener committed Jan 11, 2019
1 parent abe86ed commit 04fd0a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projectq/backends/_ibm/_ibm_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _get_result(device, execution_id, access_token, num_retries=3000,
r_json = r.json()
if 'qasms' in r_json:
qasm = r_json['qasms'][0]
if 'result' in qasm:
if 'result' in qasm and qasm['result'] is not None:
return qasm['result']
time.sleep(interval)
if device in ['ibmqx4', 'ibmqx5'] and retries % 60 == 0:
Expand Down

0 comments on commit 04fd0a3

Please sign in to comment.