Sampler¶
- class Sampler(*, backend_options=None, transpile_options=None, run_options=None, skip_transpilation=False)[fuente]¶
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.
Nota
Precedence of seeding is as follows:
seed_simulator
in runtime (i.e. in__call__()
)seed
in runtime (i.e. in__call__()
)seed_simulator
ofbackend_options
.default.
- Parámetros
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 the session and free resources
Run the job of the sampling of bitstrings.
Set options values for the estimator.
Attributes
- circuits¶
Quantum circuits to be sampled.
- Devuelve
The quantum circuits to be sampled.
- parameters¶
Parameters of quantum circuits.
- Devuelve
List of the parameters in each quantum circuit.