bloqade.gemini.device.simulator.GeminiLogicalSimulator
classGeminiLogicalSimulator¶source
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
| Name | Type | Default | Description |
|---|---|---|---|
noise_model | LogicalNoiseModelABC | _default_noise_model() | |
backend | AbstractSimulatorBackend | TsimSimulatorBackend() |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
noise_model | LogicalNoiseModelABC | field(default_factory=_default_noise_model) | The noise model used for simulation. Defaults to :func:`generate_logical_noise_model`. |
backend | AbstractSimulatorBackend | field(default_factory=TsimSimulatorBackend) | Sampling backend for tasks created by this simulator. |
methodtask¶source
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
| Name | Type | Description |
|---|---|---|
logical_kernel | ir.Method[[], RetType] | The logical squin kernel to compile and run. |
Returns
GeminiLogicalSimulatorTask[RetType]The compiled simulation task.