-
Notifications
You must be signed in to change notification settings - Fork 35
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
“Lazy Map” capability for the BQSKit runtime #260
Comments
We do have the Is what you are asking for here to be able to add additional slots to an existing in-flight task? That is, do you expect A to start running, or be ready to, as soon as you submit it? If so, we could probably create a "submit_additional" or "map_additional" method that takes a future and a task and appends the task to the existing future while submitting it to the runtime rather than creating a new future. We would have to just be sure that the mailbox attached to the future is valid and alive. |
Yeah that's more or less the idea I am going for. For context, the specific code I have that inspired this idea is similar to:
This works fine for now because I do want to look at all the results from
This is currently not possible to implement with the existing BQSKit runtime features. Tangentially, |
I have encountered a real-world use case where I would like this feature. |
I’d like the ability to perform a “lazy map”, meaning to have a
RuntimeFuture
to which I can submit more tasks. Here’s an example scenario where this would be useful:I imagine the code looking something like this:
Another way to do this would be a way to
await
a list of futuresThe text was updated successfully, but these errors were encountered: