Skip to main contentIBM Quantum Documentation
This page is from the dev version of Qiskit SDK. Go to the stable version

BaseSampler

class qiskit.primitives.BaseSampler(*, options=None)

GitHub

Bases: BaseSamplerV1[T]

DEPRECATED. Type alias for Sampler V1 base class

See BaseSamplerV1 for details.

Deprecated since version 1.2

The class qiskit.primitives.base.base_sampler.BaseSampler is deprecated as of Qiskit 1.2. It will be removed no earlier than 3 months after the release date. The BaseSampler class is a type alias for the BaseSamplerV1 interface that has been deprecated in favor of explicitly versioned interface classes. It is recommended to migrate all implementations to use BaseSamplerV2. However, for implementations incompatible with BaseSamplerV2, BaseSampler can be replaced with the explicitly versioned BaseSamplerV1 class.

Parameters

options (dict | None) – Default options.


Attributes

options

Return options values for the estimator.

Returns

options


Methods

run

run(circuits, parameter_values=None, **run_options)

GitHub

Run the job of the sampling of bitstrings.

Parameters

  • circuits (QuantumCircuit | Sequence[QuantumCircuit]) – One of more circuit objects.
  • parameter_values (Sequence[float] | Sequence[Sequence[float]] | None) – Parameters to be bound to the circuit.
  • run_options – Backend runtime options used for circuit execution.

Returns

The job object of the result of the sampler. The i-th result corresponds to circuits[i] evaluated with parameters bound as parameter_values[i].

Raises

ValueError – Invalid arguments are given.

Return type

T

set_options

set_options(**fields)

GitHub

Set options values for the estimator.

Parameters

**fields – The fields to update the options

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