Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- from qiskit.backends.ibmq import IBMQProvider
- # Create a job for the "ibmqx4" online IBM Q backend
- ibmq_provider = IBMQProvider('TOKEN_FOR_IBMQ')
- backend = ibmq_provider.get_backend('ibmqx4')
- # Run the job - note that this call is async, and execution continues.
- job = backend.run(q_job)
- # Perform instructions while waiting for the job to finish.
- while not job.done:
- print('Waiting for job %s ...' % job.job_id)
- if job.queued:
- print('Job is queued.')
- elif job.running:
- print('Job is running')
- time.sleep(10)
- result = job.result()
- counts = result.get_counts()
- print(counts)
Add Comment
Please, Sign In to add comment