QuEraComputing / bloqade-python

QuEra's Neutral Atom SDK for Analog QPUs
https://bloqade.quera.com/
Other
53 stars 14 forks source link

method to check if a batch task is complete #756

Open jon-wurtz opened 10 months ago

jon-wurtz commented 10 months ago

Is your feature request related to a problem? Please describe. Given a (running or complete?) batch task, it is unclear if all of the jobs have returned all bitstrings and no further query to remote is needed

Describe the solution you'd like job.status() for batchtask, with the same functionality as for single tasks

Describe alternatives you've considered return np.logical_and([task.status() for task in job.tasks])

jon-wurtz commented 10 months ago

Additionally, if the task report already has all bitstring measurements accounted for, there would be no need to query remote

weinbe58 commented 10 months ago

In general the status of the tasks is not simply just Queued and Completed there are actually around 8 possible states a task can be in so its hard to map communicate the general status of the batch in a single status. One thing you can do is filter a batch by status codes, e.g. if I want just completed tasks I can filter based on Completed status:

completed_tasks = batch.get_tasks("Completed")
missing_tasks = batch.remove_tasks("Completed")

also batch.tasks_metric() returns a pandas Dataframe that contains the current knowledge of the tasks in the batch so you can get more fine grain information about the batch from that object.

Additionally, if the task report already has all bitstring measurements accounted for, there would be no need to query remote

Thanks, we've already thought of that so we're all set!