Qiskit Aer import error

I am new to Quantum computing and learning basic programming. I am using IBM Jupyter notebook environment. it was working fine but from last few days it is not able to find Aer in qiskit library, can any one help. here is the error
Traceback (most recent call last):
Cell In[3], line 2
from qiskit import QuantumCircuit, QuantumRegister,
ImportError: cannot import name ‘Aer’ from ‘qiskit’ (/opt/conda/lib/python3.10/site-packages/qiskit/init.py)

Use %tb to get the full traceback.

1 Like

Hi @Pardeep_Sanan. I would suggest you start with the qiskit repo. It looks like there have been several changes in this area the past few weeks and I suspect your deployment was updated.

This is not pertinent to this forum. If in the same environment where your kernel is running, you ran this code in a Python console or in a script that was called from the command line, you’d likely have the same issue. That eliminates Jupyter as the causing factor. (This is a thought experiment to always consider when deciding where to seek help.)

I know things have changed and maybe that is the case and you just need to adjust your code. This issue posted in the qiskit issue dashboard 2 weeks ago shows that Aer is now imported from qiskit_aer. That also involves QuantumCircuit and so I think that is hinting at the direction for updating your code.

from qiskit import QuantumCircuit
from qiskit_aer import Aer
2 Likes

https://qiskit.github.io/qiskit-aer/release_notes.html

on the latest release_notes (as of 17/03/2024):

the official qiskit-aer says :

" 0.13.3

Prelude

Aer 0.13.3 is a minor release to support Qiskit 0.46 and 1.0.

Bug Fixes

  • Fixes test cases failed due to upgrade of Qiskit.Removed importing Aer from qiskit."
1 Like