QDMI v1.2.1
Quantum Device Management Interface
Loading...
Searching...
No Matches
device.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 - 2025 Munich Quantum Software Stack Project
3 * All rights reserved.
4 *
5 * Licensed under the Apache License v2.0 with LLVM Exceptions (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://github.com/Munich-Quantum-Software-Stack/QDMI/blob/develop/LICENSE.md
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 *
17 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
18 */
19
23
24#pragma once
25
26#include "qdmi/constants.h" // IWYU pragma: export
27#include "qdmi/types.h" // IWYU pragma: export
28
29#ifdef __cplusplus
30#include <cstddef>
31
32extern "C" {
33#else
34#include <stddef.h>
35#endif
36
37// The following clang-tidy warning cannot be addressed because this header is
38// used from both C and C++ code.
39// NOLINTBEGIN(performance-enum-size,modernize-use-using,modernize-redundant-void-arg)
40
59
69
80
101
107typedef struct QDMI_Device_Session_impl_d *QDMI_Device_Session;
108
125
161 size_t size, const void *value);
162
190
198 // end of device_session_interface
200
210
249 size_t size, void *value,
250 size_t *size_ret);
251
290 QDMI_Site site,
292 size_t size, void *value,
293 size_t *size_ret);
294
352 QDMI_Device_Session session, QDMI_Operation operation, size_t num_sites,
353 const QDMI_Site *sites, size_t num_params, const double *params,
354 QDMI_Operation_Property prop, size_t size, void *value, size_t *size_ret);
355 // end of device_query_interface
357
375
385typedef struct QDMI_Device_Job_impl_d *QDMI_Device_Job;
386
408 QDMI_Device_Job *job);
409
445 QDMI_Device_Job_Parameter param, size_t size,
446 const void *value);
447
483 QDMI_Device_Job_Property prop, size_t size,
484 void *value, size_t *size_ret);
485
500
514
529
548int QDMI_device_job_wait(QDMI_Device_Job job, size_t timeout);
549
585 size_t size, void *data, size_t *size_ret);
586
594 // end of device_job_interface
596 // end of device_interface
598
599// NOLINTEND(performance-enum-size,modernize-use-using,modernize-redundant-void-arg)
600
601#ifdef __cplusplus
602} // extern "C"
603#endif
Defines all enums used within QDMI across the QDMI Client Interface and the QDMI Device Interface.
enum QDMI_JOB_STATUS_T QDMI_Job_Status
Job status type.
Definition constants.h:845
enum QDMI_JOB_RESULT_T QDMI_Job_Result
Job result type.
Definition constants.h:1120
enum QDMI_DEVICE_JOB_PARAMETER_T QDMI_Device_Job_Parameter
Device job parameter type.
Definition constants.h:203
enum QDMI_SITE_PROPERTY_T QDMI_Site_Property
Site property type.
Definition constants.h:667
enum QDMI_DEVICE_JOB_PROPERTY_T QDMI_Device_Job_Property
Device job property type.
Definition constants.h:269
enum QDMI_DEVICE_SESSION_PARAMETER_T QDMI_Device_Session_Parameter
Device session parameter type.
Definition constants.h:144
enum QDMI_OPERATION_PROPERTY_T QDMI_Operation_Property
Operation property type.
Definition constants.h:817
enum QDMI_DEVICE_PROPERTY_T QDMI_Device_Property
Device property type.
Definition constants.h:432
int QDMI_device_initialize(void)
Initialize a device.
int QDMI_device_finalize(void)
Finalize a device.
int QDMI_device_job_get_results(QDMI_Device_Job job, QDMI_Job_Result result, size_t size, void *data, size_t *size_ret)
Retrieve the results of a job.
int QDMI_device_job_set_parameter(QDMI_Device_Job job, QDMI_Device_Job_Parameter param, size_t size, const void *value)
Set a parameter for a job.
int QDMI_device_job_query_property(QDMI_Device_Job job, QDMI_Device_Job_Property prop, size_t size, void *value, size_t *size_ret)
Query a job property.
int QDMI_device_session_create_device_job(QDMI_Device_Session session, QDMI_Device_Job *job)
Create a job.
int QDMI_device_job_check(QDMI_Device_Job job, QDMI_Job_Status *status)
Check the status of a job.
int QDMI_device_job_cancel(QDMI_Device_Job job)
Cancel an already submitted job.
int QDMI_device_job_wait(QDMI_Device_Job job, size_t timeout)
Wait for a job to finish.
struct QDMI_Device_Job_impl_d * QDMI_Device_Job
A handle for a device job.
Definition device.h:385
int QDMI_device_job_submit(QDMI_Device_Job job)
Submit a job to the device.
void QDMI_device_job_free(QDMI_Device_Job job)
Free a job.
int QDMI_device_session_query_operation_property(QDMI_Device_Session session, QDMI_Operation operation, size_t num_sites, const QDMI_Site *sites, size_t num_params, const double *params, QDMI_Operation_Property prop, size_t size, void *value, size_t *size_ret)
Query an operation property.
int QDMI_device_session_query_site_property(QDMI_Device_Session session, QDMI_Site site, QDMI_Site_Property prop, size_t size, void *value, size_t *size_ret)
Query a site property.
int QDMI_device_session_query_device_property(QDMI_Device_Session session, QDMI_Device_Property prop, size_t size, void *value, size_t *size_ret)
Query a device property.
int QDMI_device_session_init(QDMI_Device_Session session)
Initialize a device session.
struct QDMI_Device_Session_impl_d * QDMI_Device_Session
A handle for a device session.
Definition device.h:107
void QDMI_device_session_free(QDMI_Device_Session session)
Free a QDMI device session.
int QDMI_device_session_set_parameter(QDMI_Device_Session session, QDMI_Device_Session_Parameter param, size_t size, const void *value)
Set a parameter for a device session.
int QDMI_device_session_alloc(QDMI_Device_Session *session)
Allocate a new device session.
Defines all types used within QDMI across the QDMI Client Interface and the QDMI Device Interface.
struct QDMI_Site_impl_d * QDMI_Site
A handle for a site.
Definition types.h:54
struct QDMI_Operation_impl_d * QDMI_Operation
A handle for an operation.
Definition types.h:73