German
Sprachen
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)[Quellcode]

Bases: BasePrimitive

Sampler base class

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

Parameter
  • 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.

Verursacht

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.

Rückgabe

The quantum circuits to be sampled.

options

Return options values for the estimator.

Rückgabetyp

Options

Rückgabe

options

parameters

Parameters of quantum circuits.

Rückgabe

List of the parameters in each quantum circuit.