class IBMProvider(token=None, url=None, name=None, instance=None, proxies=None, verify=None)[source]#

Provides access to the IBM Quantum services available to an account.

Authenticate against IBM Quantum for use from saved credentials or during session.

Credentials can be saved to disk by calling the save_account() method:

from qiskit_ibm_provider import IBMProvider

You can set the default project using the hub, group, and project keywords in save_account(). Once credentials are saved you can simply instantiate the provider like below to load the saved account and default project:

from qiskit_ibm_provider import IBMProvider
provider = IBMProvider()

Instead of saving credentials to disk, you can also set the environment variables QISKIT_IBM_TOKEN, QISKIT_IBM_URL and QISKIT_IBM_INSTANCE and then instantiate the provider as below:

from qiskit_ibm_provider import IBMProvider
provider = IBMProvider()

You can also enable an account just for the current session by instantiating the provider with the API token:

from qiskit_ibm_provider import IBMProvider
provider = IBMProvider(token=<INSERT_IBM_QUANTUM_TOKEN>)

token is the only required attribute that needs to be set using one of the above methods. If no url is set, it defaults to ‘’.


The hub/group/project is selected based on the below selection order, in decreasing order of priority.

  • The hub/group/project you explicity specify when calling a service. Ex: provider.get_backend(), etc.

  • The hub/group/project required for the service.

  • The default hub/group/project you set using save_account().

  • A premium hub/group/project in your account.

  • An open access hub/group/project.

The IBMProvider offers the IBMBackendService which gives access to the IBM Quantum devices and simulators.

You can obtain an instance of the service as an attribute of the IBMProvider instance. For example:

backend_service = provider.backend

Since IBMBackendService is the main service, some of the backend-related methods are available through this class for convenience.

The backends() method returns all the backends available to this account:

backends = provider.backends()

The get_backend() method returns a backend that matches the filters passed as argument. An example of retrieving a backend that matches a specified name:

simulator_backend = provider.get_backend('ibmq_qasm_simulator')

IBMBackend’s are uniquely identified by their name. If you invoke get_backend() twice, you will get the same IBMBackend instance, and any previously updated options will be reset to the default values.

It is also possible to use the backend attribute to reference a backend. As an example, to retrieve the same backend from the example above:

simulator_backend = provider.backend.ibmq_qasm_simulator


The backend attribute can be used to autocomplete the names of backends available to this account. To autocomplete, press tab after provider.backend.. This feature may not be available if an error occurs during backend discovery. Also note that this feature is only available in interactive sessions, such as in Jupyter Notebook and the Python interpreter.

IBMProvider constructor

  • token (Optional[str]) – IBM Quantum API token.

  • url (Optional[str]) – The API URL. Defaults to

  • name (Optional[str]) – Name of the account to load.

  • instance (Optional[str]) – Provider in the hub/group/project format.

  • proxies (Optional[dict]) – Proxy configuration. Supported optional keys are urls (a dictionary mapping protocol or protocol and host to the URL of the proxy, documented at, username_ntlm, password_ntlm (username and password to enable NTLM user authentication)

  • verify (Optional[bool]) – Whether to verify the server’s TLS certificate.


An instance of IBMProvider


IBMInputValueError – If an input is invalid.



Return the backend service.




Return the IBM Quantum account currently in use for the session.

IBMProvider.backends([name, filters, ...])

Return all backends accessible via this account, subject to optional filtering.


Delete a saved account from disk.

IBMProvider.get_backend([name, instance])

Return a single backend matching the specified filtering.


Return the IBM Quantum instances list currently in use for the session.[limit, skip, ...])

Return a list of jobs, subject to optional filtering.


Return a single job.

IBMProvider.save_account([token, url, ...])

Save the account to disk for future use.

IBMProvider.saved_accounts([default, name])

List the accounts saved on disk.