62 lines
2.2 KiB
Plaintext
62 lines
2.2 KiB
Plaintext
---
|
||
title: EstimatorResult
|
||
description: API reference for qiskit.primitives.EstimatorResult
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.primitives.EstimatorResult
|
||
---
|
||
|
||
# EstimatorResult
|
||
|
||
<Class id="qiskit.primitives.EstimatorResult" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.25/qiskit/primitives/base/estimator_result.py" signature="qiskit.primitives.EstimatorResult(values, metadata)" modifiers="class">
|
||
Bases: `BasePrimitiveResult`
|
||
|
||
Result of Estimator.
|
||
|
||
```python
|
||
result = estimator.run(circuits, observables, params).result()
|
||
```
|
||
|
||
where the i-th elements of `result` correspond to the circuit and observable given by `circuits[i]`, `observables[i]`, and the parameter values bounds by `params[i]`. For example, `results.values[i]` gives the expectation value, and `result.metadata[i]` is a metadata dictionary for this circuit and parameters.
|
||
|
||
**Parameters**
|
||
|
||
* **values** (*np.ndarray*) – The array of the expectation values.
|
||
* **metadata** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")*]*) – List of the metadata.
|
||
|
||
## Attributes
|
||
|
||
### experiments
|
||
|
||
<Attribute id="qiskit.primitives.EstimatorResult.experiments">
|
||
Experiment data dicts in any inheriting result dataclass.
|
||
</Attribute>
|
||
|
||
### num\_experiments
|
||
|
||
<Attribute id="qiskit.primitives.EstimatorResult.num_experiments">
|
||
Number of experiments in any inheriting result dataclass.
|
||
</Attribute>
|
||
|
||
### values
|
||
|
||
<Attribute id="qiskit.primitives.EstimatorResult.values" attributeTypeHint="np.ndarray[Any, np.dtype[np.float64]]" />
|
||
|
||
### metadata
|
||
|
||
<Attribute id="qiskit.primitives.EstimatorResult.metadata" attributeTypeHint="list[dict[str, Any]]" />
|
||
|
||
## Methods
|
||
|
||
### decompose
|
||
|
||
<Function id="qiskit.primitives.EstimatorResult.decompose" signature="decompose()">
|
||
Generate single experiment result objects from self.
|
||
|
||
**Return type**
|
||
|
||
[*Iterator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator "(in Python v3.12)")\[*BasePrimitiveResult*]
|
||
</Function>
|
||
</Class>
|
||
|