Can't import Aer from Qiskit

103 Views Asked by At

When running the following code:

from qiskit import Aer

I encountered the following error:

ImportError
Traceback (most recent call last)
Cell In[50], line 1
----> 1 from qiskit import Aer

ImportError: cannot import name 'Aer' from 'qiskit'

Why is that the case?

1

There are 1 best solutions below

0
Tristan Nemoz On BEST ANSWER

The qiskit.Aer object has been deprecated in Qiskit 1.0. You have to install the qiskit-aer package like this:

pip install qiskit-aer

and then simply modify your code into:

from qiskit_aer import Aer