-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise error if backend retrieved not in current instance (#1249)
* Error if backend not in instance * add reno * update reno * docs build * fix docs again * docs formatting :/ * add integration test * Update test/integration/test_backend.py Co-authored-by: merav-aharoni <[email protected]> * Update test/integration/test_backend.py Co-authored-by: merav-aharoni <[email protected]> --------- Co-authored-by: merav-aharoni <[email protected]>
- Loading branch information
1 parent
a618de6
commit 5010416
Showing
3 changed files
with
46 additions
and
3 deletions.
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
16 changes: 16 additions & 0 deletions
16
releasenotes/notes/backend-instance-filter-20d69b3951437f19.yaml
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,16 @@ | ||
--- | ||
fixes: | ||
- | | ||
When a single backend is retrieved with the ``instance`` parameter, | ||
.. code-block:: | ||
service.backend('ibm_torino', instance='ibm-q/open/main') | ||
# raises error if torino is not in ibm-q/open/main but in a different instance | ||
# the user has access to | ||
service = QiskitRuntimeService(channel="ibm_quantum", instance="ibm-q/open/main") | ||
service.backend('ibm_torino') # raises the same error | ||
if the backend is not in the instance but in a different one the user has access to, an error | ||
will be raised. The same error will now be raised if an instance is passed in at initialization | ||
and then a backend not in that instance is retrieved. |
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