Job Manager for IBM Quantum Experience.
The Job Manager is a higher level mechanism for handling
jobscomposed of multiple circuits or pulse schedules. It splits the experiments into multiple jobs based on backend restrictions. When the jobs are finished, it collects and presents the results in a unified view.
You can use the
run()method to submit multiple experiments with the Job Manager:
from qiskit import IBMQ, transpile from qiskit.providers.ibmq.managed import IBMQJobManager from qiskit.circuit.random import random_circuit provider = IBMQ.load_account() backend = provider.get_backend('ibmq_qasm_simulator') # Build a thousand circuits. circs =  for _ in range(1000): circs.append(random_circuit(num_qubits=5, depth=4, measure=True)) # Need to transpile the circuits first. circs = transpile(circs, backend=backend) # Use Job Manager to break the circuits into multiple jobs. job_manager = IBMQJobManager() job_set_foo = job_manager.run(circs, backend=backend, name='foo')
run()method returns a
ManagedJobSetinstance, which represents the set of jobs for the experiments. You can use the
ManagedJobSetmethods, such as
error_messages()to get a combined view of the jobs in the set. For example:
results = job_set_foo.results() results.get_counts(5) # Counts for experiment 5.
job_set_id = job_set_foo.job_set_id() retrieved_foo = job_manager.retrieve_job_set(job_set_id=job_set_id, provider=provider)
Return job sets being managed in this session, subject to optional filtering.
Return a report on the statuses of all jobs managed by this Job Manager.
Retrieve a previously submitted job set.
Execute a set of circuits or pulse schedules on a backend.