mqt-core 3.0.2__cp313-cp313t-win_amd64.whl → 3.2.0__cp313-cp313t-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mqt-core might be problematic. Click here for more details.

Files changed (111) hide show
  1. mqt/core/__init__.py +3 -3
  2. mqt/core/_version.py +2 -2
  3. mqt/core/bin/mqt-core-algorithms.dll +0 -0
  4. mqt/core/bin/mqt-core-circuit-optimizer.dll +0 -0
  5. mqt/core/bin/mqt-core-dd.dll +0 -0
  6. mqt/core/bin/mqt-core-ds.dll +0 -0
  7. mqt/core/bin/mqt-core-ir.dll +0 -0
  8. mqt/core/bin/mqt-core-na.dll +0 -0
  9. mqt/core/bin/mqt-core-qasm.dll +0 -0
  10. mqt/core/bin/mqt-core-zx.dll +0 -0
  11. mqt/core/dd.cp313t-win_amd64.pyd +0 -0
  12. mqt/core/dd.pyi +9 -22
  13. mqt/core/include/mqt-core/datastructures/DirectedAcyclicGraph.hpp +4 -4
  14. mqt/core/include/mqt-core/datastructures/DirectedGraph.hpp +7 -7
  15. mqt/core/include/mqt-core/datastructures/UndirectedGraph.hpp +8 -8
  16. mqt/core/include/mqt-core/dd/Approximation.hpp +45 -0
  17. mqt/core/include/mqt-core/dd/Complex.hpp +6 -0
  18. mqt/core/include/mqt-core/dd/ComplexNumbers.hpp +0 -18
  19. mqt/core/include/mqt-core/dd/ComputeTable.hpp +4 -1
  20. mqt/core/include/mqt-core/dd/DDDefinitions.hpp +0 -7
  21. mqt/core/include/mqt-core/dd/Edge.hpp +16 -0
  22. mqt/core/include/mqt-core/dd/Export.hpp +1 -2
  23. mqt/core/include/mqt-core/dd/Node.hpp +26 -49
  24. mqt/core/include/mqt-core/dd/Operations.hpp +27 -0
  25. mqt/core/include/mqt-core/dd/Package.hpp +141 -123
  26. mqt/core/include/mqt-core/dd/RealNumber.hpp +49 -66
  27. mqt/core/include/mqt-core/dd/RealNumberUniqueTable.hpp +14 -25
  28. mqt/core/include/mqt-core/dd/StateGeneration.hpp +143 -0
  29. mqt/core/include/mqt-core/dd/UnaryComputeTable.hpp +6 -4
  30. mqt/core/include/mqt-core/dd/UniqueTable.hpp +13 -39
  31. mqt/core/include/mqt-core/dd/statistics/PackageStatistics.hpp +8 -7
  32. mqt/core/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp +0 -10
  33. mqt/core/include/mqt-core/ir/QuantumComputation.hpp +3 -0
  34. mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +2 -0
  35. mqt/core/include/mqt-core/ir/operations/Expression.hpp +1 -1
  36. mqt/core/include/mqt-core/ir/operations/Operation.hpp +2 -2
  37. mqt/core/ir/operations.pyi +58 -86
  38. mqt/core/ir.cp313t-win_amd64.pyd +0 -0
  39. mqt/core/lib/mqt-core-algorithms.lib +0 -0
  40. mqt/core/lib/mqt-core-circuit-optimizer.lib +0 -0
  41. mqt/core/lib/mqt-core-dd.lib +0 -0
  42. mqt/core/lib/mqt-core-ds.lib +0 -0
  43. mqt/core/lib/mqt-core-ir.lib +0 -0
  44. mqt/core/lib/mqt-core-na.lib +0 -0
  45. mqt/core/lib/mqt-core-qasm.lib +0 -0
  46. mqt/core/lib/mqt-core-zx.lib +0 -0
  47. mqt/core/plugins/__init__.py +0 -8
  48. mqt/core/plugins/qiskit/qiskit_to_mqt.py +6 -0
  49. mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +52 -0
  50. mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +4 -4
  51. mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +3 -3
  52. mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +1 -0
  53. mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +2 -2
  54. mqt_core-3.2.0.dist-info/DELVEWHEEL +2 -0
  55. {mqt_core-3.0.2.dist-info → mqt_core-3.2.0.dist-info}/METADATA +49 -23
  56. {mqt_core-3.0.2.dist-info → mqt_core-3.2.0.dist-info}/RECORD +60 -107
  57. {mqt_core-3.0.2.dist-info → mqt_core-3.2.0.dist-info}/WHEEL +1 -1
  58. mqt_core.libs/msvcp140.dll +0 -0
  59. mqt/core/include/nlohmann/adl_serializer.hpp +0 -55
  60. mqt/core/include/nlohmann/byte_container_with_subtype.hpp +0 -103
  61. mqt/core/include/nlohmann/detail/abi_macros.hpp +0 -100
  62. mqt/core/include/nlohmann/detail/conversions/from_json.hpp +0 -497
  63. mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +0 -1118
  64. mqt/core/include/nlohmann/detail/conversions/to_json.hpp +0 -446
  65. mqt/core/include/nlohmann/detail/exceptions.hpp +0 -257
  66. mqt/core/include/nlohmann/detail/hash.hpp +0 -129
  67. mqt/core/include/nlohmann/detail/input/binary_reader.hpp +0 -3009
  68. mqt/core/include/nlohmann/detail/input/input_adapters.hpp +0 -492
  69. mqt/core/include/nlohmann/detail/input/json_sax.hpp +0 -727
  70. mqt/core/include/nlohmann/detail/input/lexer.hpp +0 -1633
  71. mqt/core/include/nlohmann/detail/input/parser.hpp +0 -519
  72. mqt/core/include/nlohmann/detail/input/position_t.hpp +0 -37
  73. mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +0 -35
  74. mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +0 -751
  75. mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +0 -242
  76. mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +0 -61
  77. mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +0 -130
  78. mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +0 -132
  79. mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +0 -39
  80. mqt/core/include/nlohmann/detail/json_pointer.hpp +0 -988
  81. mqt/core/include/nlohmann/detail/json_ref.hpp +0 -78
  82. mqt/core/include/nlohmann/detail/macro_scope.hpp +0 -482
  83. mqt/core/include/nlohmann/detail/macro_unscope.hpp +0 -45
  84. mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +0 -17
  85. mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +0 -17
  86. mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +0 -171
  87. mqt/core/include/nlohmann/detail/meta/detected.hpp +0 -70
  88. mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +0 -21
  89. mqt/core/include/nlohmann/detail/meta/is_sax.hpp +0 -159
  90. mqt/core/include/nlohmann/detail/meta/std_fs.hpp +0 -29
  91. mqt/core/include/nlohmann/detail/meta/type_traits.hpp +0 -795
  92. mqt/core/include/nlohmann/detail/meta/void_t.hpp +0 -24
  93. mqt/core/include/nlohmann/detail/output/binary_writer.hpp +0 -1838
  94. mqt/core/include/nlohmann/detail/output/output_adapters.hpp +0 -147
  95. mqt/core/include/nlohmann/detail/output/serializer.hpp +0 -988
  96. mqt/core/include/nlohmann/detail/string_concat.hpp +0 -146
  97. mqt/core/include/nlohmann/detail/string_escape.hpp +0 -72
  98. mqt/core/include/nlohmann/detail/value_t.hpp +0 -118
  99. mqt/core/include/nlohmann/json.hpp +0 -5258
  100. mqt/core/include/nlohmann/json_fwd.hpp +0 -75
  101. mqt/core/include/nlohmann/ordered_map.hpp +0 -359
  102. mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +0 -2045
  103. mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +0 -158
  104. mqt/core/nlohmann_json.natvis +0 -278
  105. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +0 -15
  106. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +0 -20
  107. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +0 -110
  108. mqt/core/share/pkgconfig/nlohmann_json.pc +0 -4
  109. mqt_core-3.0.2.dist-info/DELVEWHEEL +0 -2
  110. {mqt_core-3.0.2.dist-info → mqt_core-3.2.0.dist-info}/entry_points.txt +0 -0
  111. {mqt_core-3.0.2.dist-info → mqt_core-3.2.0.dist-info}/licenses/LICENSE.md +0 -0
@@ -8,7 +8,8 @@
8
8
 
9
9
  from abc import ABC, abstractmethod
10
10
  from collections.abc import Iterable, Mapping, MutableSequence, Sequence
11
- from typing import ClassVar, overload
11
+ from enum import Enum
12
+ from typing import overload
12
13
 
13
14
  from .registers import ClassicalRegister
14
15
  from .symbolic import Expression, Variable
@@ -33,34 +34,23 @@ class Control:
33
34
  type_: The type of the control (default is positive).
34
35
  """
35
36
 
36
- class Type:
37
- """The type of a control. It can be either positive or negative."""
37
+ class Type(Enum):
38
+ """Enumeration of control types.
38
39
 
39
- __members__: ClassVar[dict[Control.Type, str]]
40
- Neg: ClassVar[Control.Type]
40
+ It can be either positive or negative.
41
+ """
42
+
43
+ Neg = ...
41
44
  r"""A negative control.
42
45
 
43
46
  The operation that is controlled on this qubit is only executed if the qubit is in the :math:`|0\rangle` state.
44
47
  """
45
- Pos: ClassVar[Control.Type]
48
+ Pos = ...
46
49
  r"""A positive control.
47
50
 
48
51
  The operation that is controlled on this qubit is only executed if the qubit is in the :math:`|1\rangle` state.
49
52
  """
50
53
 
51
- def __eq__(self, other: object) -> bool: ...
52
- def __getstate__(self) -> int: ...
53
- def __hash__(self) -> int: ...
54
- def __index__(self) -> int: ...
55
- def __init__(self, value: int) -> None: ...
56
- def __int__(self) -> int: ...
57
- def __ne__(self, other: object) -> bool: ...
58
- def __setstate__(self, state: int) -> None: ...
59
- @property
60
- def name(self) -> str: ...
61
- @property
62
- def value(self) -> int: ...
63
-
64
54
  qubit: int
65
55
  type_: Type
66
56
 
@@ -81,18 +71,17 @@ class Control:
81
71
  def __hash__(self) -> int:
82
72
  """Get the hash of the control."""
83
73
 
84
- class OpType:
85
- """An Enum-like class that represents the type of an operation."""
74
+ class OpType(Enum):
75
+ """Enumeration of operation types."""
86
76
 
87
- __members__: ClassVar[dict[OpType, str]] # readonly
88
- barrier: ClassVar[OpType]
77
+ barrier = ...
89
78
  """
90
79
  A barrier operation. It is used to separate operations in the circuit.
91
80
 
92
81
  See Also:
93
82
  :meth:`mqt.core.ir.QuantumComputation.barrier`
94
83
  """
95
- classic_controlled: ClassVar[OpType]
84
+ classic_controlled = ...
96
85
  """
97
86
  A classic controlled operation.
98
87
 
@@ -101,256 +90,256 @@ class OpType:
101
90
  See Also:
102
91
  :meth:`mqt.core.ir.QuantumComputation.classic_controlled`
103
92
  """
104
- compound: ClassVar[OpType]
93
+ compound = ...
105
94
  """
106
95
  A compound operation. It is used to group multiple operations into a single operation.
107
96
 
108
97
  See Also:
109
98
  :class:`.CompoundOperation`
110
99
  """
111
- dcx: ClassVar[OpType]
100
+ dcx = ...
112
101
  """
113
102
  A DCX gate.
114
103
 
115
104
  See Also:
116
105
  :meth:`mqt.core.ir.QuantumComputation.dcx`
117
106
  """
118
- ecr: ClassVar[OpType]
107
+ ecr = ...
119
108
  """
120
109
  An ECR gate.
121
110
 
122
111
  See Also:
123
112
  :meth:`mqt.core.ir.QuantumComputation.ecr`
124
113
  """
125
- gphase: ClassVar[OpType]
114
+ gphase = ...
126
115
  """
127
116
  A global phase operation.
128
117
 
129
118
  See Also:
130
119
  :meth:`mqt.core.ir.QuantumComputation.gphase`
131
120
  """
132
- h: ClassVar[OpType]
121
+ h = ...
133
122
  """
134
123
  A Hadamard gate.
135
124
 
136
125
  See Also:
137
126
  :meth:`mqt.core.ir.QuantumComputation.h`
138
127
  """
139
- i: ClassVar[OpType]
128
+ i = ...
140
129
  """
141
130
  An identity operation.
142
131
 
143
132
  See Also:
144
133
  :meth:`mqt.core.ir.QuantumComputation.i`
145
134
  """
146
- iswap: ClassVar[OpType]
135
+ iswap = ...
147
136
  """
148
137
  An iSWAP gate.
149
138
 
150
139
  See Also:
151
140
  :meth:`mqt.core.ir.QuantumComputation.iswap`
152
141
  """
153
- iswapdg: ClassVar[OpType]
142
+ iswapdg = ...
154
143
  r"""
155
144
  An :math:`i\text{SWAP}^\dagger` gate.
156
145
 
157
146
  See Also:
158
147
  :meth:`mqt.core.ir.QuantumComputation.iswapdg`
159
148
  """
160
- measure: ClassVar[OpType]
149
+ measure = ...
161
150
  """
162
151
  A measurement operation.
163
152
 
164
153
  See Also:
165
154
  :meth:`mqt.core.ir.QuantumComputation.measure`
166
155
  """
167
- none: ClassVar[OpType]
156
+ none = ...
168
157
  """
169
158
  A placeholder operation. It is used to represent an operation that is not yet defined.
170
159
  """
171
- peres: ClassVar[OpType]
160
+ peres = ...
172
161
  """
173
162
  A Peres gate.
174
163
 
175
164
  See Also:
176
165
  :meth:`mqt.core.ir.QuantumComputation.peres`
177
166
  """
178
- peresdg: ClassVar[OpType]
167
+ peresdg = ...
179
168
  r"""
180
169
  A :math:`\text{Peres}^\dagger` gate.
181
170
 
182
171
  See Also:
183
172
  :meth:`mqt.core.ir.QuantumComputation.peresdg`
184
173
  """
185
- p: ClassVar[OpType]
174
+ p = ...
186
175
  """
187
176
  A phase gate.
188
177
 
189
178
  See Also:
190
179
  :meth:`mqt.core.ir.QuantumComputation.p`
191
180
  """
192
- reset: ClassVar[OpType]
181
+ reset = ...
193
182
  """
194
183
  A reset operation.
195
184
 
196
185
  See Also:
197
186
  :meth:`mqt.core.ir.QuantumComputation.reset`
198
187
  """
199
- rx: ClassVar[OpType]
188
+ rx = ...
200
189
  r"""
201
190
  An :math:`R_x` gate.
202
191
 
203
192
  See Also:
204
193
  :meth:`mqt.core.ir.QuantumComputation.rx`
205
194
  """
206
- rxx: ClassVar[OpType]
195
+ rxx = ...
207
196
  r"""
208
197
  An :math:`R_{xx}` gate.
209
198
 
210
199
  See Also:
211
200
  :meth:`mqt.core.ir.QuantumComputation.rxx`
212
201
  """
213
- ry: ClassVar[OpType]
202
+ ry = ...
214
203
  r"""
215
204
  An :math:`R_y` gate.
216
205
 
217
206
  See Also:
218
207
  :meth:`mqt.core.ir.QuantumComputation.ry`
219
208
  """
220
- ryy: ClassVar[OpType]
209
+ ryy = ...
221
210
  r"""
222
211
  An :math:`R_{yy}` gate.
223
212
 
224
213
  See Also:
225
214
  :meth:`mqt.core.ir.QuantumComputation.ryy`
226
215
  """
227
- rz: ClassVar[OpType]
216
+ rz = ...
228
217
  r"""
229
218
  An :math:`R_z` gate.
230
219
 
231
220
  See Also:
232
221
  :meth:`mqt.core.ir.QuantumComputation.rz`
233
222
  """
234
- rzx: ClassVar[OpType]
223
+ rzx = ...
235
224
  r"""
236
225
  An :math:`R_{zx}` gate.
237
226
 
238
227
  See Also:
239
228
  :meth:`mqt.core.ir.QuantumComputation.rzx`
240
229
  """
241
- rzz: ClassVar[OpType]
230
+ rzz = ...
242
231
  r"""
243
232
  An :math:`R_{zz}` gate.
244
233
 
245
234
  See Also:
246
235
  :meth:`mqt.core.ir.QuantumComputation.rzz`
247
236
  """
248
- s: ClassVar[OpType]
237
+ s = ...
249
238
  """
250
239
  An S gate.
251
240
 
252
241
  See Also:
253
242
  :meth:`mqt.core.ir.QuantumComputation.s`
254
243
  """
255
- sdg: ClassVar[OpType]
244
+ sdg = ...
256
245
  r"""
257
246
  An :math:`S^\dagger` gate.
258
247
 
259
248
  See Also:
260
249
  :meth:`mqt.core.ir.QuantumComputation.sdg`
261
250
  """
262
- swap: ClassVar[OpType]
251
+ swap = ...
263
252
  """
264
253
  A SWAP gate.
265
254
 
266
255
  See Also:
267
256
  :meth:`mqt.core.ir.QuantumComputation.swap`
268
257
  """
269
- sx: ClassVar[OpType]
258
+ sx = ...
270
259
  r"""
271
260
  A :math:`\sqrt{X}` gate.
272
261
 
273
262
  See Also:
274
263
  :meth:`mqt.core.ir.QuantumComputation.sx`
275
264
  """
276
- sxdg: ClassVar[OpType]
265
+ sxdg = ...
277
266
  r"""
278
267
  A :math:`\sqrt{X}^\dagger` gate.
279
268
 
280
269
  See Also:
281
270
  :meth:`mqt.core.ir.QuantumComputation.sxdg`
282
271
  """
283
- t: ClassVar[OpType]
272
+ t = ...
284
273
  """
285
274
  A T gate.
286
275
 
287
276
  See Also:
288
277
  :meth:`mqt.core.ir.QuantumComputation.t`
289
278
  """
290
- tdg: ClassVar[OpType]
279
+ tdg = ...
291
280
  r"""
292
281
  A :math:`T^\dagger` gate.
293
282
 
294
283
  See Also:
295
284
  :meth:`mqt.core.ir.QuantumComputation.tdg`
296
285
  """
297
- u2: ClassVar[OpType]
286
+ u2 = ...
298
287
  """
299
288
  A U2 gate.
300
289
 
301
290
  See Also:
302
291
  :meth:`mqt.core.ir.QuantumComputation.u2`
303
292
  """
304
- u: ClassVar[OpType]
293
+ u = ...
305
294
  """
306
295
  A U gate.
307
296
 
308
297
  See Also:
309
298
  :meth:`mqt.core.ir.QuantumComputation.u`
310
299
  """
311
- v: ClassVar[OpType]
300
+ v = ...
312
301
  """
313
302
  A V gate.
314
303
 
315
304
  See Also:
316
305
  :meth:`mqt.core.ir.QuantumComputation.v`
317
306
  """
318
- vdg: ClassVar[OpType]
307
+ vdg = ...
319
308
  r"""
320
309
  A :math:`V^\dagger` gate.
321
310
 
322
311
  See Also:
323
312
  :meth:`mqt.core.ir.QuantumComputation.vdg`
324
313
  """
325
- x: ClassVar[OpType]
314
+ x = ...
326
315
  """
327
316
  An X gate.
328
317
 
329
318
  See Also:
330
319
  :meth:`mqt.core.ir.QuantumComputation.x`
331
320
  """
332
- xx_minus_yy: ClassVar[OpType]
321
+ xx_minus_yy = ...
333
322
  r"""
334
323
  An :math:`R_{XX - YY}` gate.
335
324
 
336
325
  See Also:
337
326
  :meth:`mqt.core.ir.QuantumComputation.xx_minus_yy`
338
327
  """
339
- xx_plus_yy: ClassVar[OpType]
328
+ xx_plus_yy = ...
340
329
  r"""
341
330
  An :math:`R_{XX + YY}` gate.
342
331
 
343
332
  See Also:
344
333
  :meth:`mqt.core.ir.QuantumComputation.xx_plus_yy`
345
334
  """
346
- y: ClassVar[OpType]
335
+ y = ...
347
336
  """
348
337
  A Y gate.
349
338
 
350
339
  See Also:
351
340
  :meth:`mqt.core.ir.QuantumComputation.y`
352
341
  """
353
- z: ClassVar[OpType]
342
+ z = ...
354
343
  """
355
344
  A Z gate.
356
345
 
@@ -358,22 +347,6 @@ class OpType:
358
347
  :meth:`mqt.core.ir.QuantumComputation.z`
359
348
  """
360
349
 
361
- @property
362
- def name(self) -> str: ...
363
- @property
364
- def value(self) -> int: ...
365
- def __eq__(self, other: object) -> bool: ...
366
- def __getstate__(self) -> int: ...
367
- def __hash__(self) -> int: ...
368
- def __index__(self) -> int: ...
369
- @overload
370
- def __init__(self, value: int) -> None: ...
371
- @overload
372
- def __init__(self, arg0: str) -> None: ...
373
- def __int__(self) -> int: ...
374
- def __ne__(self, other: object) -> bool: ...
375
- def __setstate__(self, state: int) -> None: ...
376
-
377
350
  class Operation(ABC):
378
351
  """An abstract base class for operations that can be added to a :class:`~mqt.core.ir.QuantumComputation`."""
379
352
 
@@ -906,21 +879,20 @@ class SymbolicOperation(StandardOperation):
906
879
  assignment: The assignment of the symbolic parameters.
907
880
  """
908
881
 
909
- class ComparisonKind:
910
- """An Enum-like class that represents the kind of comparison for classic controlled operations."""
882
+ class ComparisonKind(Enum):
883
+ """Enumeration of comparison types for classic-controlled operations."""
911
884
 
912
- __members__: ClassVar[dict[ComparisonKind, str]] # readonly
913
- eq: ClassVar[ComparisonKind]
885
+ eq = ...
914
886
  """Equality comparison."""
915
- neq: ClassVar[ComparisonKind]
887
+ neq = ...
916
888
  """Inequality comparison."""
917
- lt: ClassVar[ComparisonKind]
889
+ lt = ...
918
890
  """Less than comparison."""
919
- leq: ClassVar[ComparisonKind]
891
+ leq = ...
920
892
  """Less than or equal comparison."""
921
- gt: ClassVar[ComparisonKind]
893
+ gt = ...
922
894
  """Greater than comparison."""
923
- geq: ClassVar[ComparisonKind]
895
+ geq = ...
924
896
  """Greater than or equal comparison."""
925
897
 
926
898
  class ClassicControlledOperation(Operation):
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -7,11 +7,3 @@
7
7
  # Licensed under the MIT License
8
8
 
9
9
  """Plugins for the core package."""
10
-
11
- from __future__ import annotations
12
-
13
- from . import qiskit
14
-
15
- __all__ = [
16
- "qiskit",
17
- ]
@@ -150,6 +150,7 @@ _NATIVELY_SUPPORTED_GATES = frozenset({
150
150
  "sxdg",
151
151
  "csx",
152
152
  "mcx",
153
+ # we keep the "mcx_*" variants here for compatibility with Qiskit 1.x
153
154
  "mcx_gray",
154
155
  "mcx_recursive",
155
156
  "mcx_vchain",
@@ -207,6 +208,8 @@ def _emplace_operation(
207
208
  if name in {"i", "id", "iden"}:
208
209
  return _add_operation(qc, OpType.i, qargs, params, qubit_map)
209
210
 
211
+ # we keep "mcx_gray" here for compatibility reasons with older Qiskit versions, e.g., 1.0.0 where "noancilla"
212
+ # is the default for the argument "mode" which leads to the gate name "gray_code"
210
213
  if name in {"x", "cx", "ccx", "mcx", "mcx_gray"}:
211
214
  return _add_operation(qc, OpType.x, qargs, params, qubit_map)
212
215
 
@@ -234,6 +237,9 @@ def _emplace_operation(
234
237
  if name in {"sx", "csx"}:
235
238
  return _add_operation(qc, OpType.sx, qargs, params, qubit_map)
236
239
 
240
+ if name == "sxdg":
241
+ return _add_operation(qc, OpType.sxdg, qargs, params, qubit_map)
242
+
237
243
  if name == "mcx_recursive":
238
244
  if len(qargs) <= 5:
239
245
  return _add_operation(qc, OpType.x, qargs, params, qubit_map)
@@ -0,0 +1,52 @@
1
+ # Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
2
+ # Copyright (c) 2025 Munich Quantum Software Company GmbH
3
+ # All rights reserved.
4
+ #
5
+ # SPDX-License-Identifier: MIT
6
+ #
7
+ # Licensed under the MIT License
8
+
9
+ function(add_mqt_python_binding package_name target_name)
10
+ # parse the arguments
11
+ cmake_parse_arguments(ARG "" "MODULE_NAME;INSTALL_DIR" "LINK_LIBS" ${ARGN})
12
+ set(SOURCES ${ARG_UNPARSED_ARGUMENTS})
13
+
14
+ # declare the Python module
15
+ pybind11_add_module(
16
+ # name of the extension
17
+ ${target_name}
18
+ # Pprefer thin LTO if available
19
+ THIN_LTO
20
+ # optimize the bindings for size
21
+ OPT_SIZE
22
+ # source code goes here
23
+ ${SOURCES})
24
+
25
+ # set default "." for INSTALL_DIR
26
+ if(NOT ARG_INSTALL_DIR)
27
+ set(ARG_INSTALL_DIR ".")
28
+ endif()
29
+
30
+ if(ARG_MODULE_NAME)
31
+ # the library name must be the same as the module name
32
+ set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${ARG_MODULE_NAME})
33
+ target_compile_definitions(${target_name}
34
+ PRIVATE MQT_${package_name}_MODULE_NAME=${ARG_MODULE_NAME})
35
+ else()
36
+ # use the target name as the module name
37
+ target_compile_definitions(${target_name}
38
+ PRIVATE MQT_${package_name}_MODULE_NAME=${target_name})
39
+ endif()
40
+
41
+ # add project libraries to the link libraries
42
+ list(APPEND ARG_LINK_LIBS MQT::ProjectOptions MQT::ProjectWarnings)
43
+
44
+ # link the required libraries
45
+ target_link_libraries(${target_name} PRIVATE ${ARG_LINK_LIBS})
46
+
47
+ # install directive for scikit-build-core
48
+ install(
49
+ TARGETS ${target_name}
50
+ DESTINATION ${ARG_INSTALL_DIR}
51
+ COMPONENT ${MQT_${package_name}_TARGET_NAME}_Python)
52
+ endfunction()
@@ -12,8 +12,8 @@ macro(PACKAGE_ADD_TEST testname linklibs)
12
12
  # create an executable in which the tests will be stored
13
13
  add_executable(${testname} ${ARGN})
14
14
  # link the Google test infrastructure and a default main function to the test executable.
15
- target_link_libraries(${testname} PRIVATE ${linklibs} gmock gtest_main MQT::ProjectOptions
16
- MQT::ProjectWarnings)
15
+ target_link_libraries(${testname} PRIVATE ${linklibs} GTest::gmock GTest::gtest_main
16
+ MQT::ProjectOptions MQT::ProjectWarnings)
17
17
  # discover tests
18
18
  gtest_discover_tests(
19
19
  ${testname}
@@ -28,8 +28,8 @@ macro(PACKAGE_ADD_TEST_WITH_WORKING_DIR testname linklibs test_working_directory
28
28
  # create an executable in which the tests will be stored
29
29
  add_executable(${testname} ${ARGN})
30
30
  # link the Google test infrastructure and a default main function to the test executable.
31
- target_link_libraries(${testname} PRIVATE ${linklibs} gmock gtest_main MQT::ProjectOptions
32
- MQT::ProjectWarnings)
31
+ target_link_libraries(${testname} PRIVATE ${linklibs} GTest::gmock GTest::gtest_main
32
+ MQT::ProjectOptions MQT::ProjectWarnings)
33
33
  # discover tests
34
34
  gtest_discover_tests(
35
35
  ${testname}
@@ -10,13 +10,13 @@
10
10
  # The variable CVF_VERSION must be set before calling configure_file().
11
11
 
12
12
 
13
- set(PACKAGE_VERSION "3.0.2")
13
+ set(PACKAGE_VERSION "3.2.0")
14
14
 
15
15
  if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
16
16
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
17
17
  else()
18
18
 
19
- if("3.0.2" MATCHES "^([0-9]+)\\.([0-9]+)")
19
+ if("3.2.0" MATCHES "^([0-9]+)\\.([0-9]+)")
20
20
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
21
21
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
22
22
 
@@ -27,7 +27,7 @@ else()
27
27
  string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
28
28
  endif()
29
29
  else()
30
- set(CVF_VERSION_MAJOR "3.0.2")
30
+ set(CVF_VERSION_MAJOR "3.2.0")
31
31
  set(CVF_VERSION_MINOR "")
32
32
  endif()
33
33
 
@@ -37,6 +37,7 @@ if(TARGET MQT::Core)
37
37
  return()
38
38
  endif()
39
39
 
40
+ include("${CMAKE_CURRENT_LIST_DIR}/AddMQTPythonBinding.cmake")
40
41
  include("${CMAKE_CURRENT_LIST_DIR}/Cache.cmake")
41
42
  include("${CMAKE_CURRENT_LIST_DIR}/PackageAddTest.cmake")
42
43
  include("${CMAKE_CURRENT_LIST_DIR}/PreventInSourceBuilds.cmake")
@@ -74,7 +74,7 @@ set_target_properties(MQT::ProjectOptions PROPERTIES
74
74
  add_library(MQT::CoreIR SHARED IMPORTED)
75
75
 
76
76
  set_target_properties(MQT::CoreIR PROPERTIES
77
- INTERFACE_COMPILE_FEATURES "cxx_std_17"
77
+ INTERFACE_COMPILE_FEATURES "cxx_std_20"
78
78
  )
79
79
 
80
80
  if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
@@ -193,7 +193,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
193
193
  FILE_SET "HEADERS"
194
194
  TYPE "HEADERS"
195
195
  BASE_DIRS "${_IMPORT_PREFIX}/include/mqt-core"
196
- FILES "${_IMPORT_PREFIX}/include/mqt-core/dd/CachedEdge.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Complex.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComplexNumbers.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComplexValue.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComputeTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DDDefinitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DDpackageConfig.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DensityNoiseTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Edge.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Export.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/FunctionalityConstruction.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/GateMatrixDefinitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/LinkedListBase.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/MemoryManager.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Node.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/NoiseFunctionality.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Operations.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Package.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Package_fwd.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/RealNumber.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/RealNumberUniqueTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Simulation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/StochasticNoiseOperationTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/UnaryComputeTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/UniqueTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/mqt_core_dd_export.h" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/MemoryManagerStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/PackageStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/Statistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/TableStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp"
196
+ FILES "${_IMPORT_PREFIX}/include/mqt-core/dd/Approximation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/CachedEdge.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Complex.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComplexNumbers.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComplexValue.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComputeTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DDDefinitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DDpackageConfig.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DensityNoiseTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Edge.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Export.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/FunctionalityConstruction.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/GateMatrixDefinitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/LinkedListBase.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/MemoryManager.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Node.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/NoiseFunctionality.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Operations.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Package.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Package_fwd.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/RealNumber.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/RealNumberUniqueTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Simulation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/StateGeneration.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/StochasticNoiseOperationTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/UnaryComputeTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/UniqueTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/mqt_core_dd_export.h" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/MemoryManagerStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/PackageStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/Statistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/TableStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp"
197
197
  )
198
198
  else()
199
199
  set_property(TARGET MQT::CoreDD
@@ -0,0 +1,2 @@
1
+ Version: 1.11.0
2
+ Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-9nqpxncg\\cp313t-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-9nqpxncg\\cp313t-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-9nqpxncg\\cp313t-win_amd64\\built_wheel\\mqt_core-3.2.0-cp313-cp313t-win_amd64.whl', '--namespace-pkg', 'mqt', '--ignore-existing']