25#ifndef QDMI_CONSTANTS_H
26#define QDMI_CONSTANTS_H
32#define QDMI_MAKE_VERSION(major, minor, patch) \
33 ((((uint32_t)(major) & 0x3FFU) << 22U) | \
34 (((uint32_t)(minor) & 0x3FFU) << 12U) | ((uint32_t)(patch) & 0xFFFU))
37#define QDMI_VERSION_MAJOR(version) (((uint32_t)(version) >> 22U) & 0x3FFU)
39#define QDMI_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU)
41#define QDMI_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU)
46#define QDMI_IS_INVALID_ENUM_VALUE(value, PREFIX) \
47 ((value) >= PREFIX##_MAX && (value) != PREFIX##_CUSTOM1 && \
48 (value) != PREFIX##_CUSTOM2 && (value) != PREFIX##_CUSTOM3 && \
49 (value) != PREFIX##_CUSTOM4 && (value) != PREFIX##_CUSTOM5)
QDMI_JOB_STATUS_T
Enum of the status a job can have.
Definition constants.h:904
@ QDMI_JOB_STATUS_CANCELED
The job stopped after cancellation; completed programs retain results.
Definition constants.h:919
@ QDMI_JOB_STATUS_CREATED
The job was created and can be configured via QDMI_job_set_parameter.
Definition constants.h:909
@ QDMI_JOB_STATUS_SUBMITTED
The job was submitted.
Definition constants.h:911
@ QDMI_JOB_STATUS_QUEUED
The job was received, and is waiting to be executed.
Definition constants.h:913
@ QDMI_JOB_STATUS_FAILED
One or more programs failed, or another error occurred in the lifecycle.
Definition constants.h:921
@ QDMI_JOB_STATUS_RUNNING
One or more programs are still running.
Definition constants.h:915
@ QDMI_JOB_STATUS_DONE
All programs succeeded, and their results can be retrieved.
Definition constants.h:917
enum QDMI_DEVICE_STATUS_T QDMI_Device_Status
Device status type.
Definition constants.h:534
enum QDMI_JOB_STATUS_T QDMI_Job_Status
Job status type.
Definition constants.h:925
QDMI_PROGRAM_FORMAT_T
Enum of formats that can be submitted to the device.
Definition constants.h:930
@ QDMI_PROGRAM_FORMAT_CUSTOM3
Definition constants.h:1081
@ QDMI_PROGRAM_FORMAT_QIRBASESTRING
char* (string) A text-based QIR program complying to the QIR base profile.
Definition constants.h:1008
@ QDMI_PROGRAM_FORMAT_QASM3
char* (string) An OpenQASM 3 program.
Definition constants.h:978
@ QDMI_PROGRAM_FORMAT_CUSTOM4
Definition constants.h:1083
@ QDMI_PROGRAM_FORMAT_QPY
void* A QPY program.
Definition constants.h:1052
@ QDMI_PROGRAM_FORMAT_QIRBASEMODULE
void* A QIR binary complying to the QIR base profile.
Definition constants.h:1019
@ QDMI_PROGRAM_FORMAT_CUSTOM2
Definition constants.h:1079
@ QDMI_PROGRAM_FORMAT_CUSTOM5
Definition constants.h:1085
@ QDMI_PROGRAM_FORMAT_QIRADAPTIVESTRING
char* (string) A text-based QIR program complying to the QIR adaptive profile.
Definition constants.h:1030
@ QDMI_PROGRAM_FORMAT_QIRADAPTIVEMODULE
void* A QIR binary complying to the QIR adaptive profile.
Definition constants.h:1040
@ QDMI_PROGRAM_FORMAT_IQMJSON
char* (string) A program in the IQM data transfer format.
Definition constants.h:1060
@ QDMI_PROGRAM_FORMAT_CUSTOM1
This enum value is reserved for a custom program format.
Definition constants.h:1077
@ QDMI_PROGRAM_FORMAT_MAX
Value 9 is reserved for the removed batch-job format; do not reuse it.
Definition constants.h:1070
@ QDMI_PROGRAM_FORMAT_QASM2
char* (string) An OpenQASM 2.0 program.
Definition constants.h:956
QDMI_DEVICE_JOB_PARAMETER_T
Enum of the device job parameters that can be set via QDMI_device_job_set_parameter.
Definition constants.h:188
@ QDMI_DEVICE_JOB_PARAMETER_SHOTSNUM
size_t The number of shots to execute for each program in a job.
Definition constants.h:196
@ QDMI_DEVICE_JOB_PARAMETER_MAX
The maximum value of the enum.
Definition constants.h:205
@ QDMI_DEVICE_JOB_PARAMETER_CUSTOM1
This enum value is reserved for a custom parameter.
Definition constants.h:212
@ QDMI_DEVICE_JOB_PARAMETER_CUSTOM4
Definition constants.h:218
@ QDMI_DEVICE_JOB_PARAMETER_CUSTOM2
Definition constants.h:214
@ QDMI_DEVICE_JOB_PARAMETER_CUSTOM5
Definition constants.h:220
@ QDMI_DEVICE_JOB_PARAMETER_CUSTOM3
Definition constants.h:216
QDMI_STATUS
Status codes returned by the API.
Definition constants.h:62
@ QDMI_ERROR_NOTFOUND
Element not found.
Definition constants.h:69
@ QDMI_ERROR_OUTOFMEM
Out of memory.
Definition constants.h:66
@ QDMI_ERROR_NOTSUPPORTED
Definition constants.h:73
@ QDMI_WARN_GENERAL
A general warning.
Definition constants.h:63
@ QDMI_ERROR_INVALIDARGUMENT
Invalid argument.
Definition constants.h:71
@ QDMI_ERROR_FATAL
A fatal error.
Definition constants.h:65
@ QDMI_SUCCESS
The operation was successful.
Definition constants.h:64
@ QDMI_ERROR_BADSTATE
Resource is in the wrong state for the operation.
Definition constants.h:75
@ QDMI_ERROR_OUTOFRANGE
Out of range.
Definition constants.h:70
@ QDMI_ERROR_NOTIMPLEMENTED
Not implemented.
Definition constants.h:67
@ QDMI_ERROR_PERMISSIONDENIED
Permission denied.
Definition constants.h:72
@ QDMI_ERROR_TIMEOUT
Operation timed out.
Definition constants.h:76
@ QDMI_ERROR_LIBNOTFOUND
Library not found.
Definition constants.h:68
enum QDMI_PROGRAM_FORMAT_T QDMI_Program_Format
Program format type.
Definition constants.h:1089
enum QDMI_JOB_RESULT_T QDMI_Job_Result
Job result type.
Definition constants.h:1199
enum QDMI_DEVICE_JOB_PARAMETER_T QDMI_Device_Job_Parameter
Device job parameter type.
Definition constants.h:224
enum QDMI_SITE_PROPERTY_T QDMI_Site_Property
Site property type.
Definition constants.h:747
QDMI_SITE_PROPERTY_T
Definition constants.h:540
@ QDMI_SITE_PROPERTY_INDEX
size_t The unique index (or ID) to identify the site in a program.
Definition constants.h:552
@ QDMI_SITE_PROPERTY_XCOORDINATE
int64_t The raw, unscaled X-coordinate of the site.
Definition constants.h:599
@ QDMI_SITE_PROPERTY_ZEXTENT
uint64_t The raw, unscaled extent of a zone along the Z-axis.
Definition constants.h:704
@ QDMI_SITE_PROPERTY_CUSTOM1
This enum value is reserved for a custom property.
Definition constants.h:735
@ QDMI_SITE_PROPERTY_CUSTOM4
Definition constants.h:741
@ QDMI_SITE_PROPERTY_XEXTENT
uint64_t The raw, unscaled extent of a zone along the X-axis.
Definition constants.h:672
@ QDMI_SITE_PROPERTY_CUSTOM2
Definition constants.h:737
@ QDMI_SITE_PROPERTY_CUSTOM3
Definition constants.h:739
@ QDMI_SITE_PROPERTY_T1
uint64_t The raw, unscaled T1 time of a site.
Definition constants.h:563
@ QDMI_SITE_PROPERTY_ISZONE
bool Whether the site is a zone.
Definition constants.h:656
@ QDMI_SITE_PROPERTY_T2
uint64_t The raw, unscaled T2 time of a site.
Definition constants.h:574
@ QDMI_SITE_PROPERTY_YEXTENT
uint64_t The raw, unscaled extent of a zone along the Y-axis.
Definition constants.h:688
@ QDMI_SITE_PROPERTY_MODULEINDEX
uint64_t an unsigned integer that uniquely identifies the module.
Definition constants.h:710
@ QDMI_SITE_PROPERTY_SUBMODULEINDEX
uint64_t an unsigned integer uniquely identifying the submodule within a module.
Definition constants.h:719
@ QDMI_SITE_PROPERTY_YCOORDINATE
int64_t The raw, unscaled Y-coordinate of the site.
Definition constants.h:619
@ QDMI_SITE_PROPERTY_ZCOORDINATE
int64_t The raw, unscaled Z-coordinate of the site.
Definition constants.h:639
@ QDMI_SITE_PROPERTY_NAME
Definition constants.h:579
@ QDMI_SITE_PROPERTY_MAX
The maximum value of the enum.
Definition constants.h:728
@ QDMI_SITE_PROPERTY_CUSTOM5
Definition constants.h:743
QDMI_DEVICE_JOB_PROPERTY_T
Enum of the device job properties that can be queried via QDMI_device_job_query_property as part of t...
Definition constants.h:233
@ QDMI_DEVICE_JOB_PROPERTY_CUSTOM5
Definition constants.h:305
@ QDMI_DEVICE_JOB_PROPERTY_CUSTOM1
This enum value is reserved for a custom parameter.
Definition constants.h:297
@ QDMI_DEVICE_JOB_PROPERTY_QUEUEPOSITION
size_t The current number of jobs ahead of this job in its queue.
Definition constants.h:274
@ QDMI_DEVICE_JOB_PROPERTY_PROGRAMFORMAT
QDMI_Program_Format The format of the program to be executed.
Definition constants.h:252
@ QDMI_DEVICE_JOB_PROPERTY_CUSTOM4
Definition constants.h:303
@ QDMI_DEVICE_JOB_PROPERTY_PROGRAMSNUM
size_t The number of programs in the job.
Definition constants.h:281
@ QDMI_DEVICE_JOB_PROPERTY_CUSTOM3
Definition constants.h:301
@ QDMI_DEVICE_JOB_PROPERTY_SHOTSNUM
Value 2 is reserved for the removed program property; do not reuse it.
Definition constants.h:259
@ QDMI_DEVICE_JOB_PROPERTY_MAX
The maximum value of the enum.
Definition constants.h:290
@ QDMI_DEVICE_JOB_PROPERTY_CUSTOM2
Definition constants.h:299
@ QDMI_DEVICE_JOB_PROPERTY_ID
char* (string) The job's ID.
Definition constants.h:244
enum QDMI_DEVICE_JOB_PROPERTY_T QDMI_Device_Job_Property
Device job property type.
Definition constants.h:309
QDMI_DEVICE_SESSION_PARAMETER_T
Enum of the device session parameters that can be set via QDMI_device_session_set_parameter.
Definition constants.h:85
@ QDMI_DEVICE_SESSION_PARAMETER_MAX
The maximum value of the enum.
Definition constants.h:161
@ QDMI_DEVICE_SESSION_PARAMETER_PASSWORD
char* (string) The password to use for the session.
Definition constants.h:140
@ QDMI_DEVICE_SESSION_PARAMETER_CUSTOM4
Definition constants.h:174
@ QDMI_DEVICE_SESSION_PARAMETER_TOKEN
char* (string) A token to be used in the session initialization for authenticating with the device.
Definition constants.h:103
@ QDMI_DEVICE_SESSION_PARAMETER_CUSTOM5
Definition constants.h:176
@ QDMI_DEVICE_SESSION_PARAMETER_USERNAME
char* (string) The username to use for the device session.
Definition constants.h:133
@ QDMI_DEVICE_SESSION_PARAMETER_CUSTOM2
Definition constants.h:170
@ QDMI_DEVICE_SESSION_PARAMETER_CUSTOM3
Definition constants.h:172
@ QDMI_DEVICE_SESSION_PARAMETER_BASEURL
char* (string) The baseURL or API endpoint to be used for accessing the device within the session.
Definition constants.h:94
@ QDMI_DEVICE_SESSION_PARAMETER_CUSTOM1
This enum value is reserved for a custom parameter.
Definition constants.h:168
@ QDMI_DEVICE_SESSION_PARAMETER_CHILDDEVICE
QDMI_Child_Device The child device to establish the session with.
Definition constants.h:152
@ QDMI_DEVICE_SESSION_PARAMETER_AUTHURL
char* (string) The URL to an authentication server used as part of the authentication procedure.
Definition constants.h:126
@ QDMI_DEVICE_SESSION_PARAMETER_AUTHFILE
char* (string) A file path to a file containing authentication information.
Definition constants.h:112
QDMI_DEVICE_STATUS_T
Enum of different status the device can be in.
Definition constants.h:515
@ QDMI_DEVICE_STATUS_IDLE
The device is idle.
Definition constants.h:517
@ QDMI_DEVICE_STATUS_OFFLINE
The device is offline.
Definition constants.h:516
@ QDMI_DEVICE_STATUS_ERROR
The device is in an error state.
Definition constants.h:519
@ QDMI_DEVICE_STATUS_MAX
The maximum value of the enum.
Definition constants.h:530
@ QDMI_DEVICE_STATUS_CALIBRATION
The device is in calibration.
Definition constants.h:521
@ QDMI_DEVICE_STATUS_MAINTENANCE
The device is in maintenance.
Definition constants.h:520
@ QDMI_DEVICE_STATUS_BUSY
The device is busy.
Definition constants.h:518
QDMI_JOB_RESULT_T
Enum of the formats the results can be returned in.
Definition constants.h:1096
@ QDMI_JOB_RESULT_PROBABILITIES_DENSE
double* (double list) The probabilities of the result.
Definition constants.h:1136
@ QDMI_JOB_RESULT_MAX
The maximum value of the enum.
Definition constants.h:1180
@ QDMI_JOB_RESULT_STATEVECTOR_DENSE
double* (double list) The state vector of the result.
Definition constants.h:1128
@ QDMI_JOB_RESULT_HIST_KEYS
char* (string) The keys for the histogram of the results.
Definition constants.h:1113
@ QDMI_JOB_RESULT_PROBABILITIES_SPARSE_VALUES
double* (double list) The values for the sparse probabilities of the result.
Definition constants.h:1171
@ QDMI_JOB_RESULT_HIST_VALUES
size_t* (size_t list) The values for the histogram of the results.
Definition constants.h:1119
@ QDMI_JOB_RESULT_STATEVECTOR_SPARSE_VALUES
double* (double list) The values for the sparse state vector of the result.
Definition constants.h:1153
@ QDMI_JOB_RESULT_CUSTOM1
This enum value is reserved for a custom result.
Definition constants.h:1187
@ QDMI_JOB_RESULT_CUSTOM5
Definition constants.h:1195
@ QDMI_JOB_RESULT_CUSTOM2
Definition constants.h:1189
@ QDMI_JOB_RESULT_STATEVECTOR_SPARSE_KEYS
char* (string) The keys for the sparse state vector of the result.
Definition constants.h:1144
@ QDMI_JOB_RESULT_SHOTS
char* (string) The results of the individual shots as a comma-separated list, for example,...
Definition constants.h:1102
@ QDMI_JOB_RESULT_CUSTOM4
Definition constants.h:1193
@ QDMI_JOB_RESULT_CUSTOM3
Definition constants.h:1191
@ QDMI_JOB_RESULT_PROBABILITIES_SPARSE_KEYS
char* (string) The keys for the sparse probabilities of the result.
Definition constants.h:1162
QDMI_OPERATION_PROPERTY_T
Definition constants.h:754
@ QDMI_OPERATION_PROPERTY_CUSTOM2
Definition constants.h:887
@ QDMI_OPERATION_PROPERTY_MAX
The maximum value of the enum.
Definition constants.h:878
@ QDMI_OPERATION_PROPERTY_BLOCKINGRADIUS
uint64_t The raw, unscaled blocking radius of the operation.
Definition constants.h:811
@ QDMI_OPERATION_PROPERTY_ISZONED
bool Whether the operation is a zoned (global) operation.
Definition constants.h:838
@ QDMI_OPERATION_PROPERTY_QUBITSNUM
size_t The number of qubits involved in the operation.
Definition constants.h:758
@ QDMI_OPERATION_PROPERTY_NAME
char* (string) The string identifier of the operation.
Definition constants.h:756
@ QDMI_OPERATION_PROPERTY_PARAMETERSNUM
size_t The number of floating point parameters the operation takes.
Definition constants.h:760
@ QDMI_OPERATION_PROPERTY_INTERACTIONRADIUS
uint64_t The raw, unscaled interaction radius of the operation.
Definition constants.h:792
@ QDMI_OPERATION_PROPERTY_CUSTOM1
This enum value is reserved for a custom property.
Definition constants.h:885
@ QDMI_OPERATION_PROPERTY_CUSTOM3
Definition constants.h:889
@ QDMI_OPERATION_PROPERTY_DURATION
uint64_t The raw, unscaled duration of an operation.
Definition constants.h:771
@ QDMI_OPERATION_PROPERTY_MEANSHUTTLINGSPEED
uint64_t The raw, unscaled mean shuttling speed of an operation.
Definition constants.h:869
@ QDMI_OPERATION_PROPERTY_CUSTOM5
Definition constants.h:893
@ QDMI_OPERATION_PROPERTY_IDLINGFIDELITY
double Fidelity of qubits idling during a global operation.
Definition constants.h:824
@ QDMI_OPERATION_PROPERTY_FIDELITY
double The fidelity of an operation.
Definition constants.h:773
@ QDMI_OPERATION_PROPERTY_SITES
QDMI_Site* (list) The sites to which the operation is applicable.
Definition constants.h:851
@ QDMI_OPERATION_PROPERTY_CUSTOM4
Definition constants.h:891
enum QDMI_DEVICE_SESSION_PARAMETER_T QDMI_Device_Session_Parameter
Device session parameter type.
Definition constants.h:180
enum QDMI_OPERATION_PROPERTY_T QDMI_Operation_Property
Operation property type.
Definition constants.h:897
QDMI_DEVICE_PROPERTY_T
Definition constants.h:318
@ QDMI_DEVICE_PROPERTY_ID
char* (string) The stable client-visible device identifier.
Definition constants.h:484
@ QDMI_DEVICE_PROPERTY_QUEUELENGTH
size_t The current number of jobs waiting to access the device.
Definition constants.h:459
@ QDMI_DEVICE_PROPERTY_MINATOMDISTANCE
uint64_t The raw, unscaled minimum required distance between qubits during quantum computation.
Definition constants.h:422
@ QDMI_DEVICE_PROPERTY_NAME
char* (string) The name of the device.
Definition constants.h:320
@ QDMI_DEVICE_PROPERTY_CHILDDEVICES
QDMI_Child_Device* (QDMI_Child_Device list) A list of device handles corresponding to the device's ch...
Definition constants.h:444
@ QDMI_DEVICE_PROPERTY_LENGTHSCALEFACTOR
double A scale factor for all length values.
Definition constants.h:384
@ QDMI_DEVICE_PROPERTY_CUSTOM3
Definition constants.h:504
@ QDMI_DEVICE_PROPERTY_CUSTOM2
Definition constants.h:502
@ QDMI_DEVICE_PROPERTY_LENGTHUNIT
char* (string) The length unit reported by the device.
Definition constants.h:374
@ QDMI_DEVICE_PROPERTY_STATUS
QDMI_Device_Status The status of the device.
Definition constants.h:324
@ QDMI_DEVICE_PROPERTY_VERSION
char* (string) The version of the device.
Definition constants.h:322
@ QDMI_DEVICE_PROPERTY_LIBRARYVERSION
char* (string) The implemented version of QDMI.
Definition constants.h:326
@ QDMI_DEVICE_PROPERTY_SUPPORTEDPROGRAMFORMATS
QDMI_Program_Format* (QDMI_Program_Format list) The program formats supported by the device.
Definition constants.h:430
@ QDMI_DEVICE_PROPERTY_QUBITSNUM
size_t The number of qubits in the device.
Definition constants.h:328
@ QDMI_DEVICE_PROPERTY_COUPLINGMAP
QDMI_Site* (QDMI_Site list) The coupling map of the device.
Definition constants.h:359
@ QDMI_DEVICE_PROPERTY_DURATIONSCALEFACTOR
double A scale factor for all duration values.
Definition constants.h:403
@ QDMI_DEVICE_PROPERTY_OPERATIONS
QDMI_Operation* (QDMI_Operation list) The operations supported by the device.
Definition constants.h:347
@ QDMI_DEVICE_PROPERTY_DURATIONUNIT
char* (string) The duration unit reported by the device.
Definition constants.h:393
@ QDMI_DEVICE_PROPERTY_CUSTOM1
This enum value is reserved for a custom property.
Definition constants.h:500
@ QDMI_DEVICE_PROPERTY_CUSTOM4
Definition constants.h:506
@ QDMI_DEVICE_PROPERTY_CUSTOM5
Definition constants.h:508
@ QDMI_DEVICE_PROPERTY_SITES
QDMI_Site* (QDMI_Site list) The sites of the device.
Definition constants.h:340
@ QDMI_DEVICE_PROPERTY_MAX
The maximum value of the enum.
Definition constants.h:493
enum QDMI_DEVICE_PROPERTY_T QDMI_Device_Property
Device property type.
Definition constants.h:512