French
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

BaseSampler

class BaseSampler(circuits: Iterable[QuantumCircuit] | QuantumCircuit | None = None, parameters: Iterable[Iterable[Parameter]] | None = None, **kwargs)[source]

Bases : BasePrimitive

Sampler base class

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

Paramètres
  • circuits – Quantum circuits to be executed.

  • parameters – Parameters of each of the quantum circuits. Defaults to [circ.parameters for circ in circuits].

  • options – Default options.

Lève

ValueError – For mismatch of circuits and parameters list.

Methods

close

Close the session and free resources

run

Run the job of the sampling of bitstrings.

set_options

Set options values for the estimator.

Attributes

circuits

Quantum circuits to be sampled.

Renvoie

The quantum circuits to be sampled.

options

Return options values for the estimator.

Type renvoyé

Options

Renvoie

options

parameters

Parameters of quantum circuits.

Renvoie

List of the parameters in each quantum circuit.