5#include <unordered_map>
25 constexpr type None = 1;
26 constexpr type Thread = 2;
27 constexpr type Core = 3;
28 constexpr type Cache = 4;
29 constexpr type Subdivision = 5;
30 constexpr type Numa = 6;
31 constexpr type Chip = 7;
32 constexpr type Memory = 8;
33 constexpr type Storage = 9;
34 constexpr type Node = 10;
35 constexpr type QuantumBackend = 11;
36 constexpr type AtomSite = 12;
37 constexpr type Qubit = 13;
38 constexpr type Topology = 14;
41 static const std::unordered_map<type, const char*> names = {
42 {None,
"GenericComponent"},
43 {Thread,
"HW_Thread"},
46 {Subdivision,
"Subdivision"},
52 {QuantumBackend,
"QuantumBackend"},
53 {AtomSite,
"AtomSite"},
55 {Topology,
"Topology"}
66 inline const char* ToString(type rt) {
67 auto it = names.find(rt);
68 if (it != names.end())
return it->second;
80 constexpr type None = 1;
81 constexpr type GpuSM = 2;
91 constexpr type None = 1;
92 constexpr type Cpu = 2;
93 constexpr type CpuSocket = 3;
94 constexpr type Gpu = 4;
108 using type = int32_t;
110 constexpr type Any = -1;
111 constexpr type Relation = 0;
112 constexpr type DataPath = 1;
113 constexpr type QuantumGate = 2;
114 constexpr type CouplingMap = 3;
115 constexpr type _num_relation_types = 4;
117 constexpr type RelationTypeList [_num_relation_types] = {
125 static const std::unordered_map<type, const char*> names = {
127 {Relation,
"Relation"},
128 {DataPath,
"DataPath"},
129 {QuantumGate,
"QuantumGate"},
130 {CouplingMap,
"CouplingMap"}
140 inline const char* ToString(type rt) {
141 auto it = names.find(rt);
142 if (it != names.end())
return it->second;
154 using type = int32_t;
156 constexpr type Any = 1;
157 constexpr type None = 0;
158 constexpr type Logical = 1;
159 constexpr type Physical = 2;
160 constexpr type Datatransfer = 3;
161 constexpr type L3CAT = 4;
162 constexpr type MIG = 5;
163 constexpr type C2C = 6;
170 using type = int32_t;
172 constexpr type Any = 1;
173 constexpr type Outgoing = 2;
174 constexpr type Incoming = 3;
183 using type = int32_t;
185 constexpr type Oriented = 1;
186 constexpr type Bidirectional = 2;
193 using type = int32_t;
195 constexpr type Unknown = 0;
196 constexpr type Id = 1;
197 constexpr type X = 2;
198 constexpr type Rz = 3;
199 constexpr type Cnot = 4;
200 constexpr type Sx = 5;
201 constexpr type Toffoli = 6;
204 static const std::unordered_map<type, const char*> names = {
205 {Unknown,
"Unknown"},
220 inline const char* ToString(type rt) {
221 auto it = names.find(rt);
222 if (it != names.end())
return it->second;
Enumerates chip types (CPU, GPU, etc.).
Enumerates all supported component types in sys-sage.
Enumerates directionality for DataPaths.
Enumerates orientation (directed/bidirectional) for DataPaths.
Enumerates types of DataPaths (logical, physical, etc.).
Enumerates quantum gate types.
Enumerates all supported relation types in sys-sage.
Enumerates subdivision types for components (e.g., GPU SMs).