-
Notifications
You must be signed in to change notification settings - Fork 294
Proper handling of evolve_async input state
#2951
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
Conversation
Need to migrate the input state to proper QPU for execution. Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
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.
LGTM. Thanks @1tnguyen.
|
A question. Do we cover this case in tests for evolve_async? |
Yes. In fact, it's how I detected this bug :) It came to light thanks to the refactor we did in The |
|
Thanks @1tnguyen. |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Need to migrate the input state to proper QPU for execution. Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
Description
The input state to
evolve_asyncmay be constructed on a different device (GPU), as this state is built on the main thread before the async. functor is executed.Hence, adding a helper function to detect and migrate the state data if needed.