MQT Core
The Backbone of the Munich Quantum Toolkit (MQT)
Loading...
Searching...
No Matches
qdmi::Session Class Reference

Class representing the Session library. More...

#include <Client.hpp>

Public Member Functions

 Session (const SessionConfig &config={})
 Constructs a new QDMI Session with optional authentication.
 
std::vector< DevicegetDevices ()
 

Static Public Member Functions

static Device createSessionlessDevice (QDMI_Device device)
 Creates a Device object from a QDMI_Device handle.
 
static Device openDevice (std::string_view id, const qdmi::DeviceSessionConfig &overrides={})
 Opens a registered QDMI device as a fresh device session.
 

Detailed Description

Class representing the Session library.

This class provides methods to query available devices and manage the QDMI session.

See also
QDMI_Session

Constructor & Destructor Documentation

◆ Session()

qdmi::Session::Session ( const SessionConfig config = {})
explicit

Constructs a new QDMI Session with optional authentication.

Parameters
configOptional session configuration containing authentication parameters. If not provided, uses default (no authentication).

Creates, allocates, and initializes a new QDMI session.

Member Function Documentation

◆ createSessionlessDevice()

static Device qdmi::Session::createSessionlessDevice ( QDMI_Device  device)
static

Creates a Device object from a QDMI_Device handle.

Parameters
deviceThe QDMI_Device handle to wrap.
Returns
A Device object wrapping the given handle.
Note
This is a factory method for use in bindings where a session is not accessible.

◆ openDevice()

static Device qdmi::Session::openDevice ( std::string_view  id,
const qdmi::DeviceSessionConfig overrides = {} 
)
static

Opens a registered QDMI device as a fresh device session.

Parameters
idStable registered device ID.
overridesSession values that replace registered defaults.
Returns
An owning device wrapper for the new session.

◆ getDevices()

std::vector< Device > qdmi::Session::getDevices ( )