Skip to content

Commit

Permalink
Derive from BaseSamplerV1 rather than BaseSampler (Qiskit#2199)
Browse files Browse the repository at this point in the history
This change is in accordance with the following warning
that is triggered by the Qiskit 1.2 rc:

> qiskit_aer/primitives/sampler.py:69: DeprecationWarning: The class ``qiskit.primitives.base.base_sampler.BaseSampler`` is deprecated as of qiskit 1.2. It will be removed no earlier than 3 months after the release date. The `BaseSampler` class is a type alias for the `BaseSamplerV1` interface that has been deprecated in favor of explicitly versioned interface classes. It is recommended to migrate all implementations to use `BaseSamplerV2`. However, for implementations incompatible with `BaseSamplerV2`, `BaseSampler` can be replaced with the explicitly versioned `BaseSamplerV1` class.

Co-authored-by: Jun Doi <[email protected]>
  • Loading branch information
garrison and doichanj authored Aug 13, 2024
1 parent ad7b86f commit 2825e1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qiskit_aer/primitives/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
from qiskit.circuit import ParameterExpression, QuantumCircuit
from qiskit.compiler import transpile
from qiskit.exceptions import QiskitError
from qiskit.primitives import BaseSampler, SamplerResult
from qiskit.primitives import BaseSamplerV1, SamplerResult
from qiskit.primitives.utils import final_measurement_mapping, init_circuit
from qiskit.result import QuasiDistribution

from .. import AerSimulator


class Sampler(BaseSampler):
class Sampler(BaseSamplerV1):
"""
Aer implementation of Sampler class.
Expand Down

0 comments on commit 2825e1f

Please sign in to comment.