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

Implement direct-access API #164

Merged
merged 11 commits into from
Jun 4, 2024
Merged

Implement direct-access API #164

merged 11 commits into from
Jun 4, 2024

Conversation

airwoodix
Copy link
Collaborator

@airwoodix airwoodix commented May 29, 2024

Summary

This PR implements the direct-access API. This API allows evaluating quantum circuits on AQT devices by communicating with the device directly.

The AQTProvider.get_direct_access_backend() method retrieves a Qiskit backend using the direct-access API. The returned object is mostly compatible with the instances targeting cloud resources returned by AQTProvider.get_backend().

The API reference in the documentation was modified to include the direct-access APIs and datastructures. Adding those to the user guide should be done in a later step, once the use case stabilizes.

Details and comments

Compatibility and differences between AQTResource and AQTDirectAccessResource

  • both classes implement Qiskit's BackendV2 interface.
  • the job types returned by their run() method differ (AQTJob vs AQTDirectAccessJob). Both job types implement Qiskit's JobV1.
  • the semantics of submit() and result() in the job types differ. For AQTJob, the circuit batch is submitted when calling submit(). For AQTDirectAccessJob, the job batch is iteratively submitted when calling result().
  • the compatibility of both backend types with typical Qiskit usage is tested in test_execution, where most test cases are run with both backend types.

Offline simulators

Since there would (should!) be no behavior difference between a direct-access offline simulator and a cloud-like one, only the latter (historically first) kind is provided. The former is only available in tests, to ensure the common behavior.

Authentication

The provider forwards its token on the direct-access API, whether used or not.

@airwoodix airwoodix self-assigned this May 29, 2024
@airwoodix airwoodix changed the title Support direct-access mode Implement direct-access API May 30, 2024
@airwoodix airwoodix marked this pull request as ready for review May 30, 2024 15:18
@airwoodix airwoodix merged commit d75c494 into master Jun 4, 2024
15 checks passed
@airwoodix airwoodix deleted the direct-api branch June 4, 2024 06:17
@jbrixon jbrixon mentioned this pull request Jun 21, 2024
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.

2 participants