2
$\begingroup$

I 'm trying to reproduce the code given in the Qiskit summer school here.

The code is:

# initialization

import numpy as np

# import Qiskit

from qiskit import IBMQ, BasicAer
from qiskit.providers.ibmq import least_busy
from qiskit import QuantumCircuit, execute
from qiskit.tools.jupyter import *
 provider= iBMQ.load.account()

but I am getting this error:

 NameError                                 Traceback (most recent call last)
 <ipython-input-9-5e15427b4944> in <module>
  9 from qiskit import QuantumCircuit, execute
  10 from qiskit.tools.jupyter import *
  ---> 11 provider= iBMQ.load.account()
  12 
  13 #import basic plot tools

  NameError: name 'iBMQ' is not defined

The same question was asked so I tried the answer to install IBM Q provider using the command

  pip install qiskit-ibmq-provider 

but still I am getting the same error.

My python version is 3.8.3 and qiskit version is '0.16.0'

   {'qiskit-terra': '0.16.0',
   'qiskit-aer': '0.7.0',
   'qiskit-ignis': '0.5.0',
   'qiskit-ibmq-provider': '0.11.0',
   'qiskit-aqua': '0.8.0',
   'qiskit': '0.23.0'}
$\endgroup$
3
$\begingroup$

The error is you have:

provider= iBMQ.load.account() instead of provider= IBMQ.load_account() on line 11 of the code.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you so much. typoo... I m getting this error now: AttributeError: 'IBMQFactory' object has no attribute 'load' though $\endgroup$ – Delaram Nematollahi Nov 3 at 16:29
  • $\begingroup$ Try: provider= IBMQ.load_account() $\endgroup$ – KAJ226 Nov 3 at 16:31
  • 1
    $\begingroup$ Thank you so much, :). it works $\endgroup$ – Delaram Nematollahi Nov 3 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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