Skip to content

migrate to the new QCS API client#1299

Closed
erichulburd wants to merge 1 commit intomasterfrom
version-3
Closed

migrate to the new QCS API client#1299
erichulburd wants to merge 1 commit intomasterfrom
version-3

Conversation

@erichulburd
Copy link
Contributor

@erichulburd erichulburd commented Feb 16, 2021

TODO

  • Install the new QCS API Client
  • Drop the following file:
    • api/_config.py
  • replace the following functions below
    • api/_base_connection.py
      • get_json and post_json depends on the url path, but those generic functions can be replaced with calls to the new API client.
      • we can drop parse_error and rely on the shape of https://docs.api.qcs.rigetti.com/#tag/errors.
      • we can drop get_session with contextual initialization of the QCS API client as described in usage.
      • we can drop ForestSession, ForestConnection, and Engagement
      • Any reference to engagements can instead use CreateEngagement.
    • api/_devices.py (rename to api/_quantum_processors.py.
  • api/_errors.py, drop the following errors and instead rely on API error messages in the new APIError
    • "device_offline": DeviceOfflineError,
    • "device_retuning": DeviceRetuningError,
    • "invalid_input": InvalidInputError,
    • "invalid_user": InvalidUserError,
    • "job_not_found": JobNotFoundError,
    • "missing_permissions": MissingPermissionsError
  • device/**
    • We'll have to either parse the new ISA to the existing Device class or think about whether we want to change that interface at all.
  • Drop, update, and add tests as appropriate.

Description

Insert your PR description here. Thanks for contributing to pyQuil! 🙂

Checklist

  • The above description motivates these changes.
  • There is a unit test that covers these changes.
  • All new and existing tests pass locally and on Travis CI.
  • Parameters and return values have type hints with PEP 484 syntax.
  • Functions and classes have useful Sphinx-style docstrings.
  • All code follows Black style and obeys flake8 conventions.
  • (New Feature) The docs have been updated accordingly.
  • (Bugfix) The associated issue is referenced above using auto-close keywords.
  • The changelog is updated, including author and PR number (@username, gh-xxx).

@erichulburd erichulburd requested a review from a team as a code owner February 16, 2021 23:32
@erichulburd erichulburd marked this pull request as draft February 16, 2021 23:32
@erichulburd
Copy link
Contributor Author

Closing in favor of #1300

@erichulburd erichulburd deleted the version-3 branch February 18, 2021 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant