BaseSampler#

class qiskit.primitives.BaseSampler(*, options=None)[소스]#

기반 클래스: BasePrimitive, Generic[T]

Sampler base class

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

매개변수:

options – Default options.

Attributes

circuits#

Quantum circuits to be sampled.

반환:

The quantum circuits to be sampled.

options#

Return options values for the estimator.

반환:

options

parameters#

Parameters of quantum circuits.

반환:

List of the parameters in each quantum circuit.

Methods

run(circuits, parameter_values=None, **run_options)[소스]#

Run the job of the sampling of bitstrings.

매개변수:
  • circuits (QuantumCircuit | Sequence[QuantumCircuit]) – One of more circuit objects.

  • parameter_values (Sequence[float] | Sequence[Sequence[float]] | None) – Parameters to be bound to the circuit.

  • run_options – Backend runtime options used for circuit execution.

반환:

The job object of the result of the sampler. The i-th result corresponds to circuits[i] evaluated with parameters bound as parameter_values[i].

예외 발생:

ValueError – Invalid arguments are given.

반환 형식:

T

set_options(**fields)#

Set options values for the estimator.

매개변수:

**fields – The fields to update the options