Adds qBraid as a remote REST target in CUDA-Q#4328
Adds qBraid as a remote REST target in CUDA-Q#4328TheGupta2012 wants to merge 23 commits intoNVIDIA:mainfrom
Conversation
* working implementation using openQasm * modified and added test files(incomplete) * fix emulate command alignment * update polling + format * update polling interval and make code more readable * remove ionq fields from target-arguments * fix formatting * Add qBraid mock python server for testing Signed-off-by: Ryan Hill <ryanjh88@gmail.com> * Update __init__.py Signed-off-by: Ryan Hill <ryanjh88@gmail.com> * QbraidTester running correctly * added documentation for qbraid --------- Signed-off-by: Ryan Hill <ryanjh88@gmail.com> Co-authored-by: feelerx <superfeelerxx@gmail.com>
I, Harshit <harshit.11235@gmail.com>, hereby add my Signed-off-by to this commit: 9cd62cf I, Harshit <harshit.11235@gmail.com>, hereby add my Signed-off-by to this commit: 3b0a1e4 I, Harshit <harshit.11235@gmail.com>, hereby add my Signed-off-by to this commit: 1a24c66 Signed-off-by: Harshit <harshit.11235@gmail.com>
I, TheGupta2012 <harshit.11235@gmail.com>, hereby add my Signed-off-by to this commit: 925ae39 I, TheGupta2012 <harshit.11235@gmail.com>, hereby add my Signed-off-by to this commit: 41fe248 I, TheGupta2012 <harshit.11235@gmail.com>, hereby add my Signed-off-by to this commit: d74243d Signed-off-by: TheGupta2012 <harshit.11235@gmail.com>
Signed-off-by: TheGupta2012 <harshit.11235@gmail.com>
Signed-off-by: TheGupta2012 <harshit.11235@gmail.com>
|
Thank you @mitchdz for giving the review comments. Could you please approve the test runs so that the changes can be validated? |
Command Bot: Processing... |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
…uild and skip remote tests for qbraid Signed-off-by: TheGupta2012 <harshit.11235@gmail.com>
…piKey target param depend on emulate flag Signed-off-by: TheGupta2012 <harshit.11235@gmail.com>
|
Thanks @mitchdz for approving the tests, they were helpful in figuring out a couple of bugs. I've triaged the failures and CI should hopefully pass now |
Command Bot: Processing... |
|
@TheGupta2012 I just reran CI. Sorry for the delay, I missed the email of your notification. |
@mitchdz thank you for running the tests. It seems like they are failing because the integration tests specific to qBraid are picking up the base cuda quantum docker image, not the one built by this PR. See the integration test log for verification This means that it won't contain the qbraid backend and that is why Ideally, we should be passing an image built from the PR branch ( |
|
After digging in a little with Claude I found that the CI also produced PR specific images -
Not sure if this is supposed to be the target image, but hope this helps |
Summary
Adds qBraid as a remote REST target in CUDA-Q. Kernels authored via
cudaq.set_target("qbraid", ...) are lowered to OpenQASM 2.0, submitted to the qBraid v2
API, and results are parsed back into cudaq::sample_result — with zero dependency on
the external qbraid-sdk Python package.
What's included
Target qbraid registered via runtime/cudaq/platform/default/rest/helpers/qbraid/
Retry-with-backoff in processResults absorbs qBraid v2's COMPLETED→result-queryable
race.
Specific error handling for 401 / 403 and 409 while processing job results
Testing
future serialization, api_key-via-target-arg, job failure, result retry, retry
exhaustion
against the mock
backends