mqt-core 3.2.0__cp313-cp313t-win_arm64.whl → 3.3.0__cp313-cp313t-win_arm64.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 (245) hide show
  1. mqt/core/__init__.py +3 -3
  2. mqt/core/_commands.py +2 -2
  3. mqt/core/_version.py +16 -3
  4. mqt/core/bin/mqt-core-algorithms.dll +0 -0
  5. mqt/core/bin/mqt-core-circuit-optimizer.dll +0 -0
  6. mqt/core/bin/mqt-core-dd.dll +0 -0
  7. mqt/core/bin/mqt-core-ds.dll +0 -0
  8. mqt/core/bin/mqt-core-fomac.dll +0 -0
  9. mqt/core/bin/mqt-core-ir.dll +0 -0
  10. mqt/core/bin/mqt-core-na-fomac.dll +0 -0
  11. mqt/core/bin/mqt-core-na.dll +0 -0
  12. mqt/core/bin/mqt-core-qasm.dll +0 -0
  13. mqt/core/bin/mqt-core-qdmi-driver.dll +0 -0
  14. mqt/core/bin/mqt-core-qdmi-na-device.dll +0 -0
  15. mqt/core/bin/mqt-core-zx.dll +0 -0
  16. mqt/core/dd.cp313t-win_arm64.pyd +0 -0
  17. mqt/core/dd.pyi +5 -7
  18. mqt/core/fomac.cp313t-win_arm64.pyd +0 -0
  19. mqt/core/fomac.pyi +125 -0
  20. mqt/core/include/mqt-core/circuit_optimizer/CircuitOptimizer.hpp +13 -0
  21. mqt/core/include/mqt-core/datastructures/DirectedGraph.hpp +1 -1
  22. mqt/core/include/mqt-core/datastructures/UndirectedGraph.hpp +1 -1
  23. mqt/core/include/mqt-core/dd/CachedEdge.hpp +7 -0
  24. mqt/core/include/mqt-core/dd/Operations.hpp +12 -14
  25. mqt/core/include/mqt-core/dd/Package.hpp +1 -1
  26. mqt/core/include/mqt-core/fomac/FoMaC.hpp +568 -0
  27. mqt/core/include/mqt-core/ir/QuantumComputation.hpp +29 -28
  28. mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +2 -0
  29. mqt/core/include/mqt-core/ir/operations/IfElseOperation.hpp +169 -0
  30. mqt/core/include/mqt-core/ir/operations/OpType.hpp +3 -0
  31. mqt/core/include/mqt-core/ir/operations/OpType.inc +2 -2
  32. mqt/core/include/mqt-core/ir/operations/Operation.hpp +3 -1
  33. mqt/core/include/mqt-core/ir/operations/StandardOperation.hpp +2 -0
  34. mqt/core/include/mqt-core/mqt_na_qdmi/device.h +602 -0
  35. mqt/core/include/mqt-core/mqt_na_qdmi/types.h +78 -0
  36. mqt/core/include/mqt-core/na/device/Device.hpp +410 -0
  37. mqt/core/include/mqt-core/na/device/DeviceMemberInitializers.hpp +724 -0
  38. mqt/core/include/mqt-core/na/device/Generator.hpp +447 -0
  39. mqt/core/include/mqt-core/na/fomac/Device.hpp +169 -0
  40. mqt/core/include/mqt-core/qdmi/Driver.hpp +431 -0
  41. mqt/core/include/nlohmann/adl_serializer.hpp +55 -0
  42. mqt/core/include/nlohmann/byte_container_with_subtype.hpp +103 -0
  43. mqt/core/include/nlohmann/detail/abi_macros.hpp +111 -0
  44. mqt/core/include/nlohmann/detail/conversions/from_json.hpp +577 -0
  45. mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +1118 -0
  46. mqt/core/include/nlohmann/detail/conversions/to_json.hpp +479 -0
  47. mqt/core/include/nlohmann/detail/exceptions.hpp +291 -0
  48. mqt/core/include/nlohmann/detail/hash.hpp +129 -0
  49. mqt/core/include/nlohmann/detail/input/binary_reader.hpp +3068 -0
  50. mqt/core/include/nlohmann/detail/input/input_adapters.hpp +549 -0
  51. mqt/core/include/nlohmann/detail/input/json_sax.hpp +986 -0
  52. mqt/core/include/nlohmann/detail/input/lexer.hpp +1643 -0
  53. mqt/core/include/nlohmann/detail/input/parser.hpp +519 -0
  54. mqt/core/include/nlohmann/detail/input/position_t.hpp +37 -0
  55. mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +35 -0
  56. mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +760 -0
  57. mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +235 -0
  58. mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +61 -0
  59. mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +130 -0
  60. mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +132 -0
  61. mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +39 -0
  62. mqt/core/include/nlohmann/detail/json_pointer.hpp +988 -0
  63. mqt/core/include/nlohmann/detail/json_ref.hpp +78 -0
  64. mqt/core/include/nlohmann/detail/macro_scope.hpp +595 -0
  65. mqt/core/include/nlohmann/detail/macro_unscope.hpp +46 -0
  66. mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +17 -0
  67. mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +17 -0
  68. mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +171 -0
  69. mqt/core/include/nlohmann/detail/meta/detected.hpp +70 -0
  70. mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +21 -0
  71. mqt/core/include/nlohmann/detail/meta/is_sax.hpp +159 -0
  72. mqt/core/include/nlohmann/detail/meta/std_fs.hpp +29 -0
  73. mqt/core/include/nlohmann/detail/meta/type_traits.hpp +795 -0
  74. mqt/core/include/nlohmann/detail/meta/void_t.hpp +24 -0
  75. mqt/core/include/nlohmann/detail/output/binary_writer.hpp +1850 -0
  76. mqt/core/include/nlohmann/detail/output/output_adapters.hpp +147 -0
  77. mqt/core/include/nlohmann/detail/output/serializer.hpp +988 -0
  78. mqt/core/include/nlohmann/detail/string_concat.hpp +146 -0
  79. mqt/core/include/nlohmann/detail/string_escape.hpp +72 -0
  80. mqt/core/include/nlohmann/detail/string_utils.hpp +37 -0
  81. mqt/core/include/nlohmann/detail/value_t.hpp +118 -0
  82. mqt/core/include/nlohmann/json.hpp +5306 -0
  83. mqt/core/include/nlohmann/json_fwd.hpp +75 -0
  84. mqt/core/include/nlohmann/ordered_map.hpp +359 -0
  85. mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +2045 -0
  86. mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +158 -0
  87. mqt/core/include/qdmi/qdmi/client.h +990 -0
  88. mqt/core/include/qdmi/qdmi/constants.h +1139 -0
  89. mqt/core/include/qdmi/qdmi/device.h +602 -0
  90. mqt/core/include/qdmi/qdmi/types.h +78 -0
  91. mqt/core/include/spdlog/async.h +99 -0
  92. mqt/core/include/spdlog/async_logger-inl.h +84 -0
  93. mqt/core/include/spdlog/async_logger.h +74 -0
  94. mqt/core/include/spdlog/cfg/argv.h +40 -0
  95. mqt/core/include/spdlog/cfg/env.h +36 -0
  96. mqt/core/include/spdlog/cfg/helpers-inl.h +107 -0
  97. mqt/core/include/spdlog/cfg/helpers.h +29 -0
  98. mqt/core/include/spdlog/common-inl.h +68 -0
  99. mqt/core/include/spdlog/common.h +406 -0
  100. mqt/core/include/spdlog/details/backtracer-inl.h +63 -0
  101. mqt/core/include/spdlog/details/backtracer.h +45 -0
  102. mqt/core/include/spdlog/details/circular_q.h +115 -0
  103. mqt/core/include/spdlog/details/console_globals.h +28 -0
  104. mqt/core/include/spdlog/details/file_helper-inl.h +153 -0
  105. mqt/core/include/spdlog/details/file_helper.h +61 -0
  106. mqt/core/include/spdlog/details/fmt_helper.h +141 -0
  107. mqt/core/include/spdlog/details/log_msg-inl.h +44 -0
  108. mqt/core/include/spdlog/details/log_msg.h +40 -0
  109. mqt/core/include/spdlog/details/log_msg_buffer-inl.h +54 -0
  110. mqt/core/include/spdlog/details/log_msg_buffer.h +32 -0
  111. mqt/core/include/spdlog/details/mpmc_blocking_q.h +177 -0
  112. mqt/core/include/spdlog/details/null_mutex.h +35 -0
  113. mqt/core/include/spdlog/details/os-inl.h +606 -0
  114. mqt/core/include/spdlog/details/os.h +127 -0
  115. mqt/core/include/spdlog/details/periodic_worker-inl.h +26 -0
  116. mqt/core/include/spdlog/details/periodic_worker.h +58 -0
  117. mqt/core/include/spdlog/details/registry-inl.h +270 -0
  118. mqt/core/include/spdlog/details/registry.h +131 -0
  119. mqt/core/include/spdlog/details/synchronous_factory.h +22 -0
  120. mqt/core/include/spdlog/details/tcp_client-windows.h +135 -0
  121. mqt/core/include/spdlog/details/tcp_client.h +127 -0
  122. mqt/core/include/spdlog/details/thread_pool-inl.h +126 -0
  123. mqt/core/include/spdlog/details/thread_pool.h +117 -0
  124. mqt/core/include/spdlog/details/udp_client-windows.h +98 -0
  125. mqt/core/include/spdlog/details/udp_client.h +81 -0
  126. mqt/core/include/spdlog/details/windows_include.h +11 -0
  127. mqt/core/include/spdlog/fmt/bin_to_hex.h +224 -0
  128. mqt/core/include/spdlog/fmt/bundled/args.h +220 -0
  129. mqt/core/include/spdlog/fmt/bundled/base.h +2989 -0
  130. mqt/core/include/spdlog/fmt/bundled/chrono.h +2330 -0
  131. mqt/core/include/spdlog/fmt/bundled/color.h +637 -0
  132. mqt/core/include/spdlog/fmt/bundled/compile.h +539 -0
  133. mqt/core/include/spdlog/fmt/bundled/core.h +5 -0
  134. mqt/core/include/spdlog/fmt/bundled/fmt.license.rst +27 -0
  135. mqt/core/include/spdlog/fmt/bundled/format-inl.h +1948 -0
  136. mqt/core/include/spdlog/fmt/bundled/format.h +4244 -0
  137. mqt/core/include/spdlog/fmt/bundled/os.h +427 -0
  138. mqt/core/include/spdlog/fmt/bundled/ostream.h +167 -0
  139. mqt/core/include/spdlog/fmt/bundled/printf.h +633 -0
  140. mqt/core/include/spdlog/fmt/bundled/ranges.h +850 -0
  141. mqt/core/include/spdlog/fmt/bundled/std.h +728 -0
  142. mqt/core/include/spdlog/fmt/bundled/xchar.h +369 -0
  143. mqt/core/include/spdlog/fmt/chrono.h +23 -0
  144. mqt/core/include/spdlog/fmt/compile.h +23 -0
  145. mqt/core/include/spdlog/fmt/fmt.h +30 -0
  146. mqt/core/include/spdlog/fmt/ostr.h +23 -0
  147. mqt/core/include/spdlog/fmt/ranges.h +23 -0
  148. mqt/core/include/spdlog/fmt/std.h +24 -0
  149. mqt/core/include/spdlog/fmt/xchar.h +23 -0
  150. mqt/core/include/spdlog/formatter.h +17 -0
  151. mqt/core/include/spdlog/fwd.h +18 -0
  152. mqt/core/include/spdlog/logger-inl.h +198 -0
  153. mqt/core/include/spdlog/logger.h +379 -0
  154. mqt/core/include/spdlog/mdc.h +52 -0
  155. mqt/core/include/spdlog/pattern_formatter-inl.h +1340 -0
  156. mqt/core/include/spdlog/pattern_formatter.h +118 -0
  157. mqt/core/include/spdlog/sinks/android_sink.h +137 -0
  158. mqt/core/include/spdlog/sinks/ansicolor_sink-inl.h +142 -0
  159. mqt/core/include/spdlog/sinks/ansicolor_sink.h +116 -0
  160. mqt/core/include/spdlog/sinks/base_sink-inl.h +59 -0
  161. mqt/core/include/spdlog/sinks/base_sink.h +51 -0
  162. mqt/core/include/spdlog/sinks/basic_file_sink-inl.h +48 -0
  163. mqt/core/include/spdlog/sinks/basic_file_sink.h +66 -0
  164. mqt/core/include/spdlog/sinks/callback_sink.h +56 -0
  165. mqt/core/include/spdlog/sinks/daily_file_sink.h +254 -0
  166. mqt/core/include/spdlog/sinks/dist_sink.h +81 -0
  167. mqt/core/include/spdlog/sinks/dup_filter_sink.h +91 -0
  168. mqt/core/include/spdlog/sinks/hourly_file_sink.h +193 -0
  169. mqt/core/include/spdlog/sinks/kafka_sink.h +119 -0
  170. mqt/core/include/spdlog/sinks/mongo_sink.h +108 -0
  171. mqt/core/include/spdlog/sinks/msvc_sink.h +68 -0
  172. mqt/core/include/spdlog/sinks/null_sink.h +41 -0
  173. mqt/core/include/spdlog/sinks/ostream_sink.h +43 -0
  174. mqt/core/include/spdlog/sinks/qt_sinks.h +304 -0
  175. mqt/core/include/spdlog/sinks/ringbuffer_sink.h +67 -0
  176. mqt/core/include/spdlog/sinks/rotating_file_sink-inl.h +179 -0
  177. mqt/core/include/spdlog/sinks/rotating_file_sink.h +93 -0
  178. mqt/core/include/spdlog/sinks/sink-inl.h +22 -0
  179. mqt/core/include/spdlog/sinks/sink.h +34 -0
  180. mqt/core/include/spdlog/sinks/stdout_color_sinks-inl.h +38 -0
  181. mqt/core/include/spdlog/sinks/stdout_color_sinks.h +49 -0
  182. mqt/core/include/spdlog/sinks/stdout_sinks-inl.h +127 -0
  183. mqt/core/include/spdlog/sinks/stdout_sinks.h +84 -0
  184. mqt/core/include/spdlog/sinks/syslog_sink.h +104 -0
  185. mqt/core/include/spdlog/sinks/systemd_sink.h +121 -0
  186. mqt/core/include/spdlog/sinks/tcp_sink.h +75 -0
  187. mqt/core/include/spdlog/sinks/udp_sink.h +69 -0
  188. mqt/core/include/spdlog/sinks/win_eventlog_sink.h +260 -0
  189. mqt/core/include/spdlog/sinks/wincolor_sink-inl.h +172 -0
  190. mqt/core/include/spdlog/sinks/wincolor_sink.h +82 -0
  191. mqt/core/include/spdlog/spdlog-inl.h +96 -0
  192. mqt/core/include/spdlog/spdlog.h +357 -0
  193. mqt/core/include/spdlog/stopwatch.h +66 -0
  194. mqt/core/include/spdlog/tweakme.h +148 -0
  195. mqt/core/include/spdlog/version.h +11 -0
  196. mqt/core/ir/__init__.pyi +83 -45
  197. mqt/core/ir/operations.pyi +40 -27
  198. mqt/core/ir.cp313t-win_arm64.pyd +0 -0
  199. mqt/core/lib/cmake/spdlog/spdlogConfig.cmake +44 -0
  200. mqt/core/lib/cmake/spdlog/spdlogConfigTargets-release.cmake +19 -0
  201. mqt/core/lib/cmake/spdlog/spdlogConfigTargets.cmake +119 -0
  202. mqt/core/lib/cmake/spdlog/spdlogConfigVersion.cmake +65 -0
  203. mqt/core/lib/mqt-core-circuit-optimizer.lib +0 -0
  204. mqt/core/lib/mqt-core-dd.lib +0 -0
  205. mqt/core/lib/mqt-core-fomac.lib +0 -0
  206. mqt/core/lib/mqt-core-ir.lib +0 -0
  207. mqt/core/lib/mqt-core-na-fomac.lib +0 -0
  208. mqt/core/lib/mqt-core-qasm.lib +0 -0
  209. mqt/core/lib/mqt-core-qdmi-driver.lib +0 -0
  210. mqt/core/lib/mqt-core-qdmi-na-device-gen.lib +0 -0
  211. mqt/core/lib/mqt-core-qdmi-na-device.lib +0 -0
  212. mqt/core/lib/pkgconfig/spdlog.pc +13 -0
  213. mqt/core/lib/spdlog.lib +0 -0
  214. mqt/core/na/__init__.py +12 -0
  215. mqt/core/na/fomac.cp313t-win_arm64.pyd +0 -0
  216. mqt/core/na/fomac.pyi +117 -0
  217. mqt/core/nlohmann_json.natvis +278 -0
  218. mqt/core/plugins/qiskit/mqt_to_qiskit.py +75 -11
  219. mqt/core/plugins/qiskit/qiskit_to_mqt.py +108 -5
  220. mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +3 -0
  221. mqt/core/share/cmake/mqt-core/Cache.cmake +17 -16
  222. mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +6 -0
  223. mqt/core/share/cmake/mqt-core/StandardProjectSettings.cmake +1 -1
  224. mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +3 -3
  225. mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +3 -0
  226. mqt/core/share/cmake/mqt-core/mqt-core-targets-release.cmake +51 -0
  227. mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +124 -3
  228. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +15 -0
  229. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +20 -0
  230. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +110 -0
  231. mqt/core/share/cmake/qdmi/Cache.cmake +44 -0
  232. mqt/core/share/cmake/qdmi/PrefixHandling.cmake +78 -0
  233. mqt/core/share/cmake/qdmi/prefix_defs.txt +26 -0
  234. mqt/core/share/cmake/qdmi/qdmi-config-version.cmake +85 -0
  235. mqt/core/share/cmake/qdmi/qdmi-config.cmake +42 -0
  236. mqt/core/share/cmake/qdmi/qdmi-targets.cmake +129 -0
  237. mqt/core/share/pkgconfig/nlohmann_json.pc +7 -0
  238. mqt_core-3.3.0.dist-info/DELVEWHEEL +2 -0
  239. {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/METADATA +74 -33
  240. {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/RECORD +243 -49
  241. {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/WHEEL +1 -1
  242. mqt/core/include/mqt-core/ir/operations/ClassicControlledOperation.hpp +0 -156
  243. mqt_core-3.2.0.dist-info/DELVEWHEEL +0 -2
  244. {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/entry_points.txt +0 -0
  245. {mqt_core-3.2.0.dist-info → mqt_core-3.3.0.dist-info}/licenses/LICENSE.md +0 -0
@@ -0,0 +1,568 @@
1
+ /*
2
+ * Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
3
+ * Copyright (c) 2025 Munich Quantum Software Company GmbH
4
+ * All rights reserved.
5
+ *
6
+ * SPDX-License-Identifier: MIT
7
+ *
8
+ * Licensed under the MIT License
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include <algorithm>
14
+ #include <concepts>
15
+ #include <cstddef>
16
+ #include <cstdint>
17
+ #include <iostream>
18
+ #include <iterator>
19
+ #include <optional>
20
+ #include <qdmi/client.h>
21
+ #include <ranges>
22
+ #include <string>
23
+ #include <type_traits>
24
+ #include <utility>
25
+ #include <vector>
26
+
27
+ namespace fomac {
28
+ /**
29
+ * @brief Concept for ranges that are contiguous in memory and can be
30
+ * constructed with a size.
31
+ * @details This concept is used to constrain the template parameter of the
32
+ * `queryProperty` method.
33
+ * @tparam T The type to check.
34
+ */
35
+ template <typename T>
36
+ concept size_constructible_contiguous_range =
37
+ std::ranges::contiguous_range<T> &&
38
+ std::constructible_from<T, std::size_t> &&
39
+ requires { typename T::value_type; } && requires(T t) {
40
+ { t.data() } -> std::same_as<typename T::value_type*>;
41
+ };
42
+ /**
43
+ * @brief Concept for types that are either integral, floating point, bool,
44
+ * std::string, or QDMI_Device_Status.
45
+ * @details This concept is used to constrain the template parameter of the
46
+ * `queryProperty` method.
47
+ * @tparam T The type to check.
48
+ */
49
+ template <typename T>
50
+ concept value_or_string =
51
+ std::integral<T> || std::floating_point<T> || std::is_same_v<T, bool> ||
52
+ std::is_same_v<T, std::string> || std::is_same_v<T, QDMI_Device_Status>;
53
+
54
+ /**
55
+ * @brief Concept for types that are either value_or_string or
56
+ * size_constructible_contiguous_range.
57
+ * @details This concept is used to constrain the template parameter of the
58
+ * `queryProperty` method.
59
+ * @tparam T The type to check.
60
+ */
61
+ template <typename T>
62
+ concept value_or_string_or_vector =
63
+ value_or_string<T> || size_constructible_contiguous_range<T>;
64
+
65
+ /**
66
+ * @brief Concept for types that are std::optional of value_or_string.
67
+ * @details This concept is used to constrain the template parameter of the
68
+ * `queryProperty` method.
69
+ * @tparam T The type to check.
70
+ */
71
+ template <typename T>
72
+ concept is_optional = requires { typename T::value_type; } &&
73
+ std::is_same_v<T, std::optional<typename T::value_type>>;
74
+
75
+ /**
76
+ * @brief Concept for types that are either std::string or std::optional of
77
+ * std::string.
78
+ * @details This concept is used to constrain the template parameter of the
79
+ * `queryProperty` method.
80
+ * @tparam T The type to check.
81
+ */
82
+ template <typename T>
83
+ concept string_or_optional_string =
84
+ std::is_same_v<T, std::string> ||
85
+ (is_optional<T> && std::is_same_v<typename T::value_type, std::string>);
86
+
87
+ /// @see remove_optional_t
88
+ template <typename T> struct remove_optional {
89
+ using type = T;
90
+ };
91
+
92
+ /// @see remove_optional_t
93
+ template <typename U> struct remove_optional<std::optional<U>> {
94
+ using type = U;
95
+ };
96
+
97
+ /**
98
+ * @brief Helper type to strip std::optional from a type if it is present.
99
+ * @details This is useful for template metaprogramming when you want to work
100
+ * with the underlying type of optional without caring about its optionality.
101
+ * @tparam T The type to strip optional from.
102
+ */
103
+ template <typename T>
104
+ using remove_optional_t = typename remove_optional<T>::type;
105
+
106
+ /**
107
+ * @brief Concept for types that are either size_constructible_contiguous_range
108
+ * or std::optional of size_constructible_contiguous_range.
109
+ * @details This concept is used to constrain the template parameter of the
110
+ * `queryProperty` method.
111
+ * @tparam T The type to check.
112
+ * @see Operation::queryProperty
113
+ */
114
+ template <typename T>
115
+ concept maybe_optional_size_constructible_contiguous_range =
116
+ size_constructible_contiguous_range<remove_optional_t<T>>;
117
+
118
+ /**
119
+ * @brief Concept for types that are either value_or_string or std::optional of
120
+ * value_or_string.
121
+ * @details This concept is used to constrain the template parameter of the
122
+ * `queryProperty` method.
123
+ * @tparam T The type to check.
124
+ * @see Site::queryProperty
125
+ */
126
+ template <typename T>
127
+ concept maybe_optional_value_or_string = value_or_string<remove_optional_t<T>>;
128
+
129
+ /**
130
+ * @brief Concept for types that are either value_or_string_or_vector or
131
+ * std::optional of value_or_string_or_vector.
132
+ * @details This concept is used to constrain the template parameter of the
133
+ * `queryProperty` method.
134
+ * @tparam T The type to check.
135
+ * @see Operation::queryProperty
136
+ */
137
+ template <typename T>
138
+ concept maybe_optional_value_or_string_or_vector =
139
+ value_or_string_or_vector<remove_optional_t<T>>;
140
+
141
+ /// @returns the string representation of the given QDMI_STATUS.
142
+ auto toString(QDMI_STATUS result) -> std::string;
143
+
144
+ /// @returns the string representation of the given QDMI_Site_Property.
145
+ auto toString(QDMI_Site_Property prop) -> std::string;
146
+
147
+ /// @returns the string representation of the given QDMI_Operation_Property.
148
+ auto toString(QDMI_Operation_Property prop) -> std::string;
149
+
150
+ /// @returns the string representation of the given QDMI_Device_Property.
151
+ auto toString(QDMI_Device_Property prop) -> std::string;
152
+
153
+ /// @returns the string representation of the given QDMI_Session_Property.
154
+ constexpr auto toString(QDMI_Session_Property prop) -> std::string {
155
+ if (prop == QDMI_SESSION_PROPERTY_DEVICES) {
156
+ return "QDMI_SESSION_PROPERTY_DEVICES";
157
+ }
158
+ return "QDMI_SESSION_PROPERTY_UNKNOWN";
159
+ }
160
+
161
+ /// Throws an exception corresponding to the given QDMI_STATUS code.
162
+ [[noreturn]] auto throwError(int result, const std::string& msg) -> void;
163
+
164
+ /// Throws an exception if the result indicates an error.
165
+ inline auto throwIfError(int result, const std::string& msg) -> void {
166
+ switch (result) {
167
+ case QDMI_SUCCESS:
168
+ break;
169
+ case QDMI_WARN_GENERAL:
170
+ std::cerr << "Warning: " << msg << "\n";
171
+ break;
172
+ default:
173
+ throwError(result, msg);
174
+ }
175
+ }
176
+
177
+ /**
178
+ * @brief Class representing the FoMaC library.
179
+ * @details This class provides methods to query available devices and
180
+ * manage the QDMI session.
181
+ * @note This class is a singleton.
182
+ * @see QDMI_Session
183
+ */
184
+ class FoMaC {
185
+ /**
186
+ * @brief Private token class.
187
+ * @details Only the FoMaC class can create instances of this class.
188
+ */
189
+ class Token {
190
+ public:
191
+ Token() = default;
192
+ };
193
+
194
+ public:
195
+ /**
196
+ * @brief Class representing a quantum device.
197
+ * @details This class provides methods to query properties of the device,
198
+ * its sites, and its operations.
199
+ * @see QDMI_Device
200
+ */
201
+ class Device {
202
+ /**
203
+ * @brief Private token class.
204
+ * @details Only the Device class can create instances of this class.
205
+ */
206
+ class Token {
207
+ public:
208
+ Token() = default;
209
+ };
210
+
211
+ public:
212
+ /**
213
+ * @brief Class representing a site (qubit) on the device.
214
+ * @details This class provides methods to query properties of the site.
215
+ * @see QDMI_Site
216
+ */
217
+ class Site {
218
+ /// @brief The associated QDMI_Device object.
219
+ QDMI_Device device_;
220
+ /// @brief The underlying QDMI_Site object.
221
+ QDMI_Site site_;
222
+
223
+ template <maybe_optional_value_or_string T>
224
+ [[nodiscard]] auto queryProperty(QDMI_Site_Property prop) const -> T {
225
+ if constexpr (string_or_optional_string<T>) {
226
+ size_t size = 0;
227
+ const auto result = QDMI_device_query_site_property(
228
+ device_, site_, prop, 0, nullptr, &size);
229
+ if constexpr (is_optional<T>) {
230
+ if (result == QDMI_ERROR_NOTSUPPORTED) {
231
+ return std::nullopt;
232
+ }
233
+ }
234
+ throwIfError(result, "Querying " + toString(prop));
235
+ std::string value(size - 1, '\0');
236
+ throwIfError(QDMI_device_query_site_property(
237
+ device_, site_, prop, size, value.data(), nullptr),
238
+ "Querying " + toString(prop));
239
+ return value;
240
+ } else {
241
+ remove_optional_t<T> value{};
242
+ const auto result = QDMI_device_query_site_property(
243
+ device_, site_, prop, sizeof(remove_optional_t<T>), &value,
244
+ nullptr);
245
+ if constexpr (is_optional<T>) {
246
+ if (result == QDMI_ERROR_NOTSUPPORTED) {
247
+ return std::nullopt;
248
+ }
249
+ }
250
+ throwIfError(result, "Querying " + toString(prop));
251
+ return value;
252
+ }
253
+ }
254
+
255
+ public:
256
+ /**
257
+ * @brief Constructs a Site object from a QDMI_Site handle.
258
+ * @param device The associated QDMI_Device handle.
259
+ * @param site The QDMI_Site handle to wrap.
260
+ */
261
+ Site(Token /* unused */, QDMI_Device device, QDMI_Site site)
262
+ : device_(device), site_(site) {}
263
+ /// @returns the underlying QDMI_Site object.
264
+ [[nodiscard]] auto getQDMISite() const -> QDMI_Site { return site_; }
265
+ // NOLINTNEXTLINE(google-explicit-constructor)
266
+ operator QDMI_Site() const { return site_; }
267
+ auto operator<=>(const Site&) const = default;
268
+ /// @see QDMI_SITE_PROPERTY_INDEX
269
+ [[nodiscard]] auto getIndex() const -> size_t;
270
+ /// @see QDMI_SITE_PROPERTY_T1
271
+ [[nodiscard]] auto getT1() const -> std::optional<uint64_t>;
272
+ /// @see QDMI_SITE_PROPERTY_T2
273
+ [[nodiscard]] auto getT2() const -> std::optional<uint64_t>;
274
+ /// @see QDMI_SITE_PROPERTY_NAME
275
+ [[nodiscard]] auto getName() const -> std::optional<std::string>;
276
+ /// @see QDMI_SITE_PROPERTY_XCOORDINATE
277
+ [[nodiscard]] auto getXCoordinate() const -> std::optional<int64_t>;
278
+ /// @see QDMI_SITE_PROPERTY_YCOORDINATE
279
+ [[nodiscard]] auto getYCoordinate() const -> std::optional<int64_t>;
280
+ /// @see QDMI_SITE_PROPERTY_ZCOORDINATE
281
+ [[nodiscard]] auto getZCoordinate() const -> std::optional<int64_t>;
282
+ /// @see QDMI_SITE_PROPERTY_ISZONE
283
+ [[nodiscard]] auto isZone() const -> std::optional<bool>;
284
+ /// @see QDMI_SITE_PROPERTY_XEXTENT
285
+ [[nodiscard]] auto getXExtent() const -> std::optional<uint64_t>;
286
+ /// @see QDMI_SITE_PROPERTY_YEXTENT
287
+ [[nodiscard]] auto getYExtent() const -> std::optional<uint64_t>;
288
+ /// @see QDMI_SITE_PROPERTY_ZEXTENT
289
+ [[nodiscard]] auto getZExtent() const -> std::optional<uint64_t>;
290
+ /// @see QDMI_SITE_PROPERTY_MODULEINDEX
291
+ [[nodiscard]] auto getModuleIndex() const -> std::optional<uint64_t>;
292
+ /// @see QDMI_SITE_PROPERTY_SUBMODULEINDEX
293
+ [[nodiscard]] auto getSubmoduleIndex() const -> std::optional<uint64_t>;
294
+ };
295
+ /**
296
+ * @brief Class representing an operation (gate) supported by the device.
297
+ * @details This class provides methods to query properties of the
298
+ * operation.
299
+ * @see QDMI_Operation
300
+ */
301
+ class Operation {
302
+ /// @brief The associated QDMI_Device object.
303
+ QDMI_Device device_;
304
+ /// @brief The underlying QDMI_Operation object.
305
+ QDMI_Operation operation_;
306
+
307
+ template <maybe_optional_value_or_string_or_vector T>
308
+ [[nodiscard]] auto queryProperty(QDMI_Operation_Property prop,
309
+ const std::vector<Site>& sites,
310
+ const std::vector<double>& params) const
311
+ -> T {
312
+ std::vector<QDMI_Site> qdmiSites;
313
+ qdmiSites.reserve(sites.size());
314
+ std::ranges::transform(
315
+ sites, std::back_inserter(qdmiSites),
316
+ [](const Site& site) -> QDMI_Site { return site; });
317
+ if constexpr (string_or_optional_string<T>) {
318
+ size_t size = 0;
319
+ const auto result = QDMI_device_query_operation_property(
320
+ device_, operation_, sites.size(), qdmiSites.data(),
321
+ params.size(), params.data(), prop, 0, nullptr, &size);
322
+ if constexpr (is_optional<T>) {
323
+ if (result == QDMI_ERROR_NOTSUPPORTED) {
324
+ return std::nullopt;
325
+ }
326
+ }
327
+ throwIfError(result, "Querying " + toString(prop));
328
+ std::string value(size - 1, '\0');
329
+ throwIfError(QDMI_device_query_operation_property(
330
+ device_, operation_, sites.size(), qdmiSites.data(),
331
+ params.size(), params.data(), prop, size,
332
+ value.data(), nullptr),
333
+ "Querying " + toString(prop));
334
+ return value;
335
+ } else if constexpr (maybe_optional_size_constructible_contiguous_range<
336
+ T>) {
337
+ size_t size = 0;
338
+ const auto result = QDMI_device_query_operation_property(
339
+ device_, operation_, sites.size(), qdmiSites.data(),
340
+ params.size(), params.data(), prop, 0, nullptr, &size);
341
+ if constexpr (is_optional<T>) {
342
+ if (result == QDMI_ERROR_NOTSUPPORTED) {
343
+ return std::nullopt;
344
+ }
345
+ }
346
+ throwIfError(result, "Querying " + toString(prop));
347
+ remove_optional_t<T> value(
348
+ size / sizeof(typename remove_optional_t<T>::value_type));
349
+ throwIfError(QDMI_device_query_operation_property(
350
+ device_, operation_, sites.size(), qdmiSites.data(),
351
+ params.size(), params.data(), prop, size,
352
+ value.data(), nullptr),
353
+ "Querying " + toString(prop));
354
+ return value;
355
+ } else {
356
+ remove_optional_t<T> value{};
357
+ const auto result = QDMI_device_query_operation_property(
358
+ device_, operation_, sites.size(), qdmiSites.data(),
359
+ params.size(), params.data(), prop, sizeof(remove_optional_t<T>),
360
+ &value, nullptr);
361
+ if constexpr (is_optional<T>) {
362
+ if (result == QDMI_ERROR_NOTSUPPORTED) {
363
+ return std::nullopt;
364
+ }
365
+ }
366
+ throwIfError(result, "Querying " + toString(prop));
367
+ return value;
368
+ }
369
+ }
370
+
371
+ public:
372
+ /**
373
+ * @brief Constructs an Operation object from a QDMI_Operation handle.
374
+ * @param device The associated QDMI_Device handle.
375
+ * @param operation The QDMI_Operation handle to wrap.
376
+ */
377
+ Operation(Token /* unused */, QDMI_Device device,
378
+ QDMI_Operation operation)
379
+ : device_(device), operation_(operation) {}
380
+ /// @returns the underlying QDMI_Operation object.
381
+ [[nodiscard]] auto getQDMIOperation() const -> QDMI_Operation {
382
+ return operation_;
383
+ }
384
+ // NOLINTNEXTLINE(google-explicit-constructor)
385
+ operator QDMI_Operation() const { return operation_; }
386
+ auto operator<=>(const Operation&) const = default;
387
+ /// @see QDMI_OPERATION_PROPERTY_NAME
388
+ [[nodiscard]] auto getName(const std::vector<Site>& sites = {},
389
+ const std::vector<double>& params = {}) const
390
+ -> std::string;
391
+ /// @see QDMI_OPERATION_PROPERTY_QUBITSNUM
392
+ [[nodiscard]] auto
393
+ getQubitsNum(const std::vector<Site>& sites = {},
394
+ const std::vector<double>& params = {}) const
395
+ -> std::optional<size_t>;
396
+ /// @see QDMI_OPERATION_PROPERTY_PARAMETERSNUM
397
+ [[nodiscard]] auto
398
+ getParametersNum(const std::vector<Site>& sites = {},
399
+ const std::vector<double>& params = {}) const -> size_t;
400
+ /// @see QDMI_OPERATION_PROPERTY_DURATION
401
+ [[nodiscard]] auto
402
+ getDuration(const std::vector<Site>& sites = {},
403
+ const std::vector<double>& params = {}) const
404
+ -> std::optional<uint64_t>;
405
+ /// @see QDMI_OPERATION_PROPERTY_FIDELITY
406
+ [[nodiscard]] auto
407
+ getFidelity(const std::vector<Site>& sites = {},
408
+ const std::vector<double>& params = {}) const
409
+ -> std::optional<double>;
410
+ /// @see QDMI_OPERATION_PROPERTY_INTERACTIONRADIUS
411
+ [[nodiscard]] auto
412
+ getInteractionRadius(const std::vector<Site>& sites = {},
413
+ const std::vector<double>& params = {}) const
414
+ -> std::optional<uint64_t>;
415
+ /// @see QDMI_OPERATION_PROPERTY_BLOCKINGRADIUS
416
+ [[nodiscard]] auto
417
+ getBlockingRadius(const std::vector<Site>& sites = {},
418
+ const std::vector<double>& params = {}) const
419
+ -> std::optional<uint64_t>;
420
+ /// @see QDMI_OPERATION_PROPERTY_IDLINGFIDELITY
421
+ [[nodiscard]] auto
422
+ getIdlingFidelity(const std::vector<Site>& sites = {},
423
+ const std::vector<double>& params = {}) const
424
+ -> std::optional<double>;
425
+ /// @see QDMI_OPERATION_PROPERTY_ISZONED
426
+ [[nodiscard]] auto isZoned(const std::vector<Site>& sites = {},
427
+ const std::vector<double>& params = {}) const
428
+ -> std::optional<bool>;
429
+ /// @see QDMI_OPERATION_PROPERTY_SITES
430
+ [[nodiscard]] auto getSites(const std::vector<Site>& sites = {},
431
+ const std::vector<double>& params = {}) const
432
+ -> std::optional<std::vector<Site>>;
433
+ /// @see QDMI_OPERATION_PROPERTY_MEANSHUTTLINGSPEED
434
+ [[nodiscard]] auto
435
+ getMeanShuttlingSpeed(const std::vector<Site>& sites = {},
436
+ const std::vector<double>& params = {}) const
437
+ -> std::optional<uint64_t>;
438
+ };
439
+
440
+ private:
441
+ /// @brief The underlying QDMI_Device object.
442
+ QDMI_Device device_;
443
+
444
+ template <maybe_optional_value_or_string_or_vector T>
445
+ [[nodiscard]] auto queryProperty(QDMI_Device_Property prop) const -> T {
446
+ if constexpr (string_or_optional_string<T>) {
447
+ size_t size = 0;
448
+ const auto result =
449
+ QDMI_device_query_device_property(device_, prop, 0, nullptr, &size);
450
+ if constexpr (is_optional<T>) {
451
+ if (result == QDMI_ERROR_NOTSUPPORTED) {
452
+ return std::nullopt;
453
+ }
454
+ }
455
+ throwIfError(result, "Querying " + toString(prop));
456
+ std::string value(size - 1, '\0');
457
+ throwIfError(QDMI_device_query_device_property(device_, prop, size,
458
+ value.data(), nullptr),
459
+ "Querying " + toString(prop));
460
+ return value;
461
+ } else if constexpr (maybe_optional_size_constructible_contiguous_range<
462
+ T>) {
463
+ size_t size = 0;
464
+ const auto result =
465
+ QDMI_device_query_device_property(device_, prop, 0, nullptr, &size);
466
+ if constexpr (is_optional<T>) {
467
+ if (result == QDMI_ERROR_NOTSUPPORTED) {
468
+ return std::nullopt;
469
+ }
470
+ }
471
+ throwIfError(result, "Querying " + toString(prop));
472
+ remove_optional_t<T> value(
473
+ size / sizeof(typename remove_optional_t<T>::value_type));
474
+ throwIfError(QDMI_device_query_device_property(device_, prop, size,
475
+ value.data(), nullptr),
476
+ "Querying " + toString(prop));
477
+ return value;
478
+ } else {
479
+ remove_optional_t<T> value{};
480
+ const auto result = QDMI_device_query_device_property(
481
+ device_, prop, sizeof(remove_optional_t<T>), &value, nullptr);
482
+ if constexpr (is_optional<T>) {
483
+ if (result == QDMI_ERROR_NOTSUPPORTED) {
484
+ return std::nullopt;
485
+ }
486
+ }
487
+ throwIfError(result, "Querying " + toString(prop));
488
+ return value;
489
+ }
490
+ }
491
+
492
+ public:
493
+ /**
494
+ * @brief Constructs a Device object from a QDMI_Device handle.
495
+ * @param device The QDMI_Device handle to wrap.
496
+ */
497
+ Device(FoMaC::Token /* unused */, QDMI_Device device) : device_(device) {}
498
+ /// @returns the underlying QDMI_Device object.
499
+ [[nodiscard]] auto getQDMIDevice() const -> QDMI_Device { return device_; }
500
+ // NOLINTNEXTLINE(google-explicit-constructor)
501
+ operator QDMI_Device() const { return device_; }
502
+ auto operator<=>(const Device&) const = default;
503
+ /// @see QDMI_DEVICE_PROPERTY_NAME
504
+ [[nodiscard]] auto getName() const -> std::string;
505
+ /// @see QDMI_DEVICE_PROPERTY_VERSION
506
+ [[nodiscard]] auto getVersion() const -> std::string;
507
+ /// @see QDMI_DEVICE_PROPERTY_STATUS
508
+ [[nodiscard]] auto getStatus() const -> QDMI_Device_Status;
509
+ /// @see QDMI_DEVICE_PROPERTY_LIBRARYVERSION
510
+ [[nodiscard]] auto getLibraryVersion() const -> std::string;
511
+ /// @see QDMI_DEVICE_PROPERTY_QUBITSNUM
512
+ [[nodiscard]] auto getQubitsNum() const -> size_t;
513
+ /// @see QDMI_DEVICE_PROPERTY_SITES
514
+ [[nodiscard]] auto getSites() const -> std::vector<Site>;
515
+ /// @see QDMI_DEVICE_PROPERTY_OPERATIONS
516
+ [[nodiscard]] auto getOperations() const -> std::vector<Operation>;
517
+ /// @see QDMI_DEVICE_PROPERTY_COUPLINGMAP
518
+ [[nodiscard]] auto getCouplingMap() const
519
+ -> std::optional<std::vector<std::pair<Site, Site>>>;
520
+ /// @see QDMI_DEVICE_PROPERTY_NEEDSCALIBRATION
521
+ [[nodiscard]] auto getNeedsCalibration() const -> std::optional<size_t>;
522
+ /// @see QDMI_DEVICE_PROPERTY_LENGTHUNIT
523
+ [[nodiscard]] auto getLengthUnit() const -> std::optional<std::string>;
524
+ /// @see QDMI_DEVICE_PROPERTY_LENGTHSCALEFACTOR
525
+ [[nodiscard]] auto getLengthScaleFactor() const -> std::optional<double>;
526
+ /// @see QDMI_DEVICE_PROPERTY_DURATIONUNIT
527
+ [[nodiscard]] auto getDurationUnit() const -> std::optional<std::string>;
528
+ /// @see QDMI_DEVICE_PROPERTY_DURATIONSCALEFACTOR
529
+ [[nodiscard]] auto getDurationScaleFactor() const -> std::optional<double>;
530
+ /// @see QDMI_DEVICE_PROPERTY_MINATOMDISTANCE
531
+ [[nodiscard]] auto getMinAtomDistance() const -> std::optional<uint64_t>;
532
+ };
533
+
534
+ private:
535
+ QDMI_Session session_ = nullptr;
536
+
537
+ FoMaC();
538
+ static auto get() -> FoMaC& {
539
+ static FoMaC instance;
540
+ return instance;
541
+ }
542
+ template <size_constructible_contiguous_range T>
543
+ [[nodiscard]] auto queryProperty(const QDMI_Session_Property prop) const
544
+ -> T {
545
+ size_t size = 0;
546
+ throwIfError(
547
+ QDMI_session_query_session_property(session_, prop, 0, nullptr, &size),
548
+ "Querying " + toString(prop));
549
+ remove_optional_t<T> value(
550
+ size / sizeof(typename remove_optional_t<T>::value_type));
551
+ throwIfError(QDMI_session_query_session_property(session_, prop, size,
552
+ value.data(), nullptr),
553
+ "Querying " + toString(prop));
554
+ return value;
555
+ }
556
+
557
+ public:
558
+ virtual ~FoMaC();
559
+ // Delete copy constructors and assignment operators to prevent copying the
560
+ // singleton instance.
561
+ FoMaC(const FoMaC&) = delete;
562
+ FoMaC& operator=(const FoMaC&) = delete;
563
+ FoMaC(FoMaC&&) = default;
564
+ FoMaC& operator=(FoMaC&&) = default;
565
+ /// @see QDMI_SESSION_PROPERTY_DEVICES
566
+ [[nodiscard]] static auto getDevices() -> std::vector<Device>;
567
+ };
568
+ } // namespace fomac
@@ -13,12 +13,13 @@
13
13
  #include "Definitions.hpp"
14
14
  #include "Permutation.hpp"
15
15
  #include "Register.hpp"
16
- #include "operations/ClassicControlledOperation.hpp"
17
16
  #include "operations/CompoundOperation.hpp"
18
17
  #include "operations/Control.hpp"
19
18
  #include "operations/Expression.hpp"
19
+ #include "operations/IfElseOperation.hpp"
20
20
  #include "operations/OpType.hpp"
21
21
  #include "operations/Operation.hpp"
22
+ #include "operations/StandardOperation.hpp"
22
23
 
23
24
  #include <cstddef>
24
25
  #include <cstdint>
@@ -333,33 +334,33 @@ public:
333
334
  void barrier(Qubit target);
334
335
  void barrier(const Targets& targets);
335
336
 
336
- void classicControlled(OpType op, Qubit target,
337
- const ClassicalRegister& controlRegister,
338
- std::uint64_t expectedValue = 1U,
339
- ComparisonKind cmp = Eq,
340
- const std::vector<fp>& params = {});
341
- void classicControlled(OpType op, Qubit target, Control control,
342
- const ClassicalRegister& controlRegister,
343
- std::uint64_t expectedValue = 1U,
344
- ComparisonKind cmp = Eq,
345
- const std::vector<fp>& params = {});
346
- void classicControlled(OpType op, Qubit target, const Controls& controls,
347
- const ClassicalRegister& controlRegister,
348
- std::uint64_t expectedValue = 1U,
349
- ComparisonKind cmp = Eq,
350
- const std::vector<fp>& params = {});
351
- void classicControlled(OpType op, Qubit target, Bit cBit,
352
- std::uint64_t expectedValue = 1U,
353
- ComparisonKind cmp = Eq,
354
- const std::vector<fp>& params = {});
355
- void classicControlled(OpType op, Qubit target, Control control, Bit cBit,
356
- std::uint64_t expectedValue = 1U,
357
- ComparisonKind cmp = Eq,
358
- const std::vector<fp>& params = {});
359
- void classicControlled(OpType op, Qubit target, const Controls& controls,
360
- Bit cBit, std::uint64_t expectedValue = 1U,
361
- ComparisonKind cmp = Eq,
362
- const std::vector<fp>& params = {});
337
+ void ifElse(std::unique_ptr<Operation>&& thenOp,
338
+ std::unique_ptr<Operation>&& elseOp,
339
+ const ClassicalRegister& controlRegister,
340
+ std::uint64_t expectedValue = 1U, ComparisonKind cmp = Eq);
341
+ void ifElse(std::unique_ptr<Operation>&& thenOp,
342
+ std::unique_ptr<Operation>&& elseOp, Bit controlBit,
343
+ bool expectedValue = true, ComparisonKind cmp = Eq);
344
+
345
+ void if_(OpType op, Qubit target, const ClassicalRegister& controlRegister,
346
+ std::uint64_t expectedValue = 1U, ComparisonKind cmp = Eq,
347
+ const std::vector<fp>& params = {});
348
+ void if_(OpType op, Qubit target, Control control,
349
+ const ClassicalRegister& controlRegister,
350
+ std::uint64_t expectedValue = 1U, ComparisonKind cmp = Eq,
351
+ const std::vector<fp>& params = {});
352
+ void if_(OpType op, Qubit target, const Controls& controls,
353
+ const ClassicalRegister& controlRegister,
354
+ std::uint64_t expectedValue = 1U, ComparisonKind cmp = Eq,
355
+ const std::vector<fp>& params = {});
356
+ void if_(OpType op, Qubit target, Bit controlBit, bool expectedValue = true,
357
+ ComparisonKind cmp = Eq, const std::vector<fp>& params = {});
358
+ void if_(OpType op, Qubit target, Control control, Bit controlBit,
359
+ bool expectedValue = true, ComparisonKind cmp = Eq,
360
+ const std::vector<fp>& params = {});
361
+ void if_(OpType op, Qubit target, const Controls& controls, Bit controlBit,
362
+ bool expectedValue = true, ComparisonKind cmp = Eq,
363
+ const std::vector<fp>& params = {});
363
364
 
364
365
  /// strip away qubits with no operations applied to them and which do not pop
365
366
  /// up in the output permutation \param force if true, also strip away idle
@@ -60,6 +60,8 @@ public:
60
60
 
61
61
  [[nodiscard]] bool isGlobal(size_t nQubits) const noexcept override;
62
62
 
63
+ [[nodiscard]] bool isClifford() const override;
64
+
63
65
  void addControl(Control c) override;
64
66
 
65
67
  void clearControls() override;