QDMI v1.1.0
Quantum Device Management Interface
Loading...
Searching...
No Matches
QDMI Device Interface

Description

Describes the functions to be implemented by a device or backend to be used with QDMI.

This is an interface between the QDMI driver and the device. It includes functions to initialize and finalize a device, as well as to manage sessions between a QDMI driver and a device, query properties of the device, and submit jobs to the device.

The device interface is split into three parts:

Interfaces

 QDMI Device Session Interface
 Provides functions to manage sessions between the driver and device.
 
 QDMI Device Query Interface
 Provides functions to query properties of a device.
 
 QDMI Device Job Interface
 Provides functions to manage jobs on a device.
 

Functions

int QDMI_device_initialize (void)
 Initialize a device.
 
int QDMI_device_finalize (void)
 Finalize a device.
 

Function Documentation

◆ QDMI_device_initialize()

int QDMI_device_initialize ( void )

Initialize a device.

A device can expect that this function is called exactly once in the beginning and has returned before any other functions are invoked on that device.

Returns
QDMI_SUCCESS if the device was initialized successfully.
QDMI_ERROR_FATAL if an unexpected error occurred.

◆ QDMI_device_finalize()

int QDMI_device_finalize ( void )

Finalize a device.

A device can expect that this function is called exactly once at the end of using the device, and no other functions are invoked on that device afterward.

Returns
QDMI_SUCCESS if the device was finalized successfully.
QDMI_ERROR_FATAL if the finalization failed, this could, for example, be due to a job that is still running.