Skip to content

bloqade.gemini.device.logical.result.GeminiLogicalResult

← Module overview

classGeminiLogicalResultsource

bloqade.gemini.device.logical.result.GeminiLogicalResult

Bases: Result

Result view over stored Gemini logical shots.

class GeminiLogicalResult

Merge-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

NameTypeDescription
storageStorageBackendStorage backend that holds shots and task metadata.
shot_filterShotFilterFilter used when reading shots and deriving subtask scope. Defaults to the DETECTED frame type.

methodpostprocessing_functionssource

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.

source

methodlogical_resultssource

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

NameTypeDefaultDescription
verifyboolTrueWhether to validate that selected task IDs can be merged before reading shots. Defaults to True.
postprocessing_functionsdict[int, Callable[[np.ndarray], RetType] | None] | NoneNoneOptional 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

TypeDescription
ValueErrorIf `verify` is True and selected task IDs cannot be merged.
source