Skip to content

Commit

Permalink
Update aer check in topological codes (qiskit-community#546)
Browse files Browse the repository at this point in the history
In Qiskit/qiskit#5619 how the qiskit.Aer provider gets loaded will
be changing and it will always be present, not just when Aer is
installed. In the topological codes fitters it was checking for the
presence of Aer using qiskit.Aer which won't continue to work moving
forward. To avoid this potential issue (and potentially unblock
Qiskit/qiskit#5619) this commit switches to using
'from qiskit.providers.aer import Aer' instead which lives in the
qiskit-aer project itself and will always import error if aer isn't
installed.

(cherry picked from commit 2e3298f)
  • Loading branch information
mtreinish committed Feb 8, 2021
1 parent c778762 commit 9aca9be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit/ignis/verification/topological_codes/fitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from qiskit import QuantumCircuit, execute

try:
from qiskit import Aer
from qiskit.providers.aer import Aer
HAS_AER = True
except ImportError:
from qiskit import BasicAer
Expand Down

0 comments on commit 9aca9be

Please sign in to comment.