KEMBAR78
NVQC API versioning updates and advance REST API to v1.1 by bmhowe23 · Pull Request #1941 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@bmhowe23
Copy link
Collaborator

@bmhowe23 bmhowe23 commented Jul 16, 2024

This PR updates the client and server API handling code to better handle advancing the capabilities of the server without having to update the client. The basic use case of this will be adding new features to the server while allowing users to keep using old client versions (if desired). As long as the server updates are done in a non-breaking way, we would simply advance the REST API version on the server from 1.0 to 1.1, 1.1 to 1.2, etc. If there is a breaking change on the server where old clients could not talk to the new server, we would advance the REST API version to 2.0.

For changes like the recent VQE and optimizer updates, the client can retrieve the server information in order to figure out whether the "new" way is available. If the "new" way is unavailable, then it will simply fall back on the slower (but still functional) old way.

Note: the remote-mqpu target behaves as if the client and server are essentially at the same version. That is - the client assumes that the server has all the optional capabilities that the client knows about. It behaved like that before, and this PR does not change that.

The 1st commit of this PR actually fixes a bug where the NVQC VQE updates from #1901 were not working correctly for the actual NVQC target. The 2nd and 3rd commits reduce some duplicated code in PyRemoteSimulatorQPU.cpp in order to make it less like that the oversight in #1901 happens again. I can pull all 3 of those commits into a separate PR if desired.

REST API Version CUDA-Q Client Version CUDA-Q Server Version
1 (i.e. 1.0) 0.7.0, 0.7.1 0.7.0
1.1 0.8.0 0.8.0

@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Jul 16, 2024
github-actions bot pushed a commit that referenced this pull request Jul 17, 2024
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

@bmhowe23 bmhowe23 requested review from 1tnguyen and sacpis July 17, 2024 13:12
Copy link
Collaborator

@sacpis sacpis left a comment

Choose a reason for hiding this comment

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

Thanks @bmhowe23. LGTM!

Copy link
Collaborator

@1tnguyen 1tnguyen left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bmhowe23
Copy link
Collaborator Author

Note: if #1958 is merged prior to this PR, then remove the vqe_h2.cpp exception that was added to the integration tests because this PR fixes that issue.

@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Jul 18, 2024
@bmhowe23 bmhowe23 merged commit 6152de8 into NVIDIA:main Jul 18, 2024
@bmhowe23 bmhowe23 deleted the pr-nvqc-version-updates branch July 18, 2024 20:38
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2024
@bettinaheim bettinaheim added the release notes Changes need to be captured in the release notes label Jul 29, 2024
@bettinaheim bettinaheim added this to the release 0.8.0 milestone Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release notes Changes need to be captured in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants