-
Notifications
You must be signed in to change notification settings - Fork 178
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
ORCA asynchronous sampling #2205
base: main
Are you sure you want to change the base?
Conversation
Command Bot: Processing... |
std::ifstream in("saveMe.json"); | ||
in >> readIn; | ||
|
||
sleep_for(200ms); // wait for the job to be processed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to know what happens if the job does not complete within 200 ms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just have few comments.
To fix Basic content checks CI job, please run these commands locally to see the issue on your local machine
|
* Spell check
Command Bot: Processing... |
Command Bot: Processing... |
Fixed. |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
@@ -14,6 +14,7 @@ | |||
#include "Future.h" | |||
#include "MeasureCounts.h" | |||
#include "Registry.h" | |||
#include "cudaq/orca.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the need to add orca-specific dependency at this level (common) is undesirable.
Since we would override the cudaq::QPU
interface for ORCA anyway, we could encapsulate all changes via inheritance, e.g.,
class OrcaServerHelper: public ServerHelper {
public:
// Add a method, not override
ServerJobPayload createJob(cudaq::orca::TBIParameters params);
}
class OrcaExecutor: public Executor {
// Added method, no need to introduce to base clas
details::future execute(cudaq::orca::TBIParameters params,
const std::string &kernelName) {
....
auto casted = dynamic_cast<OrcaServerHelper*>(serverHelper);
assert(casted);
auto [jobPostPath, headers, jobs] = casted->createJob(params);
....
}
}
class OrcaRemoteRESTQPU : public cudaq::QPU {
std::unique_ptr<OrcaExecutor> executor; // use OrcaExecutor
OrcaRemoteRESTQPU() : QPU() {
....
executor = std::make_unique<OrcaExecutor>();
}
}
At a cost of a dynamic_cast
, we could encapsulate/localize all ORCA-specific changes.
@amccaskey interested to hear your opinion as well.
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Command Bot: Processing... |
Description
Support for asynchronous sampling for ORCA backend