bloqade.gemini.device.logical.result.GeminiLogicalResult
classGeminiLogicalResult¶source
bloqade.gemini.device.logical.result.GeminiLogicalResult
Bases: Result
Result view over stored Gemini logical shots.
class GeminiLogicalResultMerge-oriented methods assume each selected task ID has the same subtask structure. Post-processing is applied to each selected subtask’s flat shot array.
Attributes
| Name | Type | Description |
|---|---|---|
storage | StorageBackend | Storage backend that holds shots and task metadata. |
shot_filter | ShotFilter | Filter used when reading shots and deriving subtask scope. Defaults to the DETECTED frame type. |
methodpostprocessing_functions¶source
bloqade.gemini.device.logical.result.GeminiLogicalResult.postprocessing_functions
def postprocessing_functions() -> dict[int, Callable | None]Decode stored programs and build post-processing functions.
Program records are scoped by shot_filter.task_ids. When multiple
task IDs share a program_index, the first stored program at that index
is used.
Returns
dict[int, Callable | None]Mapping from program index to its generated post-processing function.
methodlogical_results¶source
bloqade.gemini.device.logical.result.GeminiLogicalResult.logical_results
Signature
def logical_results(verify: bool = True, postprocessing_functions: dict[int, Callable[[np.ndarray], RetType] | None] | None = None) -> list[RetType | np.ndarray]Return logical results grouped by merged subtask.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
verify | bool | True | Whether to validate that selected task IDs can be merged before reading shots. Defaults to True. |
postprocessing_functions | dict[int, Callable[[np.ndarray], RetType] | None] | None | None | Optional mapping from program index to post-processing function. When None, functions are built from stored programs. Defaults to None. |
Returns
list[RetType | np.ndarray]list[RetType]: Post-processed results for each merged subtask. If a post-processing function is None, the physical shot array is returned for that subtask.
Raises
| Type | Description |
|---|---|
ValueError | If `verify` is True and selected task IDs cannot be merged. |