# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: 'Python 3.8.8 64-bit (''Qiskit_Ocean'': conda)'
#     name: python388jvsc74a57bd0173f2ffbce537830dc37cc01123f1dcc118f483457eee13e6b392e68a5e39cc7
# ---

from qiskit import IBMQ, execute
from qiskit.providers.ibmq.managed import IBMQJobManager
from qiskit.providers.ibmq.job import job_monitor
from qiskit.circuit.random import random_circuit

IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q')
backend = provider.get_backend('simulator_statevector')

# list all jobs which have been executed from our provider in the past
for job in backend.jobs():
    print(job.job_id())
    job_monitor(job)


qc = random_circuit(num_qubits=5, depth=4, measure=True)
qc.draw(output='mpl')

job = execute(qc, backend, shots=4096, job_name="test_job_name", job_tags=["test", "job"])
job_monitor(job)

counts = job.result().get_counts(0)
counts



StarcoderdataJupyterScriptsDedupFiltered