bloqade.analog.task.batch.RemoteBatch
classRemoteBatch¶source
bloqade.analog.task.batch.RemoteBatch
Bases: Serializable, Filter
Signature
class RemoteBatch(source: Builder, tasks: Union[OrderedDict[int, QuEraTask], OrderedDict[int, BraketTask], OrderedDict[int, CustomRemoteTaskABC]], name: Optional[str] = None)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
source | Builder | required | |
tasks | Union[OrderedDict[int, QuEraTask], OrderedDict[int, BraketTask], OrderedDict[int, CustomRemoteTaskABC]] | required | |
name | Optional[str] | None |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
source | Builder | required | |
tasks | Union[OrderedDict[int, QuEraTask], OrderedDict[int, BraketTask], OrderedDict[int, CustomRemoteTaskABC]] | required | |
name | Optional[str] | None |
propertytotal_nshots¶source
bloqade.analog.task.batch.RemoteBatch.total_nshots
methodcancel¶source
bloqade.analog.task.batch.RemoteBatch.cancel
methodfetch¶source
bloqade.analog.task.batch.RemoteBatch.fetch
def fetch() -> RemoteBatchFetch the tasks in the Batch.
Returns
RemoteBatch
Note
Fetching will update the status of tasks, and only pull the results for those tasks that have completed.
Return
self
sourcemethodretrieve¶source
bloqade.analog.task.batch.RemoteBatch.retrieve
def retrieve() -> RemoteBatchRetrieve missing task results.
Returns
RemoteBatch
Note
Retrieve will update the status of tasks, and only pull the results for those tasks that have completed.
Return
self
sourcemethodpull¶source
bloqade.analog.task.batch.RemoteBatch.pull
def pull() -> RemoteBatchPull results of the tasks in the Batch.
Returns
RemoteBatch
Note
Pulling will pull the results for the tasks. If a given task(s) has not been completed, wait until it finished.
Return
self
sourcemethodtasks_metric¶source
bloqade.analog.task.batch.RemoteBatch.tasks_metric
def tasks_metric() -> pd.DataFrameGet current tasks status metric
Returns
pd.DataFrame
Return
dataframe with [“task id”, “status”, “shots”]
sourcemethodremove_invalid_tasks¶source
bloqade.analog.task.batch.RemoteBatch.remove_invalid_tasks
def remove_invalid_tasks() -> RemoteBatchCreate a RemoteBatch object that contain tasks from current Batch, with all Unaccepted tasks removed.
Returns
RemoteBatch
Return
RemoteBatch
sourcemethodresubmit¶source
bloqade.analog.task.batch.RemoteBatch.resubmit
def resubmit(shuffle_submit_order: bool = True) -> RemoteBatchResubmit all the tasks in the RemoteBatch
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
shuffle_submit_order | bool | True |
Returns
RemoteBatch
Return
self
sourcemethodget_tasks¶source
bloqade.analog.task.batch.RemoteBatch.get_tasks
def get_tasks(*status_codes: str = ()) -> RemoteBatchGet Tasks with specify status_codes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
*status_codes | str | () |
Returns
RemoteBatch
Return
RemoteBatch
sourcemethodremove_tasks¶source
bloqade.analog.task.batch.RemoteBatch.remove_tasks
Signature
def remove_tasks(*status_codes: Literal['Created', 'Running', 'Completed', 'Failed', 'Cancelled', 'Executing', 'Enqueued', 'Accepted', 'Unaccepted', 'Partial', 'Unsubmitted'] = ()) -> RemoteBatchRemove Tasks with specify status_codes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
*status_codes | Literal['Created', 'Running', 'Completed', 'Failed', 'Cancelled', 'Executing', 'Enqueued', 'Accepted', 'Unaccepted', 'Partial', 'Unsubmitted'] | () |
Returns
RemoteBatch
Return
RemoteBatch
sourcemethodget_failed_tasks¶source
bloqade.analog.task.batch.RemoteBatch.get_failed_tasks
def get_failed_tasks() -> RemoteBatchCreate a RemoteBatch object that contain failed tasks from current Batch.
failed tasks with following status codes:
- Failed
- Unaccepted
Returns
RemoteBatch
Return
RemoteBatch
sourcemethodremove_failed_tasks¶source
bloqade.analog.task.batch.RemoteBatch.remove_failed_tasks
def remove_failed_tasks() -> RemoteBatchCreate a RemoteBatch object that contain tasks from current Batch, with failed tasks removed.
failed tasks with following status codes:
- Failed
- Unaccepted
Returns
RemoteBatch
Return
RemoteBatch
sourcemethodget_finished_tasks¶source
bloqade.analog.task.batch.RemoteBatch.get_finished_tasks
def get_finished_tasks() -> RemoteBatchCreate a RemoteBatch object that contain finished tasks from current Batch.
Tasks consider finished with following status codes:
- Failed
- Unaccepted
- Completed
- Partial
- Cancelled
Returns
RemoteBatch
Return
RemoteBatch
sourcemethodget_completed_tasks¶source
bloqade.analog.task.batch.RemoteBatch.get_completed_tasks
def get_completed_tasks() -> RemoteBatchCreate a RemoteBatch object that contain completed tasks from current Batch.
Tasks consider completed with following status codes:
- Completed
- Partial
Returns
RemoteBatch
Return
RemoteBatch
sourcemethodreport¶source
bloqade.analog.task.batch.RemoteBatch.report
def report() -> ReportGenerate analysis report base on currently completed tasks in the RemoteBatch.
Returns
Report
Return
Report
source