Qiskit primitives

class qiskit_aqt_provider.primitives.sampler.AQTSampler[source]

Bases: BaseSamplerV2

A sampler primitive for AQT backends.

__init__(*, backend: CloudResource | OfflineSimulatorResource | DirectAccessResource, options: dict[str, Any] | None = None) → None[source]

Initialize the sampler with the given AQT backend.

run(pubs: Iterable[SamplerPubLike], *, shots: int | None = None) → BasePrimitiveJob[PrimitiveResult[SamplerPubResult]][source]

Run the given sampler PUBs on the AQT backend.

Parameters:
  • pubs (Iterable) – An iterable of sampler PUBs, which may include parameterized circuits and associated parameter values.

  • shots (int | None) – The number of shots to use for each circuit. Defaults to None.

Returns:

A job representing the execution of the sampler PUBs.

Return type:

qiskit.primitives.BasePrimitiveJob[qiskit.primitives.PrimitiveResult[qiskit.primitives.SamplerPubResult]]

class qiskit_aqt_provider.primitives.estimator.AQTEstimator[source]

Bases: BaseEstimatorV2

BaseEstimatorV2 primitive for AQT backends.

As circuit transpilation for AQT backends includes angle wrapping, the transpilation needs to be done after parameter binding. In order for the AQTEstimator to support parameterized circuits, it needs to transpile circuits when it is run.

Providing options to the AQTEstimator on instantiation will affect all circuit evaluations. Setting options on the backend has the same effect. Passing options in AQTEstimator.run restricts the effect to that evaluation.

__init__(*, backend: CloudResource | OfflineSimulatorResource | DirectAccessResource, options: dict[str, Any] | None = None) → None[source]
run(pubs: Iterable[EstimatorPubLike], *, precision: float | None = None) → BasePrimitiveJob[PrimitiveResult[PubResult]][source]

Run the given estimator PUBs on the AQT backend.

Parameters:
  • pubs (Iterable) – An iterable of estimator PUBs, which may include parameterized circuits and associated parameter values.

  • precision (float | None) – The precision to use for the estimation. Defaults to None.

Returns:

A job representing the execution of the estimator PUBs.

Return type:

qiskit.primitives.BasePrimitiveJob[qiskit.primitives.PrimitiveResult[qiskit.primitives.PubResult]]