|
QDMI v1.3.4-dev
Quantum Device Management Interface
|
Exact program format accepted by a device. More...
#include <constants.h>
Data Fields | |
| uint32_t | version |
| Exact version packed with QDMI_MAKE_VERSION. | |
| uint32_t | encoding |
| One QDMI_Program_Encoding value. | |
| char | id [QDMI_PROGRAM_ID_SIZE] |
| NUL-terminated format ID. | |
| char | profile [QDMI_PROGRAM_ID_SIZE] |
| NUL-terminated profile ID. | |
Exact program format accepted by a device.
All fields take part in identity. version is the nonzero, exact packed major, minor, and patch release of the payload specification. Devices list every accepted descriptor separately. Clients must not infer compatibility between versions, profiles, or encodings.
The id and profile arrays must be NUL-terminated, and every byte after the first NUL must be zero. Every API compares descriptor values, not their addresses. A caller may reconstruct a canonical value from its fields; use QDMI_program_format_equal to compare two values. IDs are case-sensitive. QDMI reserves unqualified IDs for standard formats. The standard IDs are openqasm and qir. Vendor formats use <vendor>.<custom-format-identifier> IDs, such as iqm.circuit. The vendor component is an identifier, not a reverse domain name. QDMI does not define vendor-format versions, profiles, wire formats, or result semantics. Providers must document each vendor descriptor and its payload and result contract. An empty profile identifies a format without a named profile. QIR uses base and adaptive; OpenQASM uses an empty profile.
In the following mappings, the regular-site list is the subsequence of QDMI_DEVICE_PROPERTY_SITES for which QDMI_SITE_PROPERTY_ISZONE is false, in provider order. Zone sites are not program-addressable qubits. Standard descriptors require the regular-site list size to equal QDMI_DEVICE_PROPERTY_QUBITSNUM. Standard mappings cover local operations only; a vendor extension must define how a payload selects a zoned operation.
Standard descriptors have the following portable mappings:
The QIR Adaptive baseline includes mid-circuit measurement, measured-qubit reuse, measurement-result use, Boolean computation, and forward branching. Devices report optional QIR module flags as program features. Other standard descriptors have an empty program-feature baseline.