Skip to main content
IBM Quantum Platform
이 페이지는 Qiskit SDK의 이전 버전입니다. 최신 버전으로 이동

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

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.