GPU and QuEST

Note

These functions are in every build, but the backends they load are not part of the pip package. GPU simulation requires GPU access (see Get GPU access), and QuEST requires the separate libmaestroquest plugin. Without them, the is_*_available functions return False. is_quest_available also returns False until init_quest has loaded the plugin. is_distributed_gpu_available and finalize_distributed_mpi_gpu exist in Linux builds only.

is_gpu_available() → bool

Check availability of the default GPU, initializing it lazily.

init_gpu() → bool

Initialize the GPU simulation library. Returns True on success.

get_gpu_device_count() → int

Number of CUDA-capable devices visible to the process, or 0 if the GPU library cannot be loaded or none are visible; -1 on CUDA discovery errors. Does not initialize a simulator.

select_gpu_device(arg: int, /) → None

Select the default CUDA device for future simulators and init_gpu(). SimulatorConfig.gpu_device overrides this default; existing simulators keep their device.

is_quest_available() → bool

Check whether the QuEST simulation library is loaded and available.

init_quest() → bool

Initialize the QuEST simulation library. Returns True on success.