Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Allow saving default provider in account #611

Merged
merged 48 commits into from
Apr 9, 2020

Conversation

lgarc15
Copy link
Contributor

@lgarc15 lgarc15 commented Mar 27, 2020

Summary

Addresses #545

Details and comments

Allows saving a default provider with save_account() and enabling a default provider using enable_account() by specifying a provider as a string in the format <hub_name>/<group_name>/<project_name>.

jyu00
jyu00 previously requested changes Mar 27, 2020
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/api/clients/auth.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/__init__.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/credentials/configrc.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/api/clients/auth.py Outdated Show resolved Hide resolved
@lgarc15
Copy link
Contributor Author

lgarc15 commented Mar 30, 2020

  • Clean up documentation
  • Update tutorial to show new keywords.
  • General pass through, to make sure I didn't miss anything and everything is good.

Still need to update the tutorial, but it should be good for review.

@lgarc15 lgarc15 dismissed jyu00’s stale review March 31, 2020 18:02

Updated PR

docs/tutorials/1_the_ibmq_account.ipynb Outdated Show resolved Hide resolved
docs/tutorials/1_the_ibmq_account.ipynb Outdated Show resolved Hide resolved
docs/tutorials/1_the_ibmq_account.ipynb Outdated Show resolved Hide resolved
qiskit/providers/ibmq/credentials/configrc.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Show resolved Hide resolved
qiskit/providers/ibmq/credentials/hubgroupproject.py Outdated Show resolved Hide resolved
test/ibmq/test_ibmq_factory.py Outdated Show resolved Hide resolved
test/ibmq/test_ibmq_factory.py Outdated Show resolved Hide resolved
test/ibmq/test_ibmq_factory.py Outdated Show resolved Hide resolved
jyu00
jyu00 previously requested changes Apr 6, 2020
qiskit/providers/ibmq/credentials/configrc.py Show resolved Hide resolved
qiskit/providers/ibmq/credentials/configrc.py Outdated Show resolved Hide resolved
@@ -38,7 +40,25 @@


class IBMQFactory:
"""Factory and account manager for IBM Quantum Experience."""
"""Factory and account manager for IBM Quantum Experience.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant was that since this block comment is meant to describe the the entire IBMQFactory class, it should contain more information than just how to save a default provider. Like it should explain what this class is used for and the terminologies (token, provider, configuration file, etc). Perhaps this can go into a different doc PR.


Note that my original comment regarding the docstring was

Perhaps a nice, concise description, of how to use IBMQFactory to manage accounts can go into IBMQFactory's docstring.


Also while it doesn't hurt to give users more information, I don't think it's necessary to describe in details how to specify a default provider.

qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
docs/tutorials/1_the_ibmq_account.ipynb Outdated Show resolved Hide resolved
docs/tutorials/1_the_ibmq_account.ipynb Outdated Show resolved Hide resolved
@lgarc15
Copy link
Contributor Author

lgarc15 commented Apr 7, 2020

Also, as a note. Per your suggestion, I'll create another PR to handle the documentation for IBMQFactory 👍

qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
qiskit/providers/ibmq/ibmqfactory.py Outdated Show resolved Hide resolved
@lgarc15 lgarc15 dismissed jyu00’s stale review April 8, 2020 18:13

Updated PR

@jyu00 jyu00 merged commit 8e89fb0 into Qiskit:master Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants