Skip to main contentIBM Quantum Documentation

SamplerPubResult

class qiskit.primitives.SamplerPubResult(data, metadata=None)

GitHub

Bases: PubResult

Result of Sampler Pub.

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.


Methods

join_data

join_data(names=None)

GitHub

Join data from many registers into one data container.

Data is joined along the bits axis. For example, for BitArray data, this corresponds to bitstring concatenation.

Parameters

names (Iterable[str] | None) – Which registers to join. Their order is maintained, for example, given ["alpha", "beta"], the data from register alpha is placed to the left of the data from register beta. When None is given, this value is set to the ordered list of register names, which will have been preserved from the input circuit order.

Returns

Joint data.

Raises

  • ValueError – If specified names are empty.
  • ValueError – If specified name does not exist.
  • TypeError – If specified data comes from incompatible types.

Return type

BitArray | np.ndarray

Was this page helpful?
Report a bug or request content on GitHub.