mqt-core 3.2.0__cp313-cp313-win_amd64.whl → 3.3.0__cp313-cp313-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.
- mqt/core/__init__.py +3 -3
- mqt/core/_commands.py +2 -2
- mqt/core/_version.py +16 -3
- mqt/core/bin/mqt-core-algorithms.dll +0 -0
- mqt/core/bin/mqt-core-circuit-optimizer.dll +0 -0
- mqt/core/bin/mqt-core-dd.dll +0 -0
- mqt/core/bin/mqt-core-ds.dll +0 -0
- mqt/core/bin/mqt-core-fomac.dll +0 -0
- mqt/core/bin/mqt-core-ir.dll +0 -0
- mqt/core/bin/mqt-core-na-fomac.dll +0 -0
- mqt/core/bin/mqt-core-na.dll +0 -0
- mqt/core/bin/mqt-core-qasm.dll +0 -0
- mqt/core/bin/mqt-core-qdmi-driver.dll +0 -0
- mqt/core/bin/mqt-core-qdmi-na-device.dll +0 -0
- mqt/core/bin/mqt-core-zx.dll +0 -0
- mqt/core/dd.cp313-win_amd64.pyd +0 -0
- mqt/core/dd.pyi +5 -7
- mqt/core/fomac.cp313-win_amd64.pyd +0 -0
- mqt/core/fomac.pyi +125 -0
- mqt/core/include/mqt-core/circuit_optimizer/CircuitOptimizer.hpp +13 -0
- mqt/core/include/mqt-core/datastructures/DirectedGraph.hpp +1 -1
- mqt/core/include/mqt-core/datastructures/UndirectedGraph.hpp +1 -1
- mqt/core/include/mqt-core/dd/CachedEdge.hpp +7 -0
- mqt/core/include/mqt-core/dd/Operations.hpp +12 -14
- mqt/core/include/mqt-core/dd/Package.hpp +1 -1
- mqt/core/include/mqt-core/fomac/FoMaC.hpp +568 -0
- mqt/core/include/mqt-core/ir/QuantumComputation.hpp +29 -28
- mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +2 -0
- mqt/core/include/mqt-core/ir/operations/IfElseOperation.hpp +169 -0
- mqt/core/include/mqt-core/ir/operations/OpType.hpp +3 -0
- mqt/core/include/mqt-core/ir/operations/OpType.inc +2 -2
- mqt/core/include/mqt-core/ir/operations/Operation.hpp +3 -1
- mqt/core/include/mqt-core/ir/operations/StandardOperation.hpp +2 -0
- mqt/core/include/mqt-core/mqt_na_qdmi/device.h +602 -0
- mqt/core/include/mqt-core/mqt_na_qdmi/types.h +78 -0
- mqt/core/include/mqt-core/na/device/Device.hpp +410 -0
- mqt/core/include/mqt-core/na/device/DeviceMemberInitializers.hpp +724 -0
- mqt/core/include/mqt-core/na/device/Generator.hpp +447 -0
- mqt/core/include/mqt-core/na/fomac/Device.hpp +169 -0
- mqt/core/include/mqt-core/qdmi/Driver.hpp +431 -0
- mqt/core/include/nlohmann/adl_serializer.hpp +55 -0
- mqt/core/include/nlohmann/byte_container_with_subtype.hpp +103 -0
- mqt/core/include/nlohmann/detail/abi_macros.hpp +111 -0
- mqt/core/include/nlohmann/detail/conversions/from_json.hpp +577 -0
- mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +1118 -0
- mqt/core/include/nlohmann/detail/conversions/to_json.hpp +479 -0
- mqt/core/include/nlohmann/detail/exceptions.hpp +291 -0
- mqt/core/include/nlohmann/detail/hash.hpp +129 -0
- mqt/core/include/nlohmann/detail/input/binary_reader.hpp +3068 -0
- mqt/core/include/nlohmann/detail/input/input_adapters.hpp +549 -0
- mqt/core/include/nlohmann/detail/input/json_sax.hpp +986 -0
- mqt/core/include/nlohmann/detail/input/lexer.hpp +1643 -0
- mqt/core/include/nlohmann/detail/input/parser.hpp +519 -0
- mqt/core/include/nlohmann/detail/input/position_t.hpp +37 -0
- mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +35 -0
- mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +760 -0
- mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +235 -0
- mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +61 -0
- mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +130 -0
- mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +132 -0
- mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +39 -0
- mqt/core/include/nlohmann/detail/json_pointer.hpp +988 -0
- mqt/core/include/nlohmann/detail/json_ref.hpp +78 -0
- mqt/core/include/nlohmann/detail/macro_scope.hpp +595 -0
- mqt/core/include/nlohmann/detail/macro_unscope.hpp +46 -0
- mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +17 -0
- mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +17 -0
- mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +171 -0
- mqt/core/include/nlohmann/detail/meta/detected.hpp +70 -0
- mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +21 -0
- mqt/core/include/nlohmann/detail/meta/is_sax.hpp +159 -0
- mqt/core/include/nlohmann/detail/meta/std_fs.hpp +29 -0
- mqt/core/include/nlohmann/detail/meta/type_traits.hpp +795 -0
- mqt/core/include/nlohmann/detail/meta/void_t.hpp +24 -0
- mqt/core/include/nlohmann/detail/output/binary_writer.hpp +1850 -0
- mqt/core/include/nlohmann/detail/output/output_adapters.hpp +147 -0
- mqt/core/include/nlohmann/detail/output/serializer.hpp +988 -0
- mqt/core/include/nlohmann/detail/string_concat.hpp +146 -0
- mqt/core/include/nlohmann/detail/string_escape.hpp +72 -0
- mqt/core/include/nlohmann/detail/string_utils.hpp +37 -0
- mqt/core/include/nlohmann/detail/value_t.hpp +118 -0
- mqt/core/include/nlohmann/json.hpp +5306 -0
- mqt/core/include/nlohmann/json_fwd.hpp +75 -0
- mqt/core/include/nlohmann/ordered_map.hpp +359 -0
- mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +2045 -0
- mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +158 -0
- mqt/core/include/qdmi/qdmi/client.h +990 -0
- mqt/core/include/qdmi/qdmi/constants.h +1139 -0
- mqt/core/include/qdmi/qdmi/device.h +602 -0
- mqt/core/include/qdmi/qdmi/types.h +78 -0
- mqt/core/include/spdlog/async.h +99 -0
- mqt/core/include/spdlog/async_logger-inl.h +84 -0
- mqt/core/include/spdlog/async_logger.h +74 -0
- mqt/core/include/spdlog/cfg/argv.h +40 -0
- mqt/core/include/spdlog/cfg/env.h +36 -0
- mqt/core/include/spdlog/cfg/helpers-inl.h +107 -0
- mqt/core/include/spdlog/cfg/helpers.h +29 -0
- mqt/core/include/spdlog/common-inl.h +68 -0
- mqt/core/include/spdlog/common.h +406 -0
- mqt/core/include/spdlog/details/backtracer-inl.h +63 -0
- mqt/core/include/spdlog/details/backtracer.h +45 -0
- mqt/core/include/spdlog/details/circular_q.h +115 -0
- mqt/core/include/spdlog/details/console_globals.h +28 -0
- mqt/core/include/spdlog/details/file_helper-inl.h +153 -0
- mqt/core/include/spdlog/details/file_helper.h +61 -0
- mqt/core/include/spdlog/details/fmt_helper.h +141 -0
- mqt/core/include/spdlog/details/log_msg-inl.h +44 -0
- mqt/core/include/spdlog/details/log_msg.h +40 -0
- mqt/core/include/spdlog/details/log_msg_buffer-inl.h +54 -0
- mqt/core/include/spdlog/details/log_msg_buffer.h +32 -0
- mqt/core/include/spdlog/details/mpmc_blocking_q.h +177 -0
- mqt/core/include/spdlog/details/null_mutex.h +35 -0
- mqt/core/include/spdlog/details/os-inl.h +606 -0
- mqt/core/include/spdlog/details/os.h +127 -0
- mqt/core/include/spdlog/details/periodic_worker-inl.h +26 -0
- mqt/core/include/spdlog/details/periodic_worker.h +58 -0
- mqt/core/include/spdlog/details/registry-inl.h +270 -0
- mqt/core/include/spdlog/details/registry.h +131 -0
- mqt/core/include/spdlog/details/synchronous_factory.h +22 -0
- mqt/core/include/spdlog/details/tcp_client-windows.h +135 -0
- mqt/core/include/spdlog/details/tcp_client.h +127 -0
- mqt/core/include/spdlog/details/thread_pool-inl.h +126 -0
- mqt/core/include/spdlog/details/thread_pool.h +117 -0
- mqt/core/include/spdlog/details/udp_client-windows.h +98 -0
- mqt/core/include/spdlog/details/udp_client.h +81 -0
- mqt/core/include/spdlog/details/windows_include.h +11 -0
- mqt/core/include/spdlog/fmt/bin_to_hex.h +224 -0
- mqt/core/include/spdlog/fmt/bundled/args.h +220 -0
- mqt/core/include/spdlog/fmt/bundled/base.h +2989 -0
- mqt/core/include/spdlog/fmt/bundled/chrono.h +2330 -0
- mqt/core/include/spdlog/fmt/bundled/color.h +637 -0
- mqt/core/include/spdlog/fmt/bundled/compile.h +539 -0
- mqt/core/include/spdlog/fmt/bundled/core.h +5 -0
- mqt/core/include/spdlog/fmt/bundled/fmt.license.rst +27 -0
- mqt/core/include/spdlog/fmt/bundled/format-inl.h +1948 -0
- mqt/core/include/spdlog/fmt/bundled/format.h +4244 -0
- mqt/core/include/spdlog/fmt/bundled/os.h +427 -0
- mqt/core/include/spdlog/fmt/bundled/ostream.h +167 -0
- mqt/core/include/spdlog/fmt/bundled/printf.h +633 -0
- mqt/core/include/spdlog/fmt/bundled/ranges.h +850 -0
- mqt/core/include/spdlog/fmt/bundled/std.h +728 -0
- mqt/core/include/spdlog/fmt/bundled/xchar.h +369 -0
- mqt/core/include/spdlog/fmt/chrono.h +23 -0
- mqt/core/include/spdlog/fmt/compile.h +23 -0
- mqt/core/include/spdlog/fmt/fmt.h +30 -0
- mqt/core/include/spdlog/fmt/ostr.h +23 -0
- mqt/core/include/spdlog/fmt/ranges.h +23 -0
- mqt/core/include/spdlog/fmt/std.h +24 -0
- mqt/core/include/spdlog/fmt/xchar.h +23 -0
- mqt/core/include/spdlog/formatter.h +17 -0
- mqt/core/include/spdlog/fwd.h +18 -0
- mqt/core/include/spdlog/logger-inl.h +198 -0
- mqt/core/include/spdlog/logger.h +379 -0
- mqt/core/include/spdlog/mdc.h +52 -0
- mqt/core/include/spdlog/pattern_formatter-inl.h +1340 -0
- mqt/core/include/spdlog/pattern_formatter.h +118 -0
- mqt/core/include/spdlog/sinks/android_sink.h +137 -0
- mqt/core/include/spdlog/sinks/ansicolor_sink-inl.h +142 -0
- mqt/core/include/spdlog/sinks/ansicolor_sink.h +116 -0
- mqt/core/include/spdlog/sinks/base_sink-inl.h +59 -0
- mqt/core/include/spdlog/sinks/base_sink.h +51 -0
- mqt/core/include/spdlog/sinks/basic_file_sink-inl.h +48 -0
- mqt/core/include/spdlog/sinks/basic_file_sink.h +66 -0
- mqt/core/include/spdlog/sinks/callback_sink.h +56 -0
- mqt/core/include/spdlog/sinks/daily_file_sink.h +254 -0
- mqt/core/include/spdlog/sinks/dist_sink.h +81 -0
- mqt/core/include/spdlog/sinks/dup_filter_sink.h +91 -0
- mqt/core/include/spdlog/sinks/hourly_file_sink.h +193 -0
- mqt/core/include/spdlog/sinks/kafka_sink.h +119 -0
- mqt/core/include/spdlog/sinks/mongo_sink.h +108 -0
- mqt/core/include/spdlog/sinks/msvc_sink.h +68 -0
- mqt/core/include/spdlog/sinks/null_sink.h +41 -0
- mqt/core/include/spdlog/sinks/ostream_sink.h +43 -0
- mqt/core/include/spdlog/sinks/qt_sinks.h +304 -0
- mqt/core/include/spdlog/sinks/ringbuffer_sink.h +67 -0
- mqt/core/include/spdlog/sinks/rotating_file_sink-inl.h +179 -0
- mqt/core/include/spdlog/sinks/rotating_file_sink.h +93 -0
- mqt/core/include/spdlog/sinks/sink-inl.h +22 -0
- mqt/core/include/spdlog/sinks/sink.h +34 -0
- mqt/core/include/spdlog/sinks/stdout_color_sinks-inl.h +38 -0
- mqt/core/include/spdlog/sinks/stdout_color_sinks.h +49 -0
- mqt/core/include/spdlog/sinks/stdout_sinks-inl.h +127 -0
- mqt/core/include/spdlog/sinks/stdout_sinks.h +84 -0
- mqt/core/include/spdlog/sinks/syslog_sink.h +104 -0
- mqt/core/include/spdlog/sinks/systemd_sink.h +121 -0
- mqt/core/include/spdlog/sinks/tcp_sink.h +75 -0
- mqt/core/include/spdlog/sinks/udp_sink.h +69 -0
- mqt/core/include/spdlog/sinks/win_eventlog_sink.h +260 -0
- mqt/core/include/spdlog/sinks/wincolor_sink-inl.h +172 -0
- mqt/core/include/spdlog/sinks/wincolor_sink.h +82 -0
- mqt/core/include/spdlog/spdlog-inl.h +96 -0
- mqt/core/include/spdlog/spdlog.h +357 -0
- mqt/core/include/spdlog/stopwatch.h +66 -0
- mqt/core/include/spdlog/tweakme.h +148 -0
- mqt/core/include/spdlog/version.h +11 -0
- mqt/core/ir/__init__.pyi +83 -45
- mqt/core/ir/operations.pyi +40 -27
- mqt/core/ir.cp313-win_amd64.pyd +0 -0
- mqt/core/lib/cmake/spdlog/spdlogConfig.cmake +44 -0
- mqt/core/lib/cmake/spdlog/spdlogConfigTargets-release.cmake +19 -0
- mqt/core/lib/cmake/spdlog/spdlogConfigTargets.cmake +119 -0
- mqt/core/lib/cmake/spdlog/spdlogConfigVersion.cmake +65 -0
- mqt/core/lib/mqt-core-algorithms.lib +0 -0
- mqt/core/lib/mqt-core-circuit-optimizer.lib +0 -0
- mqt/core/lib/mqt-core-dd.lib +0 -0
- mqt/core/lib/mqt-core-ds.lib +0 -0
- mqt/core/lib/mqt-core-fomac.lib +0 -0
- mqt/core/lib/mqt-core-ir.lib +0 -0
- mqt/core/lib/mqt-core-na-fomac.lib +0 -0
- mqt/core/lib/mqt-core-na.lib +0 -0
- mqt/core/lib/mqt-core-qasm.lib +0 -0
- mqt/core/lib/mqt-core-qdmi-driver.lib +0 -0
- mqt/core/lib/mqt-core-qdmi-na-device-gen.lib +0 -0
- mqt/core/lib/mqt-core-qdmi-na-device.lib +0 -0
- mqt/core/lib/mqt-core-zx.lib +0 -0
- mqt/core/lib/pkgconfig/spdlog.pc +13 -0
- mqt/core/lib/spdlog.lib +0 -0
- mqt/core/na/__init__.py +12 -0
- mqt/core/na/fomac.cp313-win_amd64.pyd +0 -0
- mqt/core/na/fomac.pyi +117 -0
- mqt/core/nlohmann_json.natvis +278 -0
- mqt/core/plugins/qiskit/mqt_to_qiskit.py +75 -11
- mqt/core/plugins/qiskit/qiskit_to_mqt.py +108 -5
- mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +3 -0
- mqt/core/share/cmake/mqt-core/Cache.cmake +17 -16
- mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +6 -0
- mqt/core/share/cmake/mqt-core/StandardProjectSettings.cmake +1 -1
- mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +3 -3
- mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +3 -0
- mqt/core/share/cmake/mqt-core/mqt-core-targets-release.cmake +51 -0
- mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +124 -3
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +15 -0
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +20 -0
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +110 -0
- mqt/core/share/cmake/qdmi/Cache.cmake +44 -0
- mqt/core/share/cmake/qdmi/PrefixHandling.cmake +78 -0
- mqt/core/share/cmake/qdmi/prefix_defs.txt +26 -0
- mqt/core/share/cmake/qdmi/qdmi-config-version.cmake +85 -0
- mqt/core/share/cmake/qdmi/qdmi-config.cmake +42 -0
- mqt/core/share/cmake/qdmi/qdmi-targets.cmake +129 -0
- mqt/core/share/pkgconfig/nlohmann_json.pc +7 -0
- mqt_core-3.3.0.dist-info/DELVEWHEEL +2 -0
- {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/METADATA +74 -33
- {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/RECORD +247 -53
- {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/WHEEL +1 -1
- mqt/core/include/mqt-core/ir/operations/ClassicControlledOperation.hpp +0 -156
- mqt_core-3.2.0.dist-info/DELVEWHEEL +0 -2
- {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/entry_points.txt +0 -0
- {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -14,12 +14,16 @@ import re
|
|
|
14
14
|
import warnings
|
|
15
15
|
from typing import TYPE_CHECKING, cast
|
|
16
16
|
|
|
17
|
-
from qiskit.circuit import AncillaRegister, Clbit
|
|
17
|
+
from qiskit.circuit import AncillaRegister, Clbit
|
|
18
|
+
from qiskit.circuit import ClassicalRegister as QiskitClassicalRegister
|
|
19
|
+
from qiskit.circuit.classical import expr
|
|
18
20
|
|
|
19
21
|
from ...ir import QuantumComputation
|
|
20
22
|
from ...ir.operations import (
|
|
23
|
+
ComparisonKind,
|
|
21
24
|
CompoundOperation,
|
|
22
25
|
Control,
|
|
26
|
+
IfElseOperation,
|
|
23
27
|
NonUnitaryOperation,
|
|
24
28
|
OpType,
|
|
25
29
|
StandardOperation,
|
|
@@ -30,7 +34,10 @@ from ...ir.symbolic import Expression, Term, Variable
|
|
|
30
34
|
if TYPE_CHECKING:
|
|
31
35
|
from collections.abc import Mapping, Sequence
|
|
32
36
|
|
|
33
|
-
from qiskit.circuit import Instruction, ParameterExpression, QuantumCircuit
|
|
37
|
+
from qiskit.circuit import IfElseOp, Instruction, ParameterExpression, QuantumCircuit, Qubit
|
|
38
|
+
|
|
39
|
+
from ...ir.operations import Operation
|
|
40
|
+
from ...ir.registers import ClassicalRegister
|
|
34
41
|
|
|
35
42
|
|
|
36
43
|
__all__ = ["qiskit_to_mqt"]
|
|
@@ -98,6 +105,7 @@ def qiskit_to_mqt(circ: QuantumCircuit) -> QuantumComputation:
|
|
|
98
105
|
instruction.operation.params,
|
|
99
106
|
qubit_map,
|
|
100
107
|
clbit_map,
|
|
108
|
+
qc.cregs,
|
|
101
109
|
)
|
|
102
110
|
for symb_param in symb_params:
|
|
103
111
|
qc.add_variable(symb_param)
|
|
@@ -166,6 +174,7 @@ _NATIVELY_SUPPORTED_GATES = frozenset({
|
|
|
166
174
|
"rzz",
|
|
167
175
|
"xx_minus_yy",
|
|
168
176
|
"xx_plus_yy",
|
|
177
|
+
"if_else",
|
|
169
178
|
"reset",
|
|
170
179
|
"barrier",
|
|
171
180
|
"measure",
|
|
@@ -180,12 +189,13 @@ def _emplace_operation(
|
|
|
180
189
|
params: Sequence[float | ParameterExpression],
|
|
181
190
|
qubit_map: Mapping[Qubit, int],
|
|
182
191
|
clbit_map: Mapping[Clbit, int],
|
|
192
|
+
cregs: Mapping[str, ClassicalRegister],
|
|
183
193
|
) -> list[float | ParameterExpression]:
|
|
184
194
|
name = instr.name
|
|
185
195
|
|
|
186
196
|
if name not in _NATIVELY_SUPPORTED_GATES:
|
|
187
197
|
try:
|
|
188
|
-
return _import_definition(qc, instr.definition, qargs, cargs, qubit_map, clbit_map)
|
|
198
|
+
return _import_definition(qc, instr.definition, qargs, cargs, qubit_map, clbit_map, cregs)
|
|
189
199
|
except Exception as ex: # PRAGMA: NO COVER
|
|
190
200
|
msg = f"Unsupported gate {name} with definition {instr.definition}"
|
|
191
201
|
raise NotImplementedError(msg) from ex
|
|
@@ -303,6 +313,9 @@ def _emplace_operation(
|
|
|
303
313
|
if name == "xx_plus_yy":
|
|
304
314
|
return _add_two_target_operation(qc, OpType.xx_plus_yy, qargs, params, qubit_map)
|
|
305
315
|
|
|
316
|
+
if name == "if_else":
|
|
317
|
+
return _add_if_else_operation(qc, instr, qargs, cargs, qubit_map, clbit_map, cregs)
|
|
318
|
+
|
|
306
319
|
msg = f"Unsupported gate {name}" # pragma: no cover
|
|
307
320
|
raise NotImplementedError(msg)
|
|
308
321
|
|
|
@@ -393,6 +406,94 @@ def _add_two_target_operation(
|
|
|
393
406
|
return parameters
|
|
394
407
|
|
|
395
408
|
|
|
409
|
+
def _add_if_else_operation(
|
|
410
|
+
qc: QuantumComputation | CompoundOperation,
|
|
411
|
+
if_else_op: IfElseOp,
|
|
412
|
+
qargs: Sequence[Qubit],
|
|
413
|
+
cargs: Sequence[Clbit],
|
|
414
|
+
qubit_map: Mapping[Qubit, int],
|
|
415
|
+
clbit_map: Mapping[Clbit, int],
|
|
416
|
+
cregs: Mapping[str, ClassicalRegister],
|
|
417
|
+
) -> list[float | ParameterExpression]:
|
|
418
|
+
then_operation_compound = CompoundOperation()
|
|
419
|
+
then_params = _import_definition(
|
|
420
|
+
then_operation_compound,
|
|
421
|
+
if_else_op.params[0],
|
|
422
|
+
qargs,
|
|
423
|
+
cargs,
|
|
424
|
+
qubit_map,
|
|
425
|
+
clbit_map,
|
|
426
|
+
cregs,
|
|
427
|
+
)
|
|
428
|
+
then_operation: Operation = then_operation_compound[0]
|
|
429
|
+
if isinstance(then_operation, CompoundOperation) and len(then_operation) == 1:
|
|
430
|
+
then_operation = then_operation[0]
|
|
431
|
+
|
|
432
|
+
else_operation: Operation | None = None
|
|
433
|
+
else_params: list[float | ParameterExpression] = []
|
|
434
|
+
if if_else_op.params[1] is not None:
|
|
435
|
+
else_operation_compound = CompoundOperation()
|
|
436
|
+
else_params = _import_definition(
|
|
437
|
+
else_operation_compound,
|
|
438
|
+
if_else_op.params[1],
|
|
439
|
+
qargs,
|
|
440
|
+
cargs,
|
|
441
|
+
qubit_map,
|
|
442
|
+
clbit_map,
|
|
443
|
+
cregs,
|
|
444
|
+
)
|
|
445
|
+
else_operation = else_operation_compound[0]
|
|
446
|
+
if isinstance(else_operation, CompoundOperation) and len(else_operation) == 1:
|
|
447
|
+
else_operation = else_operation[0]
|
|
448
|
+
|
|
449
|
+
condition = if_else_op.condition
|
|
450
|
+
if isinstance(condition, tuple):
|
|
451
|
+
assert len(condition) == 2
|
|
452
|
+
classical_control = condition[0]
|
|
453
|
+
expected_value = condition[1]
|
|
454
|
+
comparison_kind = ComparisonKind.eq
|
|
455
|
+
else:
|
|
456
|
+
assert isinstance(condition, expr.Binary)
|
|
457
|
+
classical_control = condition.left.var
|
|
458
|
+
expected_value = condition.right.value
|
|
459
|
+
if condition.op == expr.Binary.Op.EQUAL:
|
|
460
|
+
comparison_kind = ComparisonKind.eq
|
|
461
|
+
elif condition.op == expr.Binary.Op.NOT_EQUAL:
|
|
462
|
+
comparison_kind = ComparisonKind.neq
|
|
463
|
+
elif condition.op == expr.Binary.Op.LESS:
|
|
464
|
+
comparison_kind = ComparisonKind.lt
|
|
465
|
+
elif condition.op == expr.Binary.Op.LESS_EQUAL:
|
|
466
|
+
comparison_kind = ComparisonKind.leq
|
|
467
|
+
elif condition.op == expr.Binary.Op.GREATER:
|
|
468
|
+
comparison_kind = ComparisonKind.gt
|
|
469
|
+
elif condition.op == expr.Binary.Op.GREATER_EQUAL:
|
|
470
|
+
comparison_kind = ComparisonKind.geq
|
|
471
|
+
else:
|
|
472
|
+
msg = f"Unsupported binary operation {condition.op}"
|
|
473
|
+
raise TypeError(msg)
|
|
474
|
+
|
|
475
|
+
if isinstance(classical_control, Clbit):
|
|
476
|
+
if_else_operation = IfElseOperation(
|
|
477
|
+
then_operation,
|
|
478
|
+
else_operation,
|
|
479
|
+
clbit_map[classical_control],
|
|
480
|
+
bool(expected_value),
|
|
481
|
+
comparison_kind,
|
|
482
|
+
)
|
|
483
|
+
else:
|
|
484
|
+
assert isinstance(classical_control, QiskitClassicalRegister)
|
|
485
|
+
if_else_operation = IfElseOperation(
|
|
486
|
+
then_operation,
|
|
487
|
+
else_operation,
|
|
488
|
+
cregs[classical_control.name],
|
|
489
|
+
int(expected_value),
|
|
490
|
+
comparison_kind,
|
|
491
|
+
)
|
|
492
|
+
qc.append(if_else_operation)
|
|
493
|
+
|
|
494
|
+
return then_params + else_params
|
|
495
|
+
|
|
496
|
+
|
|
396
497
|
def _import_layouts(qc: QuantumComputation, circ: QuantumCircuit) -> None:
|
|
397
498
|
qc.initial_layout.clear()
|
|
398
499
|
initial_index_layout = circ.layout.initial_index_layout()
|
|
@@ -430,9 +531,10 @@ def _import_definition(
|
|
|
430
531
|
cargs: Sequence[Clbit],
|
|
431
532
|
qubit_map: Mapping[Qubit, int],
|
|
432
533
|
clbit_map: Mapping[Clbit, int],
|
|
534
|
+
cregs: Mapping[str, ClassicalRegister],
|
|
433
535
|
) -> list[float | ParameterExpression]:
|
|
434
|
-
qarg_map = dict(zip(circ.qubits, qargs))
|
|
435
|
-
carg_map = dict(zip(circ.clbits, cargs))
|
|
536
|
+
qarg_map = dict(zip(circ.qubits, qargs, strict=False))
|
|
537
|
+
carg_map = dict(zip(circ.clbits, cargs, strict=False))
|
|
436
538
|
|
|
437
539
|
qc.append(CompoundOperation())
|
|
438
540
|
comp_op = cast("CompoundOperation", qc[-1])
|
|
@@ -450,6 +552,7 @@ def _import_definition(
|
|
|
450
552
|
operation.params,
|
|
451
553
|
qubit_map,
|
|
452
554
|
clbit_map,
|
|
555
|
+
cregs,
|
|
453
556
|
)
|
|
454
557
|
params.extend(new_params)
|
|
455
558
|
return params
|
|
@@ -41,6 +41,9 @@ function(add_mqt_python_binding package_name target_name)
|
|
|
41
41
|
# add project libraries to the link libraries
|
|
42
42
|
list(APPEND ARG_LINK_LIBS MQT::ProjectOptions MQT::ProjectWarnings)
|
|
43
43
|
|
|
44
|
+
# Set c++ standard
|
|
45
|
+
target_compile_features(${target_name} PRIVATE cxx_std_20)
|
|
46
|
+
|
|
44
47
|
# link the required libraries
|
|
45
48
|
target_link_libraries(${target_name} PRIVATE ${ARG_LINK_LIBS})
|
|
46
49
|
|
|
@@ -11,22 +11,23 @@ if(NOT ENABLE_CACHE)
|
|
|
11
11
|
return()
|
|
12
12
|
endif()
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
CACHE STRING "Compiler cache to use")
|
|
18
|
-
set_property(CACHE CACHE_OPTION PROPERTY STRINGS ${CACHE_OPTION_VALUES})
|
|
19
|
-
list(FIND CACHE_OPTION_VALUES ${CACHE_OPTION} CACHE_OPTION_INDEX)
|
|
20
|
-
if(CACHE_OPTION_INDEX EQUAL -1)
|
|
21
|
-
message(NOTICE
|
|
22
|
-
"Unknown compiler cache '${CACHE_OPTION}'. Available options are: ${CACHE_OPTION_VALUES}")
|
|
23
|
-
endif()
|
|
14
|
+
# Check for available cache programs, preferring sccache
|
|
15
|
+
find_program(SCCACHE_BINARY sccache)
|
|
16
|
+
find_program(CCACHE_BINARY ccache)
|
|
24
17
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
if(SCCACHE_BINARY)
|
|
19
|
+
set(CACHE_OPTION "sccache")
|
|
20
|
+
set(CACHE_BINARY ${SCCACHE_BINARY})
|
|
21
|
+
message(STATUS "Compiler cache 'sccache' found and enabled")
|
|
22
|
+
elseif(CCACHE_BINARY)
|
|
23
|
+
set(CACHE_OPTION "ccache")
|
|
24
|
+
set(CACHE_BINARY ${CCACHE_BINARY})
|
|
25
|
+
message(STATUS "Compiler cache 'ccache' found and enabled")
|
|
30
26
|
else()
|
|
31
|
-
|
|
27
|
+
set(CACHE_OPTION_VALUES "ccache" "sccache")
|
|
28
|
+
message(NOTICE "No compiler cache found. Checked for: ${CACHE_OPTION_VALUES}")
|
|
29
|
+
return()
|
|
32
30
|
endif()
|
|
31
|
+
|
|
32
|
+
set(CMAKE_C_COMPILER_LAUNCHER ${CACHE_BINARY})
|
|
33
|
+
set(CMAKE_CXX_COMPILER_LAUNCHER ${CACHE_BINARY})
|
|
@@ -20,6 +20,9 @@ macro(PACKAGE_ADD_TEST testname linklibs)
|
|
|
20
20
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
21
21
|
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" DISCOVERY_TIMEOUT 60)
|
|
22
22
|
set_target_properties(${testname} PROPERTIES FOLDER tests)
|
|
23
|
+
|
|
24
|
+
# Set c++ standard
|
|
25
|
+
target_compile_features(${testname} PRIVATE cxx_std_20)
|
|
23
26
|
endif()
|
|
24
27
|
endmacro()
|
|
25
28
|
|
|
@@ -36,5 +39,8 @@ macro(PACKAGE_ADD_TEST_WITH_WORKING_DIR testname linklibs test_working_directory
|
|
|
36
39
|
WORKING_DIRECTORY ${test_working_directory}
|
|
37
40
|
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${test_working_directory}" DISCOVERY_TIMEOUT 60)
|
|
38
41
|
set_target_properties(${testname} PROPERTIES FOLDER tests)
|
|
42
|
+
|
|
43
|
+
# Set c++ standard
|
|
44
|
+
target_compile_features(${testname} PRIVATE cxx_std_20)
|
|
39
45
|
endif()
|
|
40
46
|
endmacro()
|
|
@@ -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.
|
|
13
|
+
set(PACKAGE_VERSION "3.3.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.
|
|
19
|
+
if("3.3.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.
|
|
30
|
+
set(CVF_VERSION_MAJOR "3.3.0")
|
|
31
31
|
set(CVF_VERSION_MINOR "")
|
|
32
32
|
endif()
|
|
33
33
|
|
|
@@ -21,6 +21,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
|
|
21
21
|
|
|
22
22
|
include(CMakeFindDependencyMacro)
|
|
23
23
|
find_dependency(nlohmann_json)
|
|
24
|
+
|
|
25
|
+
find_dependency(qdmi)
|
|
26
|
+
|
|
24
27
|
option(MQT_CORE_WITH_GMP "Library is configured to use GMP" OFF)
|
|
25
28
|
if(MQT_CORE_WITH_GMP)
|
|
26
29
|
find_dependency(GMP)
|
|
@@ -76,6 +76,36 @@ set_target_properties(MQT::CoreZX PROPERTIES
|
|
|
76
76
|
list(APPEND _cmake_import_check_targets MQT::CoreZX )
|
|
77
77
|
list(APPEND _cmake_import_check_files_for_MQT::CoreZX "${_IMPORT_PREFIX}/lib/mqt-core-zx.lib" "${_IMPORT_PREFIX}/bin/mqt-core-zx.dll" )
|
|
78
78
|
|
|
79
|
+
# Import target "MQT::CoreNaDeviceGen" for configuration "Release"
|
|
80
|
+
set_property(TARGET MQT::CoreNaDeviceGen APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
81
|
+
set_target_properties(MQT::CoreNaDeviceGen PROPERTIES
|
|
82
|
+
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
|
83
|
+
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/mqt-core-qdmi-na-device-gen.lib"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
list(APPEND _cmake_import_check_targets MQT::CoreNaDeviceGen )
|
|
87
|
+
list(APPEND _cmake_import_check_files_for_MQT::CoreNaDeviceGen "${_IMPORT_PREFIX}/lib/mqt-core-qdmi-na-device-gen.lib" )
|
|
88
|
+
|
|
89
|
+
# Import target "MQT::CoreQDMINaDevice" for configuration "Release"
|
|
90
|
+
set_property(TARGET MQT::CoreQDMINaDevice APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
91
|
+
set_target_properties(MQT::CoreQDMINaDevice PROPERTIES
|
|
92
|
+
IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/mqt-core-qdmi-na-device.lib"
|
|
93
|
+
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/mqt-core-qdmi-na-device.dll"
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
list(APPEND _cmake_import_check_targets MQT::CoreQDMINaDevice )
|
|
97
|
+
list(APPEND _cmake_import_check_files_for_MQT::CoreQDMINaDevice "${_IMPORT_PREFIX}/lib/mqt-core-qdmi-na-device.lib" "${_IMPORT_PREFIX}/bin/mqt-core-qdmi-na-device.dll" )
|
|
98
|
+
|
|
99
|
+
# Import target "MQT::CoreNAFoMaC" for configuration "Release"
|
|
100
|
+
set_property(TARGET MQT::CoreNAFoMaC APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
101
|
+
set_target_properties(MQT::CoreNAFoMaC PROPERTIES
|
|
102
|
+
IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/mqt-core-na-fomac.lib"
|
|
103
|
+
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/mqt-core-na-fomac.dll"
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
list(APPEND _cmake_import_check_targets MQT::CoreNAFoMaC )
|
|
107
|
+
list(APPEND _cmake_import_check_files_for_MQT::CoreNAFoMaC "${_IMPORT_PREFIX}/lib/mqt-core-na-fomac.lib" "${_IMPORT_PREFIX}/bin/mqt-core-na-fomac.dll" )
|
|
108
|
+
|
|
79
109
|
# Import target "MQT::CoreNA" for configuration "Release"
|
|
80
110
|
set_property(TARGET MQT::CoreNA APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
81
111
|
set_target_properties(MQT::CoreNA PROPERTIES
|
|
@@ -86,5 +116,26 @@ set_target_properties(MQT::CoreNA PROPERTIES
|
|
|
86
116
|
list(APPEND _cmake_import_check_targets MQT::CoreNA )
|
|
87
117
|
list(APPEND _cmake_import_check_files_for_MQT::CoreNA "${_IMPORT_PREFIX}/lib/mqt-core-na.lib" "${_IMPORT_PREFIX}/bin/mqt-core-na.dll" )
|
|
88
118
|
|
|
119
|
+
# Import target "MQT::CoreQDMIDriver" for configuration "Release"
|
|
120
|
+
set_property(TARGET MQT::CoreQDMIDriver APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
121
|
+
set_target_properties(MQT::CoreQDMIDriver PROPERTIES
|
|
122
|
+
IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/mqt-core-qdmi-driver.lib"
|
|
123
|
+
IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "MQT::CoreQDMINaDevice"
|
|
124
|
+
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/mqt-core-qdmi-driver.dll"
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
list(APPEND _cmake_import_check_targets MQT::CoreQDMIDriver )
|
|
128
|
+
list(APPEND _cmake_import_check_files_for_MQT::CoreQDMIDriver "${_IMPORT_PREFIX}/lib/mqt-core-qdmi-driver.lib" "${_IMPORT_PREFIX}/bin/mqt-core-qdmi-driver.dll" )
|
|
129
|
+
|
|
130
|
+
# Import target "MQT::CoreFoMaC" for configuration "Release"
|
|
131
|
+
set_property(TARGET MQT::CoreFoMaC APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
132
|
+
set_target_properties(MQT::CoreFoMaC PROPERTIES
|
|
133
|
+
IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/mqt-core-fomac.lib"
|
|
134
|
+
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/mqt-core-fomac.dll"
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
list(APPEND _cmake_import_check_targets MQT::CoreFoMaC )
|
|
138
|
+
list(APPEND _cmake_import_check_files_for_MQT::CoreFoMaC "${_IMPORT_PREFIX}/lib/mqt-core-fomac.lib" "${_IMPORT_PREFIX}/bin/mqt-core-fomac.dll" )
|
|
139
|
+
|
|
89
140
|
# Commands beyond this point should not need to know the version.
|
|
90
141
|
set(CMAKE_IMPORT_FILE_VERSION)
|
|
@@ -19,7 +19,7 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
|
|
|
19
19
|
set(_cmake_targets_defined "")
|
|
20
20
|
set(_cmake_targets_not_defined "")
|
|
21
21
|
set(_cmake_expected_targets "")
|
|
22
|
-
foreach(_cmake_expected_target IN ITEMS MQT::ProjectWarnings MQT::ProjectOptions MQT::CoreIR MQT::CoreQASM MQT::CoreAlgorithms MQT::CoreCircuitOptimizer MQT::CoreDS MQT::CoreDD MQT::CoreZX MQT::multiprecision MQT::CoreNA)
|
|
22
|
+
foreach(_cmake_expected_target IN ITEMS MQT::ProjectWarnings MQT::ProjectOptions MQT::CoreIR MQT::CoreQASM MQT::CoreAlgorithms MQT::CoreCircuitOptimizer MQT::CoreDS MQT::CoreDD MQT::CoreZX MQT::multiprecision MQT::CoreNaDeviceGen MQT::CoreQDMINaDevice MQT::CoreNAFoMaC MQT::CoreNA MQT::CoreQDMIDriver MQT::CoreFoMaC)
|
|
23
23
|
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
|
|
24
24
|
if(TARGET "${_cmake_expected_target}")
|
|
25
25
|
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
|
|
@@ -83,7 +83,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
|
|
|
83
83
|
FILE_SET "HEADERS"
|
|
84
84
|
TYPE "HEADERS"
|
|
85
85
|
BASE_DIRS "${_IMPORT_PREFIX}/include/mqt-core"
|
|
86
|
-
FILES "${_IMPORT_PREFIX}/include/mqt-core/ir/Definitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/Permutation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/QuantumComputation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/Register.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/mqt_core_ir_export.h" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/AodOperation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/
|
|
86
|
+
FILES "${_IMPORT_PREFIX}/include/mqt-core/ir/Definitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/Permutation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/QuantumComputation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/Register.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/mqt_core_ir_export.h" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/AodOperation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/CompoundOperation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/Control.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/Expression.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/IfElseOperation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/NonUnitaryOperation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/OpType.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/OpType.inc" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/Operation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/StandardOperation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/ir/operations/SymbolicOperation.hpp"
|
|
87
87
|
)
|
|
88
88
|
else()
|
|
89
89
|
set_property(TARGET MQT::CoreIR
|
|
@@ -96,6 +96,7 @@ endif()
|
|
|
96
96
|
add_library(MQT::CoreQASM SHARED IMPORTED)
|
|
97
97
|
|
|
98
98
|
set_target_properties(MQT::CoreQASM PROPERTIES
|
|
99
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
99
100
|
INTERFACE_LINK_LIBRARIES "MQT::CoreIR"
|
|
100
101
|
)
|
|
101
102
|
|
|
@@ -118,6 +119,7 @@ endif()
|
|
|
118
119
|
add_library(MQT::CoreAlgorithms SHARED IMPORTED)
|
|
119
120
|
|
|
120
121
|
set_target_properties(MQT::CoreAlgorithms PROPERTIES
|
|
122
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
121
123
|
INTERFACE_LINK_LIBRARIES "MQT::CoreIR"
|
|
122
124
|
)
|
|
123
125
|
|
|
@@ -140,6 +142,7 @@ endif()
|
|
|
140
142
|
add_library(MQT::CoreCircuitOptimizer SHARED IMPORTED)
|
|
141
143
|
|
|
142
144
|
set_target_properties(MQT::CoreCircuitOptimizer PROPERTIES
|
|
145
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
143
146
|
INTERFACE_LINK_LIBRARIES "MQT::CoreIR"
|
|
144
147
|
)
|
|
145
148
|
|
|
@@ -162,6 +165,7 @@ endif()
|
|
|
162
165
|
add_library(MQT::CoreDS SHARED IMPORTED)
|
|
163
166
|
|
|
164
167
|
set_target_properties(MQT::CoreDS PROPERTIES
|
|
168
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
165
169
|
INTERFACE_LINK_LIBRARIES "MQT::CoreIR"
|
|
166
170
|
)
|
|
167
171
|
|
|
@@ -184,6 +188,7 @@ endif()
|
|
|
184
188
|
add_library(MQT::CoreDD SHARED IMPORTED)
|
|
185
189
|
|
|
186
190
|
set_target_properties(MQT::CoreDD PROPERTIES
|
|
191
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
187
192
|
INTERFACE_LINK_LIBRARIES "MQT::CoreIR;nlohmann_json::nlohmann_json"
|
|
188
193
|
)
|
|
189
194
|
|
|
@@ -206,6 +211,7 @@ endif()
|
|
|
206
211
|
add_library(MQT::CoreZX SHARED IMPORTED)
|
|
207
212
|
|
|
208
213
|
set_target_properties(MQT::CoreZX PROPERTIES
|
|
214
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
209
215
|
INTERFACE_LINK_LIBRARIES "MQT::CoreIR;MQT::multiprecision"
|
|
210
216
|
)
|
|
211
217
|
|
|
@@ -242,10 +248,79 @@ else()
|
|
|
242
248
|
)
|
|
243
249
|
endif()
|
|
244
250
|
|
|
251
|
+
# Create imported target MQT::CoreNaDeviceGen
|
|
252
|
+
add_library(MQT::CoreNaDeviceGen STATIC IMPORTED)
|
|
253
|
+
|
|
254
|
+
set_target_properties(MQT::CoreNaDeviceGen PROPERTIES
|
|
255
|
+
INTERFACE_LINK_LIBRARIES "nlohmann_json::nlohmann_json;\$<LINK_ONLY:spdlog::spdlog>;\$<LINK_ONLY:MQT::ProjectOptions>;\$<LINK_ONLY:MQT::ProjectWarnings>"
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
|
|
259
|
+
target_sources(MQT::CoreNaDeviceGen
|
|
260
|
+
INTERFACE
|
|
261
|
+
FILE_SET "HEADERS"
|
|
262
|
+
TYPE "HEADERS"
|
|
263
|
+
BASE_DIRS "${_IMPORT_PREFIX}/include/mqt-core"
|
|
264
|
+
FILES "${_IMPORT_PREFIX}/include/mqt-core/na/device/Generator.hpp"
|
|
265
|
+
)
|
|
266
|
+
else()
|
|
267
|
+
set_property(TARGET MQT::CoreNaDeviceGen
|
|
268
|
+
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
269
|
+
"${_IMPORT_PREFIX}/include/mqt-core"
|
|
270
|
+
)
|
|
271
|
+
endif()
|
|
272
|
+
|
|
273
|
+
# Create imported target MQT::CoreQDMINaDevice
|
|
274
|
+
add_library(MQT::CoreQDMINaDevice SHARED IMPORTED)
|
|
275
|
+
|
|
276
|
+
set_target_properties(MQT::CoreQDMINaDevice PROPERTIES
|
|
277
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
278
|
+
INTERFACE_LINK_LIBRARIES "qdmi::qdmi"
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
|
|
282
|
+
target_sources(MQT::CoreQDMINaDevice
|
|
283
|
+
INTERFACE
|
|
284
|
+
FILE_SET "HEADERS"
|
|
285
|
+
TYPE "HEADERS"
|
|
286
|
+
BASE_DIRS "${_IMPORT_PREFIX}/include/mqt-core"
|
|
287
|
+
FILES "${_IMPORT_PREFIX}/include/mqt-core/mqt_na_qdmi/device.h" "${_IMPORT_PREFIX}/include/mqt-core/mqt_na_qdmi/types.h" "${_IMPORT_PREFIX}/include/mqt-core/na/device/DeviceMemberInitializers.hpp" "${_IMPORT_PREFIX}/include/mqt-core/na/device/Device.hpp"
|
|
288
|
+
)
|
|
289
|
+
else()
|
|
290
|
+
set_property(TARGET MQT::CoreQDMINaDevice
|
|
291
|
+
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
292
|
+
"${_IMPORT_PREFIX}/include/mqt-core"
|
|
293
|
+
)
|
|
294
|
+
endif()
|
|
295
|
+
|
|
296
|
+
# Create imported target MQT::CoreNAFoMaC
|
|
297
|
+
add_library(MQT::CoreNAFoMaC SHARED IMPORTED)
|
|
298
|
+
|
|
299
|
+
set_target_properties(MQT::CoreNAFoMaC PROPERTIES
|
|
300
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
301
|
+
INTERFACE_LINK_LIBRARIES "MQT::CoreFoMaC;nlohmann_json::nlohmann_json"
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
|
|
305
|
+
target_sources(MQT::CoreNAFoMaC
|
|
306
|
+
INTERFACE
|
|
307
|
+
FILE_SET "HEADERS"
|
|
308
|
+
TYPE "HEADERS"
|
|
309
|
+
BASE_DIRS "${_IMPORT_PREFIX}/include/mqt-core"
|
|
310
|
+
FILES "${_IMPORT_PREFIX}/include/mqt-core/na/fomac/Device.hpp"
|
|
311
|
+
)
|
|
312
|
+
else()
|
|
313
|
+
set_property(TARGET MQT::CoreNAFoMaC
|
|
314
|
+
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
315
|
+
"${_IMPORT_PREFIX}/include/mqt-core"
|
|
316
|
+
)
|
|
317
|
+
endif()
|
|
318
|
+
|
|
245
319
|
# Create imported target MQT::CoreNA
|
|
246
320
|
add_library(MQT::CoreNA SHARED IMPORTED)
|
|
247
321
|
|
|
248
322
|
set_target_properties(MQT::CoreNA PROPERTIES
|
|
323
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
249
324
|
INTERFACE_LINK_LIBRARIES "MQT::CoreIR"
|
|
250
325
|
)
|
|
251
326
|
|
|
@@ -264,6 +339,52 @@ else()
|
|
|
264
339
|
)
|
|
265
340
|
endif()
|
|
266
341
|
|
|
342
|
+
# Create imported target MQT::CoreQDMIDriver
|
|
343
|
+
add_library(MQT::CoreQDMIDriver SHARED IMPORTED)
|
|
344
|
+
|
|
345
|
+
set_target_properties(MQT::CoreQDMIDriver PROPERTIES
|
|
346
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
347
|
+
INTERFACE_LINK_LIBRARIES "qdmi::qdmi"
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
|
|
351
|
+
target_sources(MQT::CoreQDMIDriver
|
|
352
|
+
INTERFACE
|
|
353
|
+
FILE_SET "HEADERS"
|
|
354
|
+
TYPE "HEADERS"
|
|
355
|
+
BASE_DIRS "${_IMPORT_PREFIX}/include/mqt-core"
|
|
356
|
+
FILES "${_IMPORT_PREFIX}/include/mqt-core/qdmi/Driver.hpp"
|
|
357
|
+
)
|
|
358
|
+
else()
|
|
359
|
+
set_property(TARGET MQT::CoreQDMIDriver
|
|
360
|
+
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
361
|
+
"${_IMPORT_PREFIX}/include/mqt-core"
|
|
362
|
+
)
|
|
363
|
+
endif()
|
|
364
|
+
|
|
365
|
+
# Create imported target MQT::CoreFoMaC
|
|
366
|
+
add_library(MQT::CoreFoMaC SHARED IMPORTED)
|
|
367
|
+
|
|
368
|
+
set_target_properties(MQT::CoreFoMaC PROPERTIES
|
|
369
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_20"
|
|
370
|
+
INTERFACE_LINK_LIBRARIES "qdmi::qdmi;MQT::CoreQDMIDriver"
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
|
|
374
|
+
target_sources(MQT::CoreFoMaC
|
|
375
|
+
INTERFACE
|
|
376
|
+
FILE_SET "HEADERS"
|
|
377
|
+
TYPE "HEADERS"
|
|
378
|
+
BASE_DIRS "${_IMPORT_PREFIX}/include/mqt-core"
|
|
379
|
+
FILES "${_IMPORT_PREFIX}/include/mqt-core/fomac/FoMaC.hpp"
|
|
380
|
+
)
|
|
381
|
+
else()
|
|
382
|
+
set_property(TARGET MQT::CoreFoMaC
|
|
383
|
+
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
384
|
+
"${_IMPORT_PREFIX}/include/mqt-core"
|
|
385
|
+
)
|
|
386
|
+
endif()
|
|
387
|
+
|
|
267
388
|
# Load information for each installed configuration.
|
|
268
389
|
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/mqt-core-targets-*.cmake")
|
|
269
390
|
foreach(_cmake_config_file IN LISTS _cmake_config_files)
|
|
@@ -303,7 +424,7 @@ unset(_cmake_import_check_targets)
|
|
|
303
424
|
# Make sure the targets which have been exported in some other
|
|
304
425
|
# export set exist.
|
|
305
426
|
unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets)
|
|
306
|
-
foreach(_target "nlohmann_json::nlohmann_json" )
|
|
427
|
+
foreach(_target "nlohmann_json::nlohmann_json" "spdlog::spdlog" "qdmi::qdmi" )
|
|
307
428
|
if(NOT TARGET "${_target}" )
|
|
308
429
|
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}")
|
|
309
430
|
endif()
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
include(FindPackageHandleStandardArgs)
|
|
2
|
+
set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG ${CMAKE_CURRENT_LIST_FILE})
|
|
3
|
+
find_package_handle_standard_args(nlohmann_json CONFIG_MODE)
|
|
4
|
+
|
|
5
|
+
if(NOT TARGET nlohmann_json::nlohmann_json)
|
|
6
|
+
include("${CMAKE_CURRENT_LIST_DIR}/nlohmann_jsonTargets.cmake")
|
|
7
|
+
if((NOT TARGET nlohmann_json) AND
|
|
8
|
+
(NOT nlohmann_json_FIND_VERSION OR
|
|
9
|
+
nlohmann_json_FIND_VERSION VERSION_LESS 3.2.0))
|
|
10
|
+
add_library(nlohmann_json INTERFACE IMPORTED)
|
|
11
|
+
set_target_properties(nlohmann_json PROPERTIES
|
|
12
|
+
INTERFACE_LINK_LIBRARIES nlohmann_json::nlohmann_json
|
|
13
|
+
)
|
|
14
|
+
endif()
|
|
15
|
+
endif()
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This is essentially cmake's BasicConfigVersion-SameMajorVersion.cmake.in but
|
|
2
|
+
# without the 32/64-bit check. Since json is a header-only library, it doesn't
|
|
3
|
+
# matter if it was built on a different platform than what it is used on (see
|
|
4
|
+
# https://github.com/nlohmann/json/issues/1697).
|
|
5
|
+
set(PACKAGE_VERSION "3.12.0")
|
|
6
|
+
|
|
7
|
+
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
|
8
|
+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
9
|
+
else()
|
|
10
|
+
|
|
11
|
+
if(PACKAGE_FIND_VERSION_MAJOR STREQUAL "3")
|
|
12
|
+
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
|
13
|
+
else()
|
|
14
|
+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
15
|
+
endif()
|
|
16
|
+
|
|
17
|
+
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
|
18
|
+
set(PACKAGE_VERSION_EXACT TRUE)
|
|
19
|
+
endif()
|
|
20
|
+
endif()
|