Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

সতর্কতা

The package qiskit-ibmq-provider is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide

IBMQJobManager

class IBMQJobManager[source]

Bases: object

Job Manager for IBM Quantum Experience.

The Job Manager is a higher level mechanism for handling jobs composed 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')

The run() method returns a ManagedJobSet instance, which represents the set of jobs for the experiments. You can use the ManagedJobSet methods, such as statuses(), results(), and 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.

The job_set_id() method of ManagedJobSet returns the job set ID, which can be used to retrieve the job set later:

job_set_id = job_set_foo.job_set_id()
retrieved_foo = job_manager.retrieve_job_set(job_set_id=job_set_id, provider=provider)

IBMQJobManager constructor.

Methods

job_sets

Return job sets being managed in this session, subject to optional filtering.

report

Return a report on the statuses of all jobs managed by this Job Manager.

retrieve_job_set

Retrieve a previously submitted job set.

run

Execute a set of circuits or pulse schedules on a backend.