mqt.core.qdmi.slurm

Open a QDMI device named by the Slurm license environment.

Module Contents

open_device_from_license() → Device

Open the QDMI device named by the Slurm license environment.

SLURM_JOB_LICENSES must contain one local license whose name equals a registered QDMI device ID. The optional count must be one. The function opens a fresh device session from the persistent definition and accepts device status IDLE or BUSY. It does not apply job-specific QDMI configuration or credentials.

Warning

SLURM_JOB_LICENSES is process-mutable. This function uses it only for device selection. It does not verify a Slurm allocation, authenticate the caller, or authorize device access. The provider or operating system must enforce access independently.

Returns:

The fresh device session.

Return type:

Device

Raises:

RuntimeError – If the license value or named device does not satisfy this contract.