Skip to content

Create executeKernel function in PythonLauncher#4136

Queued
lmondada wants to merge 2 commits intoNVIDIA:mainfrom
lmondada:lm/executeKernel
Queued

Create executeKernel function in PythonLauncher#4136
lmondada wants to merge 2 commits intoNVIDIA:mainfrom
lmondada:lm/executeKernel

Conversation

@lmondada
Copy link
Collaborator

@lmondada lmondada commented Mar 10, 2026

I was resolving merge conflicts for #4052 and wanted to make sure I got it right. I am opening this PR as an in-between step.

This PR does not change any code logic, it just refactors the "execute kernel" part of PythonLauncher::launchModule into a separate function. Actually, no, there is one change: the message "Loading previously compiled JIT engine for {}" etc is only printed when isPersistingJITEngine is true. I am pretty sure that's the desired behaviour.

Finally, I've noticed that when hasVariationalArgs is true, the argument buffer as a whole is passed to the thunk function, whereas otherwise it is only its last argument. Is it because there can never be arguments passed when hasVariationalArgs is true?

Signed-off-by: Luca Mondada <luca@mondada.net>
@lmondada lmondada requested a review from atgeller March 10, 2026 23:39
github-actions bot pushed a commit that referenced this pull request Mar 11, 2026
@github-actions
Copy link

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

Copy link
Collaborator

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

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

Seems like a reasonable refactor. Thanks, Luca.

I'll message you in a follow-up. :)

Signed-off-by: Luca Mondada <luca@mondada.net>
Copy link
Collaborator

@atgeller atgeller left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @lmondada!

@github-actions
Copy link

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

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.

3 participants