French
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

Sampler

class Sampler(*, backend_options=None, transpile_options=None, run_options=None, skip_transpilation=False)[source]

Bases : BaseSampler

Aer implementation of Sampler class.

Run Options
  • shots (None or int) – The number of shots. If None, it calculates the probabilities exactly. Otherwise, it samples from multinomial distributions.

  • seed (int) – Set a fixed seed for seed_simulator. If shots is None, this option is ignored.

Note

Precedence of seeding is as follows:

  1. seed_simulator in runtime (i.e. in __call__())

  2. seed in runtime (i.e. in __call__())

  3. seed_simulator of backend_options.

  4. default.

Paramètres
  • backend_options (dict | None) – Options passed to AerSimulator.

  • transpile_options (dict | None) – Options passed to transpile.

  • run_options (dict | None) – Options passed to run.

  • skip_transpilation (bool) – if True, transpilation is skipped.

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.