Skip to content
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

Retrieve backends with runtime api #774

Merged
merged 9 commits into from
Mar 30, 2023

Conversation

kt474
Copy link
Member

@kt474 kt474 commented Mar 28, 2023

Summary

Related to #741 which is a much bigger effort to minimize duplicated code between provider repos.

Since #741 will likely not be ready this week, this PR only makes updates to use the runtime api instead of the iqx api to retrieve backends

Details and comments

Fixes #

@coveralls
Copy link

coveralls commented Mar 28, 2023

Pull Request Test Coverage Report for Build 4559360833

  • 12 of 16 (75.0%) changed or added relevant lines in 4 files are covered.
  • 60 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-1.4%) to 66.66%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_ibm_runtime/api/clients/runtime.py 1 2 50.0%
qiskit_ibm_runtime/hub_group_project.py 9 10 90.0%
qiskit_ibm_runtime/api/rest/runtime.py 1 3 33.33%
Files with Coverage Reduction New Missed Lines %
qiskit_ibm_runtime/api/rest/base.py 1 83.33%
qiskit_ibm_runtime/api/rest/runtime.py 1 26.6%
qiskit_ibm_runtime/api/rest/utils/init.py 1 0%
qiskit_ibm_runtime/api/auth.py 2 67.74%
qiskit_ibm_runtime/api/rest/utils/data_mapper.py 7 0%
qiskit_ibm_runtime/api/rest/backend.py 19 0%
qiskit_ibm_runtime/api/session.py 29 48.87%
Totals Coverage Status
Change from base Build 4556237201: -1.4%
Covered Lines: 3285
Relevant Lines: 4928

💛 - Coveralls

@kt474 kt474 added the Changelog: API Change Include in the Changed section of the changelog label Mar 28, 2023
@@ -342,13 +342,13 @@ def close_session(self, session_id: str) -> None:

# IBM Cloud only functions

def list_backends(self) -> List[str]:
def list_backends(self, hgp: Optional[str] = None) -> List[str]:
"""Return IBM Cloud backends available for this service instance.

Returns:
IBM Cloud backends available for this service instance.
Copy link
Member Author

Choose a reason for hiding this comment

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

these docstring and comments should be updated since they are not cloud only

@kt474 kt474 requested review from jyu00 and merav-aharoni March 29, 2023 17:09
Copy link
Collaborator

@jyu00 jyu00 left a comment

Choose a reason for hiding this comment

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

LGTM (other than the docstring you pointed out)! This should help with lazy loading as well.

@kt474 kt474 merged commit fbf16fe into Qiskit:main Mar 30, 2023
@kt474 kt474 deleted the retrieve-backends-runtime-api branch March 30, 2023 00:43
frankharkins pushed a commit to frankharkins/qiskit-ibm-runtime that referenced this pull request Apr 3, 2023
* wip initial commit

* use runtime api

* fix unit tests

* remove accountclient

* add instance param

* remove incorrect comments/docstrings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the Changed section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants