After installing qiskit-terra via git (pip install qiskit), all python programs involving the line from qiskit import BasicAer do not run.


 from qiskit import *

 q = QuantumRegister(2)

 c = ClassicalRegister(2)

 qc = QuantumCircuit(q,c)


<qiskit.extensions.standard.h.HGate object at 0x7f6a146ee7f0>


<qiskit.extensions.standard.cx.CnotGate object at 0x7f6a146ee940>


<qiskit.circuit.instructionset.InstructionSet object at 0x7f6a146eea58>

 backend_sim = Aer.get_backend('qasm_smulator')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'Aer' is not defined
  • $\begingroup$ Thanks for the question. I'm interested to know where you found the code that uses BasicAer? $\endgroup$ Dec 18, 2018 at 10:52

1 Answer 1


What was Aer in 0.6 is being renamed BasicAer in 0.7. The Aer name will then be used for a larger and fancier simulation package.

Since the current stable version is 0.6.1, your pip install will have given you that version of Terra. So you can simply replace each instance of BasicAer with Aer for now.

If you want to get 0.7 already, you can install with

pip install git+https://github.com/Qiskit/qiskit-terra.git

but it should also be moved to stable very soon.

  • $\begingroup$ Thanks. Renaming module BasicAer into Aer and inside the python program – BasicAer.get_backend("qasm_simulator") into Aer.get_backend("qasm_simulator") now it works! Is it the only "insider" point? $\endgroup$
    – Holger
    Dec 18, 2018 at 12:02
  • $\begingroup$ @Holger If this answer addressed your question sufficiently, please consider accepting it by clicking the check mark on the left. $\endgroup$ Dec 18, 2018 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.