Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

ManagedResults

class ManagedResults(job_set, backend_name, success)

GitHub

Bases: object

Results managed by the Job Manager.

This class is a wrapper around the Result class and provides the same methods. Please refer to the Result class for more information on the methods.

ManagedResults constructor.

Parameters

  • job_set (ManagedJobSet) – Managed job set for these results.
  • backend_name (str) – Name of the backend used to run the experiments.
  • success (bool) – True if all experiments were successful and results available. False otherwise.

backend_name

Name of the backend used to run the experiments.

success

Whether all experiments were successful.


Methods

combine_results

ManagedResults.combine_results()

Combine results from all jobs into a single Result.

Note

Since the order of the results must match the order of the initial experiments, job results can only be combined if all jobs succeeded.

Return type

Result

Returns

A Result object that contains results from

all jobs.

Raises

IBMQManagedResultDataNotAvailable – If results cannot be combined because some jobs failed.

data

ManagedResults.data(experiment)

Get the raw data for an experiment.

Parameters

experiment (Union[str, QuantumCircuit, Schedule, int]) –

Retrieve result for this experiment. Several types are accepted for convenience:

  • str: The name of the experiment.
  • QuantumCircuit: The name of the circuit instance will be used.
  • Schedule: The name of the schedule instance will be used.
  • int: The position of the experiment.

Return type

Dict

Returns

Refer to the Result.data() for information on return data.

Raises

get_counts

ManagedResults.get_counts(experiment)

Get the histogram data of an experiment.

Parameters

experiment (Union[str, QuantumCircuit, Schedule, int]) – Retrieve result for this experiment, as specified by data().

Return type

Dict[str, int]

Returns

Refer to the Result.get_counts() for information on return data.

Raises

get_memory

ManagedResults.get_memory(experiment)

Get the sequence of memory states (readouts) for each shot. The data from the experiment is a list of format [‘00000’, ‘01000’, ‘10100’, ‘10100’, ‘11101’, ‘11100’, ‘00101’, …, ‘01010’]

Parameters

experiment (Union[str, QuantumCircuit, Schedule, int]) – Retrieve result for this experiment, as specified by data().

Return type

Union[list, ndarray]

Returns

Refer to the Result.get_memory() for information on return data.

Raises

get_statevector

ManagedResults.get_statevector(experiment, decimals=None)

Get the final statevector of an experiment.

Parameters

  • experiment (Union[str, QuantumCircuit, Schedule, int]) – Retrieve result for this experiment, as specified by data().
  • decimals (Optional[int]) – The number of decimals in the statevector. If None, skip rounding.

Return type

List[complex]

Returns

Refer to the Result.get_statevector() for information on return data.

Raises

get_unitary

ManagedResults.get_unitary(experiment, decimals=None)

Get the final unitary of an experiment.

Parameters

  • experiment (Union[str, QuantumCircuit, Schedule, int]) – Retrieve result for this experiment, as specified by data().
  • decimals (Optional[int]) – The number of decimals in the unitary. If None, skip rounding.

Return type

List[List[complex]]

Returns

Refer to the Result.get_unitary() for information on return data.

Raises

Was this page helpful?
Report a bug or request content on GitHub.