-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stable/0.3/enhance exception handling of user, task, backend #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this looks good to me.
In the future, suggest to
- Stable branch only accept bug fix (I think this PR is an enhancement rather than bug fix)
- New features go to master, bug fixes from stable branch will be regularly merged into master
def get_chip_info(self, user=User()): | ||
# update api-token, a patch to be deleted in the future | ||
api_token = user._load_account_token() | ||
def get_chip_info(self, user: User = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to use Optional[User]
next time
@@ -141,14 +153,14 @@ def submit(self, | |||
|
|||
def run(self, | |||
qc: QuantumCircuit, | |||
measure_base: List = []) -> ExecResult: | |||
measure_base: List = None) -> ExecResult: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
import pprint | ||
pprint.pprint(res_dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to print this info for users each time?
|
||
return ExecResult(res_dict, measures) | ||
|
||
def retrieve_group(self, | ||
group: str, | ||
history: Dict = {}, | ||
history: Dict = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Optional
user
unset