Skip to main content
IBM Quantum Platform
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

BaseSampler

class BaseSampler(circuits, parameters=None)

GitHub

Bases: abc.ABC

Sampler base class

Base class of Sampler that calculates quasi-probabilities of bitstrings from quantum circuits.

Parameters

  • circuits – quantum circuits to be executed
  • parameters – parameters of quantum circuits Defaults to [circ.parameters for circ in circuits]

Raises

QiskitError – for mismatch of circuits and parameters list.


Methods

close

abstract BaseSampler.close()

Close the session and free resources


Attributes

circuits

Quantum circuits

Returns

quantum circuits

parameters

Parameters of quantum circuits

Returns

Parameter list of the quantum circuits

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