Skip to content

bloqade.gemini.device.simulator.GeminiLogicalSimulator

← Module overview

classGeminiLogicalSimulatorsource

bloqade.gemini.device.simulator.GeminiLogicalSimulator

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`.

Signature
class GeminiLogicalSimulator(noise_model: LogicalNoiseModelABC = _default_noise_model(), backend: AbstractSimulatorBackend = TsimSimulatorBackend())

CUDA-Q users must convert kernels and add any desired detector/observable annotations externally.

Parameters

NameTypeDefaultDescription
noise_modelLogicalNoiseModelABC_default_noise_model()
backendAbstractSimulatorBackendTsimSimulatorBackend()

Attributes

NameTypeDefaultDescription
noise_modelLogicalNoiseModelABCfield(default_factory=_default_noise_model)The noise model used for simulation. Defaults to :func:`generate_logical_noise_model`.
backendAbstractSimulatorBackendfield(default_factory=TsimSimulatorBackend)Sampling backend for tasks created by this simulator.

methodtasksource

bloqade.gemini.device.simulator.GeminiLogicalSimulator.task

Signature
def task(logical_kernel: ir.Method[[], RetType]) -> GeminiLogicalSimulatorTask[RetType]

Create a simulation task for the given kernel.

Eagerly compiles the kernel through squin-to-move and extracts post-processing. Kernels are expected to be SQuIN kernels (for example, CUDA-Q kernels are expected to be first converted to SQuIN).

CUDA-Q conversion and any desired detector/observable annotations must be completed externally.

Parameters

NameTypeDescription
logical_kernelir.Method[[], RetType]The logical squin kernel to compile and run.

Returns

GeminiLogicalSimulatorTask[RetType]The compiled simulation task.

source