223 lines
11 KiB
Plaintext
223 lines
11 KiB
Plaintext
---
|
||
title: ManagedResults (v0.26)
|
||
description: API reference for qiskit.providers.ibmq.managed.ManagedResults in qiskit v0.26
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.providers.ibmq.managed.ManagedResults
|
||
---
|
||
|
||
<span id="qiskit-providers-ibmq-managed-managedresults" />
|
||
|
||
# qiskit.providers.ibmq.managed.ManagedResults
|
||
|
||
<Class id="qiskit.providers.ibmq.managed.ManagedResults" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-ibmq-provider/tree/stable/0.13/qiskit/providers/ibmq/managed/managedresults.py" signature="ManagedResults(job_set, backend_name, success)" modifiers="class">
|
||
Results managed by the Job Manager.
|
||
|
||
This class is a wrapper around the [`Result`](qiskit.result.Result "qiskit.result.Result") class and provides the same methods. Please refer to the [`Result`](qiskit.result.Result "qiskit.result.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
|
||
|
||
<Attribute id="qiskit.providers.ibmq.managed.ManagedResults.backend_name">
|
||
Name of the backend used to run the experiments.
|
||
</Attribute>
|
||
|
||
### success
|
||
|
||
<Attribute id="qiskit.providers.ibmq.managed.ManagedResults.success">
|
||
Whether all experiments were successful.
|
||
</Attribute>
|
||
|
||
### \_\_init\_\_
|
||
|
||
<Function id="qiskit.providers.ibmq.managed.ManagedResults.__init__" signature="__init__(job_set, backend_name, success)">
|
||
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
|
||
|
||
<Attribute id="id0">
|
||
Name of the backend used to run the experiments.
|
||
</Attribute>
|
||
|
||
### success
|
||
|
||
<Attribute id="id1">
|
||
Whether all experiments were successful.
|
||
</Attribute>
|
||
</Function>
|
||
|
||
## Methods
|
||
|
||
| | |
|
||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
||
| [`__init__`](#qiskit.providers.ibmq.managed.ManagedResults.__init__ "qiskit.providers.ibmq.managed.ManagedResults.__init__")(job\_set, backend\_name, success) | ManagedResults constructor. |
|
||
| [`combine_results`](#qiskit.providers.ibmq.managed.ManagedResults.combine_results "qiskit.providers.ibmq.managed.ManagedResults.combine_results")() | Combine results from all jobs into a single Result. |
|
||
| [`data`](#qiskit.providers.ibmq.managed.ManagedResults.data "qiskit.providers.ibmq.managed.ManagedResults.data")(experiment) | Get the raw data for an experiment. |
|
||
| [`get_counts`](#qiskit.providers.ibmq.managed.ManagedResults.get_counts "qiskit.providers.ibmq.managed.ManagedResults.get_counts")(experiment) | Get the histogram data of an experiment. |
|
||
| [`get_memory`](#qiskit.providers.ibmq.managed.ManagedResults.get_memory "qiskit.providers.ibmq.managed.ManagedResults.get_memory")(experiment) | Get the sequence of memory states (readouts) for each shot. |
|
||
| [`get_statevector`](#qiskit.providers.ibmq.managed.ManagedResults.get_statevector "qiskit.providers.ibmq.managed.ManagedResults.get_statevector")(experiment\[, decimals]) | Get the final statevector of an experiment. |
|
||
| [`get_unitary`](#qiskit.providers.ibmq.managed.ManagedResults.get_unitary "qiskit.providers.ibmq.managed.ManagedResults.get_unitary")(experiment\[, decimals]) | Get the final unitary of an experiment. |
|
||
|
||
### combine\_results
|
||
|
||
<Function id="qiskit.providers.ibmq.managed.ManagedResults.combine_results" signature="combine_results()">
|
||
Combine results from all jobs into a single Result.
|
||
|
||
<Admonition title="Note" type="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.
|
||
</Admonition>
|
||
|
||
**Return type**
|
||
|
||
`Result`
|
||
|
||
**Returns**
|
||
|
||
**A [`Result`](qiskit.result.Result "qiskit.result.Result") object that contains results from**
|
||
|
||
all jobs.
|
||
|
||
**Raises**
|
||
|
||
[**IBMQManagedResultDataNotAvailable**](qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable "qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable") – If results cannot be combined because some jobs failed.
|
||
</Function>
|
||
|
||
### data
|
||
|
||
<Function id="qiskit.providers.ibmq.managed.ManagedResults.data" signature="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()`](qiskit.result.Result#data "qiskit.result.Result.data") for information on return data.
|
||
|
||
**Raises**
|
||
|
||
* [**IBMQManagedResultDataNotAvailable**](qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable "qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable") – If data for the experiment could not be retrieved.
|
||
* [**IBMQJobManagerJobNotFound**](qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound "qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound") – If the job for the experiment could not be found.
|
||
</Function>
|
||
|
||
### get\_counts
|
||
|
||
<Function id="qiskit.providers.ibmq.managed.ManagedResults.get_counts" signature="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()`](#qiskit.providers.ibmq.managed.ManagedResults.data "qiskit.providers.ibmq.managed.ManagedResults.data").
|
||
|
||
**Return type**
|
||
|
||
`Dict`\[`str`, `int`]
|
||
|
||
**Returns**
|
||
|
||
Refer to the [`Result.get_counts()`](qiskit.result.Result#get_counts "qiskit.result.Result.get_counts") for information on return data.
|
||
|
||
**Raises**
|
||
|
||
* [**IBMQManagedResultDataNotAvailable**](qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable "qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable") – If data for the experiment could not be retrieved.
|
||
* [**IBMQJobManagerJobNotFound**](qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound "qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound") – If the job for the experiment could not be found.
|
||
</Function>
|
||
|
||
### get\_memory
|
||
|
||
<Function id="qiskit.providers.ibmq.managed.ManagedResults.get_memory" signature="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()`](#qiskit.providers.ibmq.managed.ManagedResults.data "qiskit.providers.ibmq.managed.ManagedResults.data").
|
||
|
||
**Return type**
|
||
|
||
`Union`\[`list`, `ndarray`]
|
||
|
||
**Returns**
|
||
|
||
Refer to the [`Result.get_memory()`](qiskit.result.Result#get_memory "qiskit.result.Result.get_memory") for information on return data.
|
||
|
||
**Raises**
|
||
|
||
* [**IBMQManagedResultDataNotAvailable**](qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable "qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable") – If data for the experiment could not be retrieved.
|
||
* [**IBMQJobManagerJobNotFound**](qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound "qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound") – If the job for the experiment could not be found.
|
||
</Function>
|
||
|
||
### get\_statevector
|
||
|
||
<Function id="qiskit.providers.ibmq.managed.ManagedResults.get_statevector" signature="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()`](#qiskit.providers.ibmq.managed.ManagedResults.data "qiskit.providers.ibmq.managed.ManagedResults.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()`](qiskit.result.Result#get_statevector "qiskit.result.Result.get_statevector") for information on return data.
|
||
|
||
**Raises**
|
||
|
||
* [**IBMQManagedResultDataNotAvailable**](qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable "qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable") – If data for the experiment could not be retrieved.
|
||
* [**IBMQJobManagerJobNotFound**](qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound "qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound") – If the job for the experiment could not be found.
|
||
</Function>
|
||
|
||
### get\_unitary
|
||
|
||
<Function id="qiskit.providers.ibmq.managed.ManagedResults.get_unitary" signature="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()`](#qiskit.providers.ibmq.managed.ManagedResults.data "qiskit.providers.ibmq.managed.ManagedResults.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()`](qiskit.result.Result#get_unitary "qiskit.result.Result.get_unitary") for information on return data.
|
||
|
||
**Raises**
|
||
|
||
* [**IBMQManagedResultDataNotAvailable**](qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable "qiskit.providers.ibmq.managed.IBMQManagedResultDataNotAvailable") – If data for the experiment could not be retrieved.
|
||
* [**IBMQJobManagerJobNotFound**](qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound "qiskit.providers.ibmq.managed.IBMQJobManagerJobNotFound") – If the job for the experiment could not be found.
|
||
</Function>
|
||
</Class>
|
||
|