About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
SamplerPubResult
class qiskit.primitives.SamplerPubResult(data, metadata=None)
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)
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.