This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Show default hgp in active_account #349
Merged
Merged
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4d6a130
show instance in active_account
kt474 5ecdd63
add reno
kt474 7637c6e
address comments
kt474 6d8e526
Merge branch 'main' into show-instance
kt474 289827a
Merge branch 'main' into show-instance
kt474 28cd13a
add test cases
kt474 7087d1a
move test to test_account
kt474 29014c4
Merge branch 'main' into show-instance
kt474 1732b38
fix test case
kt474 0bc953a
revert fake provider change
kt474 22e6525
Merge branch 'main' into show-instance
kt474 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
upgrade: | ||
- | | ||
When instantiating :class:`~qiskit_ibm_provider.IBMProvider` and the h/g/p | ||
is not specified, users can see the auto-selected h/g/p | ||
with :meth:`~qiskit_ibm_provider.IBMProvider.active_account` | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
self._account.instance
is never updated, even after a job is run - if a user wants to see the default hgp by callingactive_account()
we can use_get_hgp()
which returns the default hgpThis doesn't seem like the cleanest solution but I couldn't find a better way
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.
First hgp in the list of hgps will always be the one that is selected by default.
We need to always return this no matter what is already in self._account.
So something like below should work, please test it:
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.
Tested, works as intended