QDMI v1.1.0
Quantum Device Management Interface
Loading...
Searching...
No Matches
device.h
Go to the documentation of this file.
1/*------------------------------------------------------------------------------
2Copyright 2024 Munich Quantum Software Stack Project
3
4Licensed under the Apache License, Version 2.0 with LLVM Exceptions (the
5"License"); you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8https://github.com/Munich-Quantum-Software-Stack/QDMI/blob/develop/LICENSE
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13License for the specific language governing permissions and limitations under
14the License.
15
16SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
17------------------------------------------------------------------------------*/
18
23#pragma once
24
25#include "qdmi/constants.h" // IWYU pragma: export
26#include "qdmi/types.h" // IWYU pragma: export
27
28#ifdef __cplusplus
29#include <cstddef>
30
31extern "C" {
32#else
33#include <stddef.h>
34#endif
35
36// The following clang-tidy warning cannot be addressed because this header is
37// used from both C and C++ code.
38// NOLINTBEGIN(performance-enum-size,modernize-use-using,modernize-redundant-void-arg)
39
68
79
106typedef struct QDMI_Device_Session_impl_d *QDMI_Device_Session;
107
124
160 size_t size, const void *value);
161
189
197
198 // end of device_session_interface
199
248 size_t size, void *value,
249 size_t *size_ret);
250
289 QDMI_Site site,
291 size_t size, void *value,
292 size_t *size_ret);
293
351 QDMI_Device_Session session, QDMI_Operation operation, size_t num_sites,
352 const QDMI_Site *sites, size_t num_params, const double *params,
353 QDMI_Operation_Property prop, size_t size, void *value, size_t *size_ret);
354
355 // end of device_query_interface
356
384typedef struct QDMI_Device_Job_impl_d *QDMI_Device_Job;
385
407 QDMI_Device_Job *job);
408
444 QDMI_Device_Job_Parameter param, size_t size,
445 const void *value);
446
461
475
490
504
540 size_t size, void *data, size_t *size_ret);
541
549
550 // end of device_job_interface
551
552 // end of device_interface
553
554// NOLINTEND(performance-enum-size,modernize-use-using,modernize-redundant-void-arg)
555
556#ifdef __cplusplus
557} // extern "C"
558#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:386
enum QDMI_JOB_RESULT_T QDMI_Job_Result
Job result type.
Definition constants.h:644
enum QDMI_DEVICE_JOB_PARAMETER_T QDMI_Device_Job_Parameter
Device job parameter type.
Definition constants.h:165
enum QDMI_SITE_PROPERTY_T QDMI_Site_Property
Site property type.
Definition constants.h:317
enum QDMI_DEVICE_SESSION_PARAMETER_T QDMI_Device_Session_Parameter
Device session parameter type.
Definition constants.h:106
enum QDMI_OPERATION_PROPERTY_T QDMI_Operation_Property
Operation property type.
Definition constants.h:362
enum QDMI_DEVICE_PROPERTY_T QDMI_Device_Property
Device property type.
Definition constants.h:248
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_wait(QDMI_Device_Job job)
Wait for a job to finish.
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.
struct QDMI_Device_Job_impl_d * QDMI_Device_Job
A handle for a device job.
Definition device.h:384
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:106
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:53
struct QDMI_Operation_impl_d * QDMI_Operation
A handle for an operation.
Definition types.h:72