Skip to content

Device

DetectorResult dataclass

DetectorResult(
    _detector_error_model: DetectorErrorModel,
    _fidelity_min: float,
    _fidelity_max: float,
    _detectors: list[list[bool]],
    _observables: list[list[bool]],
)

Result from the detector sampler containing only detector and observable outcomes.

detector_error_model property

detector_error_model: DetectorErrorModel

The STIM detector error model corresponding to the physical noise circuit.

Returns:

Name Type Description
DetectorErrorModel DetectorErrorModel

The STIM detector error model.

detectors property

detectors: tuple[tuple[bool, ...], ...]

The detector outcomes from the simulation.

Returns:

Type Description
tuple[tuple[bool, ...], ...]

tuple[tuple[bool, ...], ...]: The detector outcomes, one tuple per shot.

observables property

observables: tuple[tuple[bool, ...], ...]

The observable outcomes from the simulation.

Returns:

Type Description
tuple[tuple[bool, ...], ...]

tuple[tuple[bool, ...], ...]: The observable outcomes, one tuple per shot.

fidelity_bounds

fidelity_bounds() -> tuple[float, float]

Return the upper and lower fidelity bounds.

Returns:

Type Description
tuple[float, float]

tuple[float, float]: The (min, max) fidelity bounds.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
49
50
51
52
53
54
55
56
def fidelity_bounds(self) -> tuple[float, float]:
    """Return the upper and lower fidelity bounds.

    Returns:
        tuple[float, float]: The (min, max) fidelity bounds.

    """
    return (self._fidelity_min, self._fidelity_max)

GeminiLogicalSimulator dataclass

GeminiLogicalSimulator(
    noise_model: LogicalNoiseModelABC = _default_noise_model(),
)

Logical simulator targeting the Gemini neutral-atom architecture.

This is the primary entry point for compiling and simulating logical quantum circuits on the Gemini architecture. Use :meth:task to compile a kernel into a reusable :class:GeminiLogicalSimulatorTask, or :meth:run for one-shot compile-and-execute convenience.

noise_model class-attribute instance-attribute

noise_model: LogicalNoiseModelABC = field(
    default_factory=_default_noise_model
)

The noise model used for simulation. Defaults to :func:generate_logical_noise_model.

fidelity_bounds

fidelity_bounds(
    logical_squin_kernel: Method[[], RetType],
) -> tuple[float, float]

Get the fidelity bounds for the logical squin kernel.

Parameters:

Name Type Description Default
logical_squin_kernel Method[[], RetType]

The logical squin kernel to analyze.

required

Returns:

Type Description
tuple[float, float]

tuple[float, float]: The (min, max) fidelity bounds.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
664
665
666
667
668
669
670
671
672
673
674
675
676
def fidelity_bounds(
    self, logical_squin_kernel: ir.Method[[], RetType]
) -> tuple[float, float]:
    """Get the fidelity bounds for the logical squin kernel.

    Args:
        logical_squin_kernel (ir.Method[[], RetType]): The logical squin kernel to analyze.

    Returns:
        tuple[float, float]: The (min, max) fidelity bounds.

    """
    return self.task(logical_squin_kernel).fidelity_bounds()

physical_move_kernel

physical_move_kernel(
    logical_squin_kernel: Method[[], RetType],
) -> ir.Method[[], RetType]

Compile the logical squin kernel to the physical move kernel.

Parameters:

Name Type Description Default
logical_squin_kernel Method[[], RetType]

The logical squin kernel to compile.

required

Returns:

Type Description
Method[[], RetType]

ir.Method[[], RetType]: The physical move kernel.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
632
633
634
635
636
637
638
639
640
641
642
643
644
def physical_move_kernel(
    self, logical_squin_kernel: ir.Method[[], RetType]
) -> ir.Method[[], RetType]:
    """Compile the logical squin kernel to the physical move kernel.

    Args:
        logical_squin_kernel (ir.Method[[], RetType]): The logical squin kernel to compile.

    Returns:
        ir.Method[[], RetType]: The physical move kernel.

    """
    return self.task(logical_squin_kernel).physical_move_kernel

physical_squin_kernel

physical_squin_kernel(
    logical_squin_kernel: Method[[], RetType],
) -> ir.Method[[], RetType]

Compile the logical squin kernel to the physical squin kernel.

Parameters:

Name Type Description Default
logical_squin_kernel Method[[], RetType]

The logical squin kernel to compile.

required

Returns:

Type Description
Method[[], RetType]

ir.Method[[], RetType]: The physical squin kernel.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
618
619
620
621
622
623
624
625
626
627
628
629
630
def physical_squin_kernel(
    self, logical_squin_kernel: ir.Method[[], RetType]
) -> ir.Method[[], RetType]:
    """Compile the logical squin kernel to the physical squin kernel.

    Args:
        logical_squin_kernel (ir.Method[[], RetType]): The logical squin kernel to compile.

    Returns:
        ir.Method[[], RetType]: The physical squin kernel.

    """
    return self.task(logical_squin_kernel).physical_squin_kernel

run

run(
    logical_squin_kernel: Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: Literal[False] = ...
) -> Result[RetType]
run(
    logical_squin_kernel: Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: Literal[True]
) -> DetectorResult
run(
    logical_squin_kernel: Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool
) -> Result[RetType] | DetectorResult
run(
    logical_squin_kernel: Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool = False
) -> Result[RetType] | DetectorResult

Run the kernel and get simulation results.

Parameters:

Name Type Description Default
logical_squin_kernel Method[[], RetType]

The logical squin kernel to run.

required
shots int

Number of shots to run. Defaults to 1.

1
with_noise bool

Whether to include noise in the simulation. Defaults to True.

True
run_detectors bool

When True, use the detector sampler instead of the measurement sampler for faster detector/observable sampling. Defaults to False.

False

Returns:

Name Type Description
Result[RetType] | DetectorResult

Result[RetType]: When run_detectors=False, the full simulation result.

DetectorResult Result[RetType] | DetectorResult

When run_detectors=True, the result containing only detector and observable outcomes.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
def run(
    self,
    logical_squin_kernel: ir.Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool = False,
) -> Result[RetType] | DetectorResult:
    """Run the kernel and get simulation results.

    Args:
        logical_squin_kernel (ir.Method[[], RetType]): The logical squin kernel to run.
        shots (int): Number of shots to run. Defaults to 1.
        with_noise (bool): Whether to include noise in the simulation. Defaults to True.
        run_detectors (bool): When ``True``, use the detector sampler instead of
            the measurement sampler for faster detector/observable sampling.
            Defaults to False.

    Returns:
        Result[RetType]: When ``run_detectors=False``, the full simulation result.
        DetectorResult: When ``run_detectors=True``, the result containing only
            detector and observable outcomes.

    """
    return self.task(logical_squin_kernel).run(
        shots, with_noise, run_detectors=run_detectors
    )

run_async

run_async(
    logical_squin_kernel: Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: Literal[False] = ...
) -> Future[Result[RetType]]
run_async(
    logical_squin_kernel: Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: Literal[True]
) -> Future[DetectorResult]
run_async(
    logical_squin_kernel: Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool = False
) -> Future[Result[RetType]] | Future[DetectorResult]

Run the kernel asynchronously and get simulation results.

Parameters:

Name Type Description Default
logical_squin_kernel Method[[], RetType]

The logical squin kernel to run.

required
shots int

Number of shots to run. Defaults to 1.

1
with_noise bool

Whether to include noise in the simulation. Defaults to True.

True
run_detectors bool

When True, use the detector sampler instead of the measurement sampler. Defaults to False.

False

Returns:

Type Description
Future[Result[RetType]] | Future[DetectorResult]

Future[Result[RetType]]: When run_detectors=False, a future resolving to the full simulation result.

Future[Result[RetType]] | Future[DetectorResult]

Future[DetectorResult]: When run_detectors=True, a future resolving to the detector result.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
def run_async(
    self,
    logical_squin_kernel: ir.Method[[], RetType],
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool = False,
) -> Future[Result[RetType]] | Future[DetectorResult]:
    """Run the kernel asynchronously and get simulation results.

    Args:
        logical_squin_kernel (ir.Method[[], RetType]): The logical squin kernel to run.
        shots (int): Number of shots to run. Defaults to 1.
        with_noise (bool): Whether to include noise in the simulation. Defaults to True.
        run_detectors (bool): When ``True``, use the detector sampler instead of
            the measurement sampler. Defaults to False.

    Returns:
        Future[Result[RetType]]: When ``run_detectors=False``, a future resolving
            to the full simulation result.
        Future[DetectorResult]: When ``run_detectors=True``, a future resolving
            to the detector result.

    """
    task = self.task(logical_squin_kernel)
    if run_detectors:
        return task.run_async(shots, with_noise, run_detectors=True)
    return task.run_async(shots, with_noise)

task

task(
    logical_kernel: Union[
        Method[[], RetType], Callable[..., Any]
    ],
    m2dets: list[list[int]] | None = None,
    m2obs: list[list[int]] | None = None,
) -> GeminiLogicalSimulatorTask[RetType]

Create a simulation task for the given kernel.

Eagerly compiles the kernel through squin-to-move and extracts post-processing. For CUDA-Q kernels, detector and observable annotation matrices default to Steane [[7,1,3]] parity checks when not provided.

Parameters:

Name Type Description Default
logical_kernel Union[Method[[], RetType], Callable[..., Any]]

The logical squin or CUDA-Q kernel to compile and run.

required
m2dets list[list[int]] | None

Binary measurement-to-detector matrix. For CUDA-Q kernels, defaults to Steane [[7,1,3]] detectors if None.

None
m2obs list[list[int]] | None

Binary measurement-to-observable matrix. For CUDA-Q kernels, defaults to Steane [[7,1,3]] observables if None.

None

Returns:

Type Description
GeminiLogicalSimulatorTask[RetType]

GeminiLogicalSimulatorTask[RetType]: The compiled simulation task.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
def task(
    self,
    logical_kernel: Union[ir.Method[[], RetType], Callable[..., Any]],
    m2dets: list[list[int]] | None = None,
    m2obs: list[list[int]] | None = None,
) -> GeminiLogicalSimulatorTask[RetType]:
    """Create a simulation task for the given kernel.

    Eagerly compiles the kernel through squin-to-move and extracts post-processing.
    For CUDA-Q kernels, detector and observable annotation matrices default to
    Steane [[7,1,3]] parity checks when not provided.

    Args:
        logical_kernel (Union[ir.Method[[], RetType], Callable[..., Any]]): The logical
            squin or CUDA-Q kernel to compile and run.
        m2dets (list[list[int]] | None): Binary measurement-to-detector matrix.
            For CUDA-Q kernels, defaults to Steane [[7,1,3]] detectors if ``None``.
        m2obs (list[list[int]] | None): Binary measurement-to-observable matrix.
            For CUDA-Q kernels, defaults to Steane [[7,1,3]] observables if ``None``.

    Returns:
        GeminiLogicalSimulatorTask[RetType]: The compiled simulation task.

    """
    from bloqade.lanes.logical_mvp import compile_task

    (
        logical_squin_kernel,
        physical_arch_spec,
        physical_move_kernel,
        post_processing,
    ) = compile_task(logical_kernel, m2dets, m2obs)

    return GeminiLogicalSimulatorTask(
        logical_squin_kernel,
        self.noise_model,
        physical_arch_spec,
        physical_move_kernel,
        post_processing,
    )

tsim_circuit

tsim_circuit(
    logical_squin_kernel: Method[[], RetType],
    with_noise: bool = True,
) -> tsim_backend.Circuit

Compile the logical squin kernel to the tsim circuit.

Parameters:

Name Type Description Default
logical_squin_kernel Method[[], RetType]

The logical squin kernel to compile.

required
with_noise bool

Whether to include noise in the tsim circuit. Defaults to True.

True

Returns:

Type Description
Circuit

tsim.Circuit: The compiled tsim circuit.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
def tsim_circuit(
    self, logical_squin_kernel: ir.Method[[], RetType], with_noise: bool = True
) -> tsim_backend.Circuit:
    """Compile the logical squin kernel to the tsim circuit.

    Args:
        logical_squin_kernel (ir.Method[[], RetType]): The logical squin kernel to compile.
        with_noise (bool): Whether to include noise in the tsim circuit. Defaults to True.

    Returns:
        tsim.Circuit: The compiled tsim circuit.

    """
    if with_noise:
        return self.task(logical_squin_kernel).tsim_circuit
    else:
        return self.task(logical_squin_kernel).noiseless_tsim_circuit

visualize

visualize(
    logical_squin_kernel: Method[[], RetType],
    animated: bool = False,
    interactive: bool = True,
)

Visualize the physical move kernel using the built-in debugger.

Parameters:

Name Type Description Default
logical_squin_kernel Method[[], RetType]

The logical squin kernel to visualize.

required
animated bool

Whether to use the animated debugger. Defaults to False.

False
interactive bool

Whether to enable interactive mode. Defaults to True.

True
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
def visualize(
    self,
    logical_squin_kernel: ir.Method[[], RetType],
    animated: bool = False,
    interactive: bool = True,
):
    """Visualize the physical move kernel using the built-in debugger.

    Args:
        logical_squin_kernel (ir.Method[[], RetType]): The logical squin kernel to visualize.
        animated (bool): Whether to use the animated debugger. Defaults to False.
        interactive (bool): Whether to enable interactive mode. Defaults to True.

    """
    self.task(logical_squin_kernel).visualize(
        animated=animated, interactive=interactive
    )

GeminiLogicalSimulatorTask dataclass

GeminiLogicalSimulatorTask(
    logical_squin_kernel: Method[[], RetType],
    noise_model: LogicalNoiseModelABC,
    physical_arch_spec: ArchSpec,
    physical_move_kernel: Method[[], RetType],
    _post_processing: PostProcessing[RetType],
)

Bases: Generic[RetType]

A compiled simulation task for the Gemini logical simulator.

Created by :meth:GeminiLogicalSimulator.task. The squin-to-move compilation and post-processing extraction are performed eagerly at construction time. Simulation artifacts (physical squin kernel, stim circuits, samplers, detector error model) are computed lazily on first access since they depend on the noise model.

detector_error_model cached property

detector_error_model

The STIM detector error model corresponding to the tsim circuit.

detector_sampler cached property

detector_sampler

The tsim detector sampler.

logical_squin_kernel instance-attribute

logical_squin_kernel: Method[[], RetType]

The input logical squin kernel to be executed on the Gemini architecture.

measurement_sampler cached property

measurement_sampler

The tsim measurement sampler.

noise_model instance-attribute

noise_model: LogicalNoiseModelABC

The noise model to be inserted into the physical squin kernel.

noiseless_detector_sampler cached property

noiseless_detector_sampler

The noiseless tsim detector sampler.

noiseless_measurement_sampler cached property

noiseless_measurement_sampler

The noiseless tsim measurement sampler.

noiseless_physical_squin_kernel cached property

noiseless_physical_squin_kernel: Method[[], RetType]

The physical squin kernel without noise channels.

noiseless_tsim_circuit cached property

noiseless_tsim_circuit: Circuit

The noiseless tsim circuit compiled without noise channels.

physical_arch_spec class-attribute instance-attribute

physical_arch_spec: ArchSpec = field(repr=False)

The physical architecture specification.

physical_move_kernel class-attribute instance-attribute

physical_move_kernel: Method[[], RetType] = field(
    repr=False
)

The physical move kernel that executes the logical squin kernel on the physical architecture.

physical_squin_kernel cached property

physical_squin_kernel: Method[[], RetType]

The physical squin kernel with noise channels.

tsim_circuit cached property

tsim_circuit: Circuit

The tsim circuit corresponding to the physical squin kernel.

fidelity_bounds

fidelity_bounds() -> tuple[float, float]

Compute the fidelity bounds for the physical squin kernel.

Returns:

Type Description
tuple[float, float]

tuple[float, float]: The (min, max) fidelity bounds.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
def fidelity_bounds(self) -> tuple[float, float]:
    """Compute the fidelity bounds for the physical squin kernel.

    Returns:
        tuple[float, float]: The (min, max) fidelity bounds.

    """
    analysis = FidelityAnalysis(self.physical_squin_kernel.dialects)
    analysis.run(self.physical_squin_kernel)

    max_fidelity = 1.0
    min_fidelity = 1.0

    for gate_fid in analysis.gate_fidelities:
        min_fidelity *= gate_fid.min
        max_fidelity *= gate_fid.max

    return min_fidelity, max_fidelity

run

run(
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: Literal[False] = ...
) -> Result[RetType]
run(
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: Literal[True]
) -> DetectorResult
run(
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool
) -> Result[RetType] | DetectorResult
run(
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool = False
) -> Result[RetType] | DetectorResult

Run the kernel and get simulation results.

Parameters:

Name Type Description Default
shots int

Number of shots to run. Defaults to 1.

1
with_noise bool

Whether to include noise in the simulation. Defaults to True.

True
run_detectors bool

When True, use the detector sampler instead of the measurement sampler for faster detector/observable sampling. Defaults to False.

False

Returns:

Name Type Description
Result[RetType] | DetectorResult

Result[RetType]: When run_detectors=False, the full simulation result including measurement outcomes, return values, detectors, and observables.

DetectorResult Result[RetType] | DetectorResult

When run_detectors=True, the result containing only detector and observable outcomes.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
def run(
    self,
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool = False,
) -> Result[RetType] | DetectorResult:
    """Run the kernel and get simulation results.

    Args:
        shots (int): Number of shots to run. Defaults to 1.
        with_noise (bool): Whether to include noise in the simulation. Defaults to True.
        run_detectors (bool): When ``True``, use the detector sampler instead of
            the measurement sampler for faster detector/observable sampling.
            Defaults to False.

    Returns:
        Result[RetType]: When ``run_detectors=False``, the full simulation result
            including measurement outcomes, return values, detectors, and observables.
        DetectorResult: When ``run_detectors=True``, the result containing only
            detector and observable outcomes.

    """
    if run_detectors:
        return self._run_detectors(shots, with_noise)

    if with_noise:
        raw_results = self.measurement_sampler.sample(shots=shots).tolist()
    else:
        raw_results = self.noiseless_measurement_sampler.sample(
            shots=shots
        ).tolist()

    fidelity_min, fidelity_max = self.fidelity_bounds()
    return Result(
        raw_results,
        self.detector_error_model,
        self._post_processing,
        fidelity_min,
        fidelity_max,
    )

run_async

run_async(
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: Literal[False] = ...
) -> Future[Result[RetType]]
run_async(
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: Literal[True]
) -> Future[DetectorResult]
run_async(
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool = False
) -> Future[Result[RetType]] | Future[DetectorResult]

Run the kernel asynchronously and get simulation results.

Parameters:

Name Type Description Default
shots int

Number of shots to run. Defaults to 1.

1
with_noise bool

Whether to include noise in the simulation. Defaults to True.

True
run_detectors bool

When True, use the detector sampler instead of the measurement sampler. Defaults to False.

False

Returns:

Type Description
Future[Result[RetType]] | Future[DetectorResult]

Future[Result[RetType]]: When run_detectors=False, a future resolving to the full simulation result.

Future[Result[RetType]] | Future[DetectorResult]

Future[DetectorResult]: When run_detectors=True, a future resolving to the detector result.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
def run_async(
    self,
    shots: int = 1,
    with_noise: bool = True,
    *,
    run_detectors: bool = False,
) -> Future[Result[RetType]] | Future[DetectorResult]:
    """Run the kernel asynchronously and get simulation results.

    Args:
        shots (int): Number of shots to run. Defaults to 1.
        with_noise (bool): Whether to include noise in the simulation. Defaults to True.
        run_detectors (bool): When ``True``, use the detector sampler instead of
            the measurement sampler. Defaults to False.

    Returns:
        Future[Result[RetType]]: When ``run_detectors=False``, a future resolving
            to the full simulation result.
        Future[DetectorResult]: When ``run_detectors=True``, a future resolving
            to the detector result.

    """
    if run_detectors:
        return self._thread_pool_executor.submit(
            self._run_detectors, shots, with_noise
        )
    return self._thread_pool_executor.submit(self.run, shots, with_noise)

visualize

visualize(animated: bool = False, interactive: bool = True)

Visualize the physical move kernel using the built-in debugger.

Parameters:

Name Type Description Default
animated bool

Whether to use the animated debugger. Defaults to False.

False
interactive bool

Whether to enable interactive mode. Defaults to True.

True
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
def visualize(self, animated: bool = False, interactive: bool = True):
    """Visualize the physical move kernel using the built-in debugger.

    Args:
        animated (bool): Whether to use the animated debugger. Defaults to False.
        interactive (bool): Whether to enable interactive mode. Defaults to True.

    """
    from bloqade.lanes.visualize import animated_debugger, debugger

    if animated:
        animated_debugger(
            self.physical_move_kernel,
            self.physical_arch_spec,
            interactive=interactive,
        )
    else:
        debugger(
            self.physical_move_kernel,
            self.physical_arch_spec,
            interactive=interactive,
        )

Result dataclass

Result(
    _raw_measurements: list[list[bool]],
    _detector_error_model: DetectorErrorModel,
    _post_processing: PostProcessing[RetType],
    _fidelity_min: float,
    _fidelity_max: float,
)

Bases: Generic[RetType]

Simulation result including measurement outcomes, detector error model, post-processing, and fidelity bounds.

detector_error_model property

detector_error_model: DetectorErrorModel

The STIM detector error model corresponding to the physical noise circuit.

Returns:

Name Type Description
DetectorErrorModel DetectorErrorModel

The STIM detector error model.

detectors cached property

detectors: list[list[bool]]

The detector outcomes from the simulation.

Returns:

Type Description
list[list[bool]]

list[list[bool]]: The detector outcomes, one list per shot.

measurements cached property

measurements: list[list[bool]]

The raw measurement outcomes used to compute detectors and observables.

Returns:

Type Description
list[list[bool]]

list[list[bool]]: The raw measurement outcomes, one list per shot.

observables cached property

observables: list[list[bool]]

The observable outcomes from the simulation.

Returns:

Type Description
list[list[bool]]

list[list[bool]]: The observable outcomes, one list per shot.

return_values cached property

return_values: list[RetType]

The return values of the logical kernel.

Returns:

Type Description
list[RetType]

list[RetType]: The return values, one per shot.

fidelity_bounds

fidelity_bounds() -> tuple[float, float]

Return the upper and lower fidelity bounds.

Note: The upper and lower bounds are related to branching logic in the kernel.

Returns:

Type Description
tuple[float, float]

tuple[float, float]: The (min, max) fidelity bounds.

Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device.py
 99
100
101
102
103
104
105
106
107
108
def fidelity_bounds(self) -> tuple[float, float]:
    """Return the upper and lower fidelity bounds.

    Note: The upper and lower bounds are related to branching logic in the kernel.

    Returns:
        tuple[float, float]: The (min, max) fidelity bounds.

    """
    return (self._fidelity_min, self._fidelity_max)