38 lines
1.7 KiB
Plaintext
38 lines
1.7 KiB
Plaintext
---
|
||
title: SamplerResult (v1.2)
|
||
description: API reference for qiskit.primitives.SamplerResult in qiskit v1.2
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.primitives.SamplerResult
|
||
---
|
||
|
||
# SamplerResult
|
||
|
||
<Class id="qiskit.primitives.SamplerResult" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/primitives/base/sampler_result.py#L26-L45" signature="qiskit.primitives.SamplerResult(quasi_dists, metadata)" modifiers="class">
|
||
Bases: `_BasePrimitiveResult`
|
||
|
||
Result of Sampler V1.
|
||
|
||
```python
|
||
result = sampler.run(circuits, params).result()
|
||
```
|
||
|
||
where the i-th elements of `result` correspond to the circuit given by `circuits[i]`, and the parameter values bounds by `params[i]`. For example, `results.quasi_dists[i]` gives the quasi-probabilities of bitstrings, and `result.metadata[i]` is a metadata dictionary for this circuit and parameters.
|
||
|
||
**Parameters**
|
||
|
||
* **quasi\_dists** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*QuasiDistribution*](qiskit.result.QuasiDistribution "qiskit.result.QuasiDistribution")*]*) – List of the quasi-probabilities.
|
||
* **metadata** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")*]*) – List of the metadata.
|
||
|
||
## Attributes
|
||
|
||
### quasi\_dists
|
||
|
||
<Attribute id="qiskit.primitives.SamplerResult.quasi_dists" attributeTypeHint="list[qiskit.result.distributions.quasi.QuasiDistribution]" />
|
||
|
||
### metadata
|
||
|
||
<Attribute id="qiskit.primitives.SamplerResult.metadata" attributeTypeHint="list[dict[str, Any]]" />
|
||
</Class>
|
||
|