I follow qiskit tutorial "Portfolio optimization". When I executed this cell, I encounter the attribute error as the title(picture showed below). enter image description here

Do anyone know how to fix this problem? It seems like the problem is inside the package, so I have no idea...

  • 4
    $\begingroup$ I’m voting to close this question because I think that technical Qiskit questions such as this should be issues on Qiskit's GitHub. $\endgroup$ – Cryoris Jun 28 at 14:47

As the error message stated, QuantumInstance has no attribute name.

What it has is backend and from backend you can retrieve name.

For example:

quantum_instance = QuantumInstance(backend=Aer.get_backend('statevector_simulator'))

will printout:


and if you do


it will printout


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