Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Account info not found #404

Closed
nonhermitian opened this issue Oct 9, 2022 · 9 comments
Closed

Account info not found #404

nonhermitian opened this issue Oct 9, 2022 · 9 comments
Assignees
Labels
type: bug Something isn't working

Comments

@nonhermitian
Copy link
Contributor

Information

  • qiskit-ibm-provider version: master
  • Python version: 3.10.6
  • Operating system: OSX

What is the current behavior?

I have a IQX token installed, but the qiskit-ibm-provider cannot find it:

provider = IBMProvider()

gives AccountNotFoundError: 'No default ibm_quantum account saved.'

But the Runtime and regular IBMQ provider have no problem finding my credentials

Steps to reproduce the problem

What is the expected behavior?

Suggested solutions

@nonhermitian nonhermitian added the type: bug Something isn't working label Oct 9, 2022
@nonhermitian
Copy link
Contributor Author

IBMProvider.saved_accounts() finds my info

{'default-ibm-quantum': {'channel': 'ibm_quantum',
  'token': 'XXXX',
  'url': 'https://auth.quantum-computing.ibm.com/api',
  'verify': True}}

@kt474
Copy link
Member

kt474 commented Oct 9, 2022

I believe it's defaulting to look for an ibm-cloud account - this should be fixed by #399

@kt474
Copy link
Member

kt474 commented Nov 1, 2022

@nonhermitian are you still having this issue?

@kt474
Copy link
Member

kt474 commented Nov 1, 2022

fixed by #399

@kt474 kt474 closed this as completed Nov 1, 2022
@nonhermitian
Copy link
Contributor Author

I still see this error on the latest version of the provider and Qiskit:

from qiskit_ibm_provider import IBMProvider
provider = IBMProvider()

gives

AccountNotFoundError: 'No default ibm_quantum account saved.'

But IBMQ.load_account() works just fine.

@kt474
Copy link
Member

kt474 commented Nov 16, 2022

Do you have an account named default-ibm-quantum in your qiskit-ibm.json file? I can't seem to replicate this issue

"default-ibm-quantum": {
    "channel": "ibm_quantum",
    "token": "...",
    "url": "https://auth.quantum-computing.ibm.com/api"
  }

@nonhermitian
Copy link
Contributor Author

Shouldn't it look for my other credentials from the usual IBMQ provider?

@kt474
Copy link
Member

kt474 commented Nov 16, 2022

Shouldn't it look for my other credentials from the usual IBMQ provider?

It looks for credentials from the qiskit-ibm.json file, not the qiskitrc file from the old provider. In the runtime provider, we implemented Qiskit/qiskit-ibm-runtime#370 which copies the qiskitrc file credentials into a new qiskit-ibm.json if one doesn't already exist. This feature was never implemented in this repo, but I can work on adding it.

@nonhermitian
Copy link
Contributor Author

Ahh ok. I thought it worked the same here. I am creating materials for teaching people how to use our new tools, and it would help to ease the transition when moving from the old provider to the new one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants