IBM QDMI Device
IBM backend queries, OpenQASM 3 execution, and QDMI interfaces
Loading...
Searching...
No Matches
QDMI Device Interface

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

Topics

 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.

Typedefs

typedef struct IBM_QDMI_Child_Device_impl_d * IBM_QDMI_Child_Device
 A handle for a child device.
typedef struct QDMI_Child_Device_impl_d * QDMI_Child_Device
 A handle for a child device.

Functions

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

Detailed 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:

Typedef Documentation

◆ IBM_QDMI_Child_Device

typedef struct IBM_QDMI_Child_Device_impl_d* IBM_QDMI_Child_Device

A handle for a child device.

An opaque pointer to an implementation of the QDMI child device concept. A child device generally represents a core or processing unit of a multicore device. Each implementation of the QDMI Device Interface may define the actual implementation of the concept.

Note
Only authors of a multicore device library that want to facilitate job execution on a dedicated core and/or need to expose device properties on a child device level must implement the concept.

A simple example of an implementation is a struct that merely contains an index, which can be used to identify the respective core / processing unit.

struct IBM_QDMI_Child_Device_impl_d {
size_t id;
};
See also
QDMI_DEVICE_PROPERTY_CHILDDEVICES
QDMI_DEVICE_SESSION_PARAMETER_CHILDDEVICE

◆ QDMI_Child_Device

typedef struct QDMI_Child_Device_impl_d* QDMI_Child_Device

A handle for a child device.

An opaque pointer to an implementation of the QDMI child device concept. A child device generally represents a core or processing unit of a multicore device. Each implementation of the QDMI Device Interface may define the actual implementation of the concept.

Note
Only authors of a multicore device library that want to facilitate job execution on a dedicated core and/or need to expose device properties on a child device level must implement the concept.

A simple example of an implementation is a struct that merely contains an index, which can be used to identify the respective core / processing unit.

struct QDMI_Child_Device_impl_d {
size_t id;
};
See also
QDMI_DEVICE_PROPERTY_CHILDDEVICES
QDMI_DEVICE_SESSION_PARAMETER_CHILDDEVICE

Function Documentation

◆ IBM_QDMI_device_finalize()

int IBM_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.

◆ IBM_QDMI_device_initialize()

int IBM_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.

◆ 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.