Shortcuts

qiskit.providers.ibmq.managed.ManagedResults

class ManagedResults(job_set, backend_name, success)[source]

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.

__init__(job_set, backend_name, success)[source]

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

__init__(job_set, backend_name, success)

ManagedResults constructor.

combine_results()

Combine results from all jobs into a single Result.

data(experiment)

Get the raw data for an experiment.

get_counts(experiment)

Get the histogram data of an experiment.

get_memory(experiment)

Get the sequence of memory states (readouts) for each shot.

get_statevector(experiment[, decimals])

Get the final statevector of an experiment.

get_unitary(experiment[, decimals])

Get the final unitary of an experiment.

combine_results()[source]

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(experiment)[source]

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(experiment)[source]

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(experiment)[source]

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(experiment, decimals=None)[source]

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(experiment, decimals=None)[source]

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
You are viewing lang: English
Languages
English
Japanese
German
Korean