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?
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