Simulator backend
AbstractSimulatorBackend
Bases: ABC
flowchart TD
bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend[AbstractSimulatorBackend]
click bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend href "" "bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend"
Sampling and detector-model contract for Gemini simulators.
sample
abstractmethod
sample(
physical_squin_kernel: Method, *, shots: int
) -> BackendSample
Sample a compiled physical SQuIn kernel.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device/simulator_backend.py
53 54 55 56 57 58 59 60 | |
BackendSample
dataclass
BackendSample(
measurements: ndarray | None = None,
detectors: ndarray | None = None,
observables: ndarray | None = None,
)
Raw samples returned by a simulator backend.
A backend may return measurements, or it may return detector and observable arrays directly. Task execution validates and normalizes the selected form.
CliffTSimulatorBackend
dataclass
CliffTSimulatorBackend(
seed: int | None = None,
_tsim_backend: TsimSimulatorBackend = TsimSimulatorBackend(),
)
Bases: AbstractSimulatorBackend
flowchart TD
bloqade.gemini.device.simulator_backend.CliffTSimulatorBackend[CliffTSimulatorBackend]
bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend[AbstractSimulatorBackend]
bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend --> bloqade.gemini.device.simulator_backend.CliffTSimulatorBackend
click bloqade.gemini.device.simulator_backend.CliffTSimulatorBackend href "" "bloqade.gemini.device.simulator_backend.CliffTSimulatorBackend"
click bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend href "" "bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend"
Backend using Tsim for conversion/DEM generation and CliffT for sampling.
seed is a construction-time root seed. Each seeded sampling request
receives the next derived child seed from this backend's private stream.
sample
sample(
physical_squin_kernel: Method, *, shots: int
) -> BackendSample
Sample a compiled physical SQuIn kernel.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device/simulator_backend.py
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
PPVMSimulatorBackend
dataclass
PPVMSimulatorBackend(
seed: int | None = None,
_tsim_backend: TsimSimulatorBackend = TsimSimulatorBackend(),
)
Bases: AbstractSimulatorBackend
flowchart TD
bloqade.gemini.device.simulator_backend.PPVMSimulatorBackend[PPVMSimulatorBackend]
bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend[AbstractSimulatorBackend]
bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend --> bloqade.gemini.device.simulator_backend.PPVMSimulatorBackend
click bloqade.gemini.device.simulator_backend.PPVMSimulatorBackend href "" "bloqade.gemini.device.simulator_backend.PPVMSimulatorBackend"
click bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend href "" "bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend"
Backend using Tsim for conversion/DEM generation and PPVM for sampling.
seed is a construction-time root seed. Each seeded sampling request
receives the next derived child seed from this backend's private stream.
sample
sample(
physical_squin_kernel: Method, *, shots: int
) -> BackendSample
Sample a compiled physical SQuIn kernel.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device/simulator_backend.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | |
TsimSimulatorBackend
dataclass
TsimSimulatorBackend(
seed: int | None = None, run_detectors: bool = False
)
Bases: AbstractSimulatorBackend
flowchart TD
bloqade.gemini.device.simulator_backend.TsimSimulatorBackend[TsimSimulatorBackend]
bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend[AbstractSimulatorBackend]
bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend --> bloqade.gemini.device.simulator_backend.TsimSimulatorBackend
click bloqade.gemini.device.simulator_backend.TsimSimulatorBackend href "" "bloqade.gemini.device.simulator_backend.TsimSimulatorBackend"
click bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend href "" "bloqade.gemini.device.simulator_backend.AbstractSimulatorBackend"
Backend that uses Tsim for both sampling and DEM generation.
seed is a construction-time root seed. Each seeded sampling request
receives the next derived child seed from this backend's private stream.
sample
sample(
physical_squin_kernel: Method, *, shots: int
) -> BackendSample
Sample a compiled physical SQuIn kernel.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/device/simulator_backend.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |