-
Notifications
You must be signed in to change notification settings - Fork 323
Introducing any_qpu type to hold both qpus based on the QPU base class and trait based qpus. #3685
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
base: main
Are you sure you want to change the base?
Conversation
| launchVQE = [](void *i, const std::string &name, const void *kernelArgs, | ||
| gradient *grad, const spin_op &H, optimizer &opt, | ||
| const int n_params, const std::size_t shots) { | ||
| static_cast<T *>(i)->launchVQE(name, kernelArgs, grad, H, opt, n_params, |
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 VQE is going to be moved to CUDA-QX. @bmhowe23 would you please confirm?
lmondada
left a comment
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 like this proposal a lot!
The only drawback is that the any_qpu definition is very verbose: each method appears three times:
- as attribute in the
qpu_dispatch_table, - in the
buildmethod - as a method on
any_qpu
My C++ hackery skills are at a limit here. I don't see how this redundancy could be resolved with a macro. Any chance tablegen could help here? I am not familiar enough with what it can/cannot do.
Anyways, I think this is a good approach and I am in favour of merging this in!
|
Thank you for the support. I have not had a chance to give too much thoughts about the drawbacks mentioned here. I am also not able to reply there. My focus on the past two days has been on making it work across executables, shared libs and dynamically loaded libs. The trick it to explicitly instantiate only once the Reflections would probably help best with this issue. Macros could help a little too I think. I am not sure I want to get too sophisticated this early in the process with tablegen. Reducing the size of the interface will help too which should be where we are headed. |
Command Bot: Processing... |
17d1b0c to
cc96114
Compare
Command Bot: Processing... |
Command Bot: Processing... |
Command Bot: Processing... |
Command Bot: Processing... |
Command Bot: Processing... |
Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
… singleton accross dynamically loaded libs Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
…. Removed the extra registry instantiation Signed-off-by: Renaud Kauffmann <[email protected]>
DCO Remediation Commit for Renaud Kauffmann <[email protected]> I, Renaud Kauffmann <[email protected]>, hereby add my Signed-off-by to this commit: e16a515 Signed-off-by: Renaud Kauffmann <[email protected]>
DCO Remediation Commit for Renaud Kauffmann <[email protected]> I, Renaud Kauffmann <[email protected]>, hereby add my Signed-off-by to this commit: 5c8d9ff Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
…cannot be controlled. Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
Signed-off-by: Renaud Kauffmann <[email protected]>
Command Bot: Processing... |
@Renaud-K, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
Command Bot: Processing... |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
I, Renaud Kauffmann <[email protected]>, hereby add my Signed-off-by to this commit: 8ca28c5 Signed-off-by: Renaud Kauffmann <[email protected]>
Command Bot: Processing... |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
In preparation for the runtime refactor and the transition of QPU based classes (qpu.h) to trait based classes. I propose the use of the any_qpu type in the quantum platform, which call hold both.
getfunction of the registry, in this aggregate, to insure that all binaries call a unique one. This is also the reason why there is LLVM_INSTANTIATE_REGISTRY.