PubResult
class qiskit.primitives.PubResult(data, metadata=None)
Bases: object
The result object for a single pub (primitive unified bloc).
Each PubResult is a single element of a greater PrimitiveResult. Within this result, there is implementation-defined freeform metadata, and a DataBin in the data field.
Most likely, you care about accessing the processed data of your execution. This is in the data attribute. The metadata object may contain extra information about the execution of this pub, including implementation-specific information, which should be documented by your primitive provider (as opposed to PrimitiveResult.metadata, which is metadata about the entire submission).
You typically get instances of this class by iterating over or indexing into a PrimitiveResult, which is what you get from MyPritimive().run().result().
Initialize a pub result.
Parameters
- data (DataBin) – Result data.
- metadata (dict[str, Any] | None) – Metadata specific to this pub. Keys are expected to be strings.
Attributes
data
Result data for the pub.
metadata
Metadata for the pub.