Skip to content

Use qiskit-ibm-provider api code#871

Merged
kt474 merged 15 commits intoQiskit:mainfrom
kt474:use-ibm-provider-api
Jul 7, 2023
Merged

Use qiskit-ibm-provider api code#871
kt474 merged 15 commits intoQiskit:mainfrom
kt474:use-ibm-provider-api

Conversation

@kt474
Copy link
Copy Markdown
Contributor

@kt474 kt474 commented May 24, 2023

Summary

Removing as much duplication as possible from the api code

api/clients: auth.py, base.py, runtime_ws.py, version.py
api/rest: backend.py, base.py, program_job.py, root.py

Details and comments

Fixes other half of #548

@coveralls
Copy link
Copy Markdown

coveralls commented May 24, 2023

Pull Request Test Coverage Report for Build 5489535000

  • 12 of 14 (85.71%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.5%) to 74.036%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_ibm_runtime/runtime_job.py 0 2 0.0%
Totals Coverage Status
Change from base Build 5480292984: 1.5%
Covered Lines: 2401
Relevant Lines: 3243

💛 - Coveralls

@kt474 kt474 mentioned this pull request May 24, 2023
4 tasks
@kt474 kt474 marked this pull request as ready for review May 24, 2023 17:04
@kt474 kt474 added the Changelog: Removal Include in the Removed section of the changelog label May 24, 2023
@kt474 kt474 added this to the 0.11.1 milestone Jun 12, 2023
Copy link
Copy Markdown
Contributor

@merav-aharoni merav-aharoni left a comment

Choose a reason for hiding this comment

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

Overall looks fine. A few comments:

  1. In qiskit_ibm_runtime/api/clients/base.py, retries==8 and in qiskit-ibm-provider/qiskit_ibm_provider/api/clients/base.py it is 5. Do you want to change it to 8 in provider?
  2. There are quite a few differences between qiskit_ibm_runtime/api/rest/backend.py and qiskit-ibm-provider/qiskit_ibm_provider/api/rest/backend.py. Do we need to copy any of these to provider?
  3. Same as (2) for qiskit_ibm_runtime/api/rest/program_job.py and qiskit-ibm-provider/api/rest/program_job.py
  4. Same for qiskit_ibm_runtime/api/rest/root.py and qiskit-ibm-provider/api/rest/root.py. In particular, the former has a reservations method.

@kt474
Copy link
Copy Markdown
Contributor Author

kt474 commented Jul 5, 2023

Overall looks fine. A few comments:

  1. Yes, we can also increase the retries in qiskit-ibm-provider
  2. We don't need to copy any of the changes in backend.py because job_limit and `reservations are no longer used
  3. I believe the same applies here, we don't need to copy the changes, because the program_job.py in qiskit-ibm-provider is more up to date
  4. There is no reservations endpoint in the runtime api, I don't believe it was ever used in this repo

@kt474 kt474 modified the milestones: 0.11.1, 0.11.2 Jul 6, 2023
@kt474 kt474 added the Changelog: API Change Include in the Changed section of the changelog label Jul 7, 2023
@kt474 kt474 merged commit f36e01e into Qiskit:main Jul 7, 2023
@kt474 kt474 deleted the use-ibm-provider-api branch July 7, 2023 20:08
@kt474 kt474 mentioned this pull request Jul 7, 2023
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 Changelog: Removal Include in the Removed section of the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants