Result
GeminiLogicalResult
dataclass
GeminiLogicalResult(
*,
storage: StorageBackend,
shot_filter: ShotFilter = _default_shot_filter()
)
Bases: Result
flowchart TD
bloqade.gemini.device.logical.result.GeminiLogicalResult[GeminiLogicalResult]
bloqade.core.device.result.Result[Result]
bloqade.core.device.result.Result --> bloqade.gemini.device.logical.result.GeminiLogicalResult
click bloqade.gemini.device.logical.result.GeminiLogicalResult href "" "bloqade.gemini.device.logical.result.GeminiLogicalResult"
click bloqade.core.device.result.Result href "" "bloqade.core.device.result.Result"
Result view over stored Gemini logical shots.
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:
| 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. |
logical_results
logical_results(
verify: bool = True,
postprocessing_functions: (
dict[int, Callable[[ndarray], RetType] | None]
| None
) = None,
) -> list[RetType | np.ndarray]
Return logical results grouped by merged subtask.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verify
|
bool
|
Whether to validate that selected task IDs can be merged before reading shots. Defaults to True. |
True
|
postprocessing_functions
|
dict[int, Callable | None] | None
|
Optional mapping from program index to post-processing function. When None, functions are built from stored programs. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
list[RetType | 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 |
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device/logical/result.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
postprocessing_functions
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:
| Type | Description |
|---|---|
dict[int, Callable | None]
|
dict[int, Callable | None]: Mapping from program index to its generated post-processing function. |
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device/logical/result.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |