mqt-core 3.2.1__cp312-cp312-win_arm64.whl → 3.3.1__cp312-cp312-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 (242) 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.cp312-win_arm64.pyd +0 -0
  17. mqt/core/dd.pyi +5 -7
  18. mqt/core/fomac.cp312-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/dd/CachedEdge.hpp +7 -0
  22. mqt/core/include/mqt-core/dd/Operations.hpp +12 -14
  23. mqt/core/include/mqt-core/fomac/FoMaC.hpp +568 -0
  24. mqt/core/include/mqt-core/ir/QuantumComputation.hpp +29 -28
  25. mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +2 -0
  26. mqt/core/include/mqt-core/ir/operations/IfElseOperation.hpp +169 -0
  27. mqt/core/include/mqt-core/ir/operations/OpType.hpp +3 -0
  28. mqt/core/include/mqt-core/ir/operations/OpType.inc +2 -2
  29. mqt/core/include/mqt-core/ir/operations/Operation.hpp +3 -1
  30. mqt/core/include/mqt-core/ir/operations/StandardOperation.hpp +2 -0
  31. mqt/core/include/mqt-core/mqt_na_qdmi/device.h +602 -0
  32. mqt/core/include/mqt-core/mqt_na_qdmi/types.h +78 -0
  33. mqt/core/include/mqt-core/na/device/Device.hpp +410 -0
  34. mqt/core/include/mqt-core/na/device/DeviceMemberInitializers.hpp +724 -0
  35. mqt/core/include/mqt-core/na/device/Generator.hpp +447 -0
  36. mqt/core/include/mqt-core/na/fomac/Device.hpp +169 -0
  37. mqt/core/include/mqt-core/qdmi/Driver.hpp +431 -0
  38. mqt/core/include/nlohmann/adl_serializer.hpp +55 -0
  39. mqt/core/include/nlohmann/byte_container_with_subtype.hpp +103 -0
  40. mqt/core/include/nlohmann/detail/abi_macros.hpp +111 -0
  41. mqt/core/include/nlohmann/detail/conversions/from_json.hpp +577 -0
  42. mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +1118 -0
  43. mqt/core/include/nlohmann/detail/conversions/to_json.hpp +479 -0
  44. mqt/core/include/nlohmann/detail/exceptions.hpp +291 -0
  45. mqt/core/include/nlohmann/detail/hash.hpp +129 -0
  46. mqt/core/include/nlohmann/detail/input/binary_reader.hpp +3068 -0
  47. mqt/core/include/nlohmann/detail/input/input_adapters.hpp +549 -0
  48. mqt/core/include/nlohmann/detail/input/json_sax.hpp +986 -0
  49. mqt/core/include/nlohmann/detail/input/lexer.hpp +1643 -0
  50. mqt/core/include/nlohmann/detail/input/parser.hpp +519 -0
  51. mqt/core/include/nlohmann/detail/input/position_t.hpp +37 -0
  52. mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +35 -0
  53. mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +760 -0
  54. mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +235 -0
  55. mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +61 -0
  56. mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +130 -0
  57. mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +132 -0
  58. mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +39 -0
  59. mqt/core/include/nlohmann/detail/json_pointer.hpp +988 -0
  60. mqt/core/include/nlohmann/detail/json_ref.hpp +78 -0
  61. mqt/core/include/nlohmann/detail/macro_scope.hpp +595 -0
  62. mqt/core/include/nlohmann/detail/macro_unscope.hpp +46 -0
  63. mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +17 -0
  64. mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +17 -0
  65. mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +171 -0
  66. mqt/core/include/nlohmann/detail/meta/detected.hpp +70 -0
  67. mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +21 -0
  68. mqt/core/include/nlohmann/detail/meta/is_sax.hpp +159 -0
  69. mqt/core/include/nlohmann/detail/meta/std_fs.hpp +29 -0
  70. mqt/core/include/nlohmann/detail/meta/type_traits.hpp +795 -0
  71. mqt/core/include/nlohmann/detail/meta/void_t.hpp +24 -0
  72. mqt/core/include/nlohmann/detail/output/binary_writer.hpp +1850 -0
  73. mqt/core/include/nlohmann/detail/output/output_adapters.hpp +147 -0
  74. mqt/core/include/nlohmann/detail/output/serializer.hpp +988 -0
  75. mqt/core/include/nlohmann/detail/string_concat.hpp +146 -0
  76. mqt/core/include/nlohmann/detail/string_escape.hpp +72 -0
  77. mqt/core/include/nlohmann/detail/string_utils.hpp +37 -0
  78. mqt/core/include/nlohmann/detail/value_t.hpp +118 -0
  79. mqt/core/include/nlohmann/json.hpp +5306 -0
  80. mqt/core/include/nlohmann/json_fwd.hpp +75 -0
  81. mqt/core/include/nlohmann/ordered_map.hpp +359 -0
  82. mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +2045 -0
  83. mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +158 -0
  84. mqt/core/include/qdmi/qdmi/client.h +990 -0
  85. mqt/core/include/qdmi/qdmi/constants.h +1139 -0
  86. mqt/core/include/qdmi/qdmi/device.h +602 -0
  87. mqt/core/include/qdmi/qdmi/types.h +78 -0
  88. mqt/core/include/spdlog/async.h +99 -0
  89. mqt/core/include/spdlog/async_logger-inl.h +84 -0
  90. mqt/core/include/spdlog/async_logger.h +74 -0
  91. mqt/core/include/spdlog/cfg/argv.h +40 -0
  92. mqt/core/include/spdlog/cfg/env.h +36 -0
  93. mqt/core/include/spdlog/cfg/helpers-inl.h +107 -0
  94. mqt/core/include/spdlog/cfg/helpers.h +29 -0
  95. mqt/core/include/spdlog/common-inl.h +68 -0
  96. mqt/core/include/spdlog/common.h +406 -0
  97. mqt/core/include/spdlog/details/backtracer-inl.h +63 -0
  98. mqt/core/include/spdlog/details/backtracer.h +45 -0
  99. mqt/core/include/spdlog/details/circular_q.h +115 -0
  100. mqt/core/include/spdlog/details/console_globals.h +28 -0
  101. mqt/core/include/spdlog/details/file_helper-inl.h +153 -0
  102. mqt/core/include/spdlog/details/file_helper.h +61 -0
  103. mqt/core/include/spdlog/details/fmt_helper.h +141 -0
  104. mqt/core/include/spdlog/details/log_msg-inl.h +44 -0
  105. mqt/core/include/spdlog/details/log_msg.h +40 -0
  106. mqt/core/include/spdlog/details/log_msg_buffer-inl.h +54 -0
  107. mqt/core/include/spdlog/details/log_msg_buffer.h +32 -0
  108. mqt/core/include/spdlog/details/mpmc_blocking_q.h +177 -0
  109. mqt/core/include/spdlog/details/null_mutex.h +35 -0
  110. mqt/core/include/spdlog/details/os-inl.h +606 -0
  111. mqt/core/include/spdlog/details/os.h +127 -0
  112. mqt/core/include/spdlog/details/periodic_worker-inl.h +26 -0
  113. mqt/core/include/spdlog/details/periodic_worker.h +58 -0
  114. mqt/core/include/spdlog/details/registry-inl.h +270 -0
  115. mqt/core/include/spdlog/details/registry.h +131 -0
  116. mqt/core/include/spdlog/details/synchronous_factory.h +22 -0
  117. mqt/core/include/spdlog/details/tcp_client-windows.h +135 -0
  118. mqt/core/include/spdlog/details/tcp_client.h +127 -0
  119. mqt/core/include/spdlog/details/thread_pool-inl.h +126 -0
  120. mqt/core/include/spdlog/details/thread_pool.h +117 -0
  121. mqt/core/include/spdlog/details/udp_client-windows.h +98 -0
  122. mqt/core/include/spdlog/details/udp_client.h +81 -0
  123. mqt/core/include/spdlog/details/windows_include.h +11 -0
  124. mqt/core/include/spdlog/fmt/bin_to_hex.h +224 -0
  125. mqt/core/include/spdlog/fmt/bundled/args.h +220 -0
  126. mqt/core/include/spdlog/fmt/bundled/base.h +2989 -0
  127. mqt/core/include/spdlog/fmt/bundled/chrono.h +2330 -0
  128. mqt/core/include/spdlog/fmt/bundled/color.h +637 -0
  129. mqt/core/include/spdlog/fmt/bundled/compile.h +539 -0
  130. mqt/core/include/spdlog/fmt/bundled/core.h +5 -0
  131. mqt/core/include/spdlog/fmt/bundled/fmt.license.rst +27 -0
  132. mqt/core/include/spdlog/fmt/bundled/format-inl.h +1948 -0
  133. mqt/core/include/spdlog/fmt/bundled/format.h +4244 -0
  134. mqt/core/include/spdlog/fmt/bundled/os.h +427 -0
  135. mqt/core/include/spdlog/fmt/bundled/ostream.h +167 -0
  136. mqt/core/include/spdlog/fmt/bundled/printf.h +633 -0
  137. mqt/core/include/spdlog/fmt/bundled/ranges.h +850 -0
  138. mqt/core/include/spdlog/fmt/bundled/std.h +728 -0
  139. mqt/core/include/spdlog/fmt/bundled/xchar.h +369 -0
  140. mqt/core/include/spdlog/fmt/chrono.h +23 -0
  141. mqt/core/include/spdlog/fmt/compile.h +23 -0
  142. mqt/core/include/spdlog/fmt/fmt.h +30 -0
  143. mqt/core/include/spdlog/fmt/ostr.h +23 -0
  144. mqt/core/include/spdlog/fmt/ranges.h +23 -0
  145. mqt/core/include/spdlog/fmt/std.h +24 -0
  146. mqt/core/include/spdlog/fmt/xchar.h +23 -0
  147. mqt/core/include/spdlog/formatter.h +17 -0
  148. mqt/core/include/spdlog/fwd.h +18 -0
  149. mqt/core/include/spdlog/logger-inl.h +198 -0
  150. mqt/core/include/spdlog/logger.h +379 -0
  151. mqt/core/include/spdlog/mdc.h +52 -0
  152. mqt/core/include/spdlog/pattern_formatter-inl.h +1340 -0
  153. mqt/core/include/spdlog/pattern_formatter.h +118 -0
  154. mqt/core/include/spdlog/sinks/android_sink.h +137 -0
  155. mqt/core/include/spdlog/sinks/ansicolor_sink-inl.h +142 -0
  156. mqt/core/include/spdlog/sinks/ansicolor_sink.h +116 -0
  157. mqt/core/include/spdlog/sinks/base_sink-inl.h +59 -0
  158. mqt/core/include/spdlog/sinks/base_sink.h +51 -0
  159. mqt/core/include/spdlog/sinks/basic_file_sink-inl.h +48 -0
  160. mqt/core/include/spdlog/sinks/basic_file_sink.h +66 -0
  161. mqt/core/include/spdlog/sinks/callback_sink.h +56 -0
  162. mqt/core/include/spdlog/sinks/daily_file_sink.h +254 -0
  163. mqt/core/include/spdlog/sinks/dist_sink.h +81 -0
  164. mqt/core/include/spdlog/sinks/dup_filter_sink.h +91 -0
  165. mqt/core/include/spdlog/sinks/hourly_file_sink.h +193 -0
  166. mqt/core/include/spdlog/sinks/kafka_sink.h +119 -0
  167. mqt/core/include/spdlog/sinks/mongo_sink.h +108 -0
  168. mqt/core/include/spdlog/sinks/msvc_sink.h +68 -0
  169. mqt/core/include/spdlog/sinks/null_sink.h +41 -0
  170. mqt/core/include/spdlog/sinks/ostream_sink.h +43 -0
  171. mqt/core/include/spdlog/sinks/qt_sinks.h +304 -0
  172. mqt/core/include/spdlog/sinks/ringbuffer_sink.h +67 -0
  173. mqt/core/include/spdlog/sinks/rotating_file_sink-inl.h +179 -0
  174. mqt/core/include/spdlog/sinks/rotating_file_sink.h +93 -0
  175. mqt/core/include/spdlog/sinks/sink-inl.h +22 -0
  176. mqt/core/include/spdlog/sinks/sink.h +34 -0
  177. mqt/core/include/spdlog/sinks/stdout_color_sinks-inl.h +38 -0
  178. mqt/core/include/spdlog/sinks/stdout_color_sinks.h +49 -0
  179. mqt/core/include/spdlog/sinks/stdout_sinks-inl.h +127 -0
  180. mqt/core/include/spdlog/sinks/stdout_sinks.h +84 -0
  181. mqt/core/include/spdlog/sinks/syslog_sink.h +104 -0
  182. mqt/core/include/spdlog/sinks/systemd_sink.h +121 -0
  183. mqt/core/include/spdlog/sinks/tcp_sink.h +75 -0
  184. mqt/core/include/spdlog/sinks/udp_sink.h +69 -0
  185. mqt/core/include/spdlog/sinks/win_eventlog_sink.h +260 -0
  186. mqt/core/include/spdlog/sinks/wincolor_sink-inl.h +172 -0
  187. mqt/core/include/spdlog/sinks/wincolor_sink.h +82 -0
  188. mqt/core/include/spdlog/spdlog-inl.h +96 -0
  189. mqt/core/include/spdlog/spdlog.h +357 -0
  190. mqt/core/include/spdlog/stopwatch.h +66 -0
  191. mqt/core/include/spdlog/tweakme.h +148 -0
  192. mqt/core/include/spdlog/version.h +11 -0
  193. mqt/core/ir/__init__.pyi +83 -45
  194. mqt/core/ir/operations.pyi +40 -27
  195. mqt/core/ir.cp312-win_arm64.pyd +0 -0
  196. mqt/core/lib/mqt-core-circuit-optimizer.lib +0 -0
  197. mqt/core/lib/mqt-core-dd.lib +0 -0
  198. mqt/core/lib/mqt-core-fomac.lib +0 -0
  199. mqt/core/lib/mqt-core-ir.lib +0 -0
  200. mqt/core/lib/mqt-core-na-fomac.lib +0 -0
  201. mqt/core/lib/mqt-core-qasm.lib +0 -0
  202. mqt/core/lib/mqt-core-qdmi-driver.lib +0 -0
  203. mqt/core/lib/mqt-core-qdmi-na-device-gen.lib +0 -0
  204. mqt/core/lib/mqt-core-qdmi-na-device.lib +0 -0
  205. mqt/core/lib/pkgconfig/spdlog.pc +13 -0
  206. mqt/core/lib/spdlog.lib +0 -0
  207. mqt/core/na/__init__.py +12 -0
  208. mqt/core/na/fomac.cp312-win_arm64.pyd +0 -0
  209. mqt/core/na/fomac.pyi +117 -0
  210. mqt/core/nlohmann_json.natvis +278 -0
  211. mqt/core/plugins/qiskit/mqt_to_qiskit.py +75 -11
  212. mqt/core/plugins/qiskit/qiskit_to_mqt.py +108 -5
  213. mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +3 -0
  214. mqt/core/share/cmake/mqt-core/Cache.cmake +17 -16
  215. mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +6 -0
  216. mqt/core/share/cmake/mqt-core/StandardProjectSettings.cmake +1 -1
  217. mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +3 -3
  218. mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +3 -0
  219. mqt/core/share/cmake/mqt-core/mqt-core-targets-release.cmake +51 -0
  220. mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +124 -3
  221. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +15 -0
  222. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +20 -0
  223. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +110 -0
  224. mqt/core/share/cmake/qdmi/Cache.cmake +44 -0
  225. mqt/core/share/cmake/qdmi/PrefixHandling.cmake +78 -0
  226. mqt/core/share/cmake/qdmi/prefix_defs.txt +26 -0
  227. mqt/core/share/cmake/qdmi/qdmi-config-version.cmake +85 -0
  228. mqt/core/share/cmake/qdmi/qdmi-config.cmake +42 -0
  229. mqt/core/share/cmake/qdmi/qdmi-targets.cmake +129 -0
  230. mqt/core/share/cmake/spdlog/spdlogConfig.cmake +44 -0
  231. mqt/core/share/cmake/spdlog/spdlogConfigTargets-release.cmake +19 -0
  232. mqt/core/share/cmake/spdlog/spdlogConfigTargets.cmake +121 -0
  233. mqt/core/share/cmake/spdlog/spdlogConfigVersion.cmake +65 -0
  234. mqt/core/share/pkgconfig/nlohmann_json.pc +7 -0
  235. mqt_core-3.3.1.dist-info/DELVEWHEEL +2 -0
  236. {mqt_core-3.2.1.dist-info → mqt_core-3.3.1.dist-info}/METADATA +74 -33
  237. {mqt_core-3.2.1.dist-info → mqt_core-3.3.1.dist-info}/RECORD +240 -46
  238. {mqt_core-3.2.1.dist-info → mqt_core-3.3.1.dist-info}/WHEEL +1 -1
  239. mqt/core/include/mqt-core/ir/operations/ClassicControlledOperation.hpp +0 -156
  240. mqt_core-3.2.1.dist-info/DELVEWHEEL +0 -2
  241. {mqt_core-3.2.1.dist-info → mqt_core-3.3.1.dist-info}/entry_points.txt +0 -0
  242. {mqt_core-3.2.1.dist-info → mqt_core-3.3.1.dist-info}/licenses/LICENSE.md +0 -0
@@ -0,0 +1,278 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <!-- * * * * * * * * AUTO-GENERATED FILE * * * * * * * * -->
4
+ <!-- Edit ./tools/generate_natvis/nlohmann_json.natvis.j2 -->
5
+ <!-- * * * * * * * * AUTO-GENERATED FILE * * * * * * * * -->
6
+
7
+ <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
8
+ <!-- Namespace nlohmann -->
9
+ <Type Name="nlohmann::basic_json&lt;*&gt;">
10
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::null">null</DisplayString>
11
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
12
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
13
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
14
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
15
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
16
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
17
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
18
+ <DisplayString Condition="m_data.m_type == nlohmann::detail::value_t::discarded">discarded</DisplayString>
19
+ <Expand>
20
+ <ExpandedItem Condition="m_data.m_type == nlohmann::detail::value_t::object">
21
+ *(m_data.m_value.object),view(simple)
22
+ </ExpandedItem>
23
+ <ExpandedItem Condition="m_data.m_type == nlohmann::detail::value_t::array">
24
+ *(m_data.m_value.array),view(simple)
25
+ </ExpandedItem>
26
+ </Expand>
27
+ </Type>
28
+
29
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
30
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
31
+ <Type Name="std::pair&lt;*, nlohmann::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
32
+ <DisplayString>{second}</DisplayString>
33
+ <Expand>
34
+ <ExpandedItem>second</ExpandedItem>
35
+ </Expand>
36
+ </Type>
37
+
38
+ <!-- Namespace nlohmann::json_abi -->
39
+ <Type Name="nlohmann::json_abi::basic_json&lt;*&gt;">
40
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::null">null</DisplayString>
41
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
42
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
43
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
44
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
45
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
46
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
47
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
48
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::discarded">discarded</DisplayString>
49
+ <Expand>
50
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::object">
51
+ *(m_data.m_value.object),view(simple)
52
+ </ExpandedItem>
53
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi::detail::value_t::array">
54
+ *(m_data.m_value.array),view(simple)
55
+ </ExpandedItem>
56
+ </Expand>
57
+ </Type>
58
+
59
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
60
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
61
+ <Type Name="std::pair&lt;*, nlohmann::json_abi::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
62
+ <DisplayString>{second}</DisplayString>
63
+ <Expand>
64
+ <ExpandedItem>second</ExpandedItem>
65
+ </Expand>
66
+ </Type>
67
+
68
+ <!-- Namespace nlohmann::json_abi_v3_12_0 -->
69
+ <Type Name="nlohmann::json_abi_v3_12_0::basic_json&lt;*&gt;">
70
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::null">null</DisplayString>
71
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
72
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
73
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
74
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
75
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
76
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
77
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
78
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::discarded">discarded</DisplayString>
79
+ <Expand>
80
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::object">
81
+ *(m_data.m_value.object),view(simple)
82
+ </ExpandedItem>
83
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_v3_12_0::detail::value_t::array">
84
+ *(m_data.m_value.array),view(simple)
85
+ </ExpandedItem>
86
+ </Expand>
87
+ </Type>
88
+
89
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
90
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
91
+ <Type Name="std::pair&lt;*, nlohmann::json_abi_v3_12_0::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
92
+ <DisplayString>{second}</DisplayString>
93
+ <Expand>
94
+ <ExpandedItem>second</ExpandedItem>
95
+ </Expand>
96
+ </Type>
97
+
98
+ <!-- Namespace nlohmann::json_abi_diag -->
99
+ <Type Name="nlohmann::json_abi_diag::basic_json&lt;*&gt;">
100
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::null">null</DisplayString>
101
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
102
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
103
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
104
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
105
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
106
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
107
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
108
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::discarded">discarded</DisplayString>
109
+ <Expand>
110
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::object">
111
+ *(m_data.m_value.object),view(simple)
112
+ </ExpandedItem>
113
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_diag::detail::value_t::array">
114
+ *(m_data.m_value.array),view(simple)
115
+ </ExpandedItem>
116
+ </Expand>
117
+ </Type>
118
+
119
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
120
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
121
+ <Type Name="std::pair&lt;*, nlohmann::json_abi_diag::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
122
+ <DisplayString>{second}</DisplayString>
123
+ <Expand>
124
+ <ExpandedItem>second</ExpandedItem>
125
+ </Expand>
126
+ </Type>
127
+
128
+ <!-- Namespace nlohmann::json_abi_diag_v3_12_0 -->
129
+ <Type Name="nlohmann::json_abi_diag_v3_12_0::basic_json&lt;*&gt;">
130
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::null">null</DisplayString>
131
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
132
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
133
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
134
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
135
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
136
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
137
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
138
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::discarded">discarded</DisplayString>
139
+ <Expand>
140
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::object">
141
+ *(m_data.m_value.object),view(simple)
142
+ </ExpandedItem>
143
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_diag_v3_12_0::detail::value_t::array">
144
+ *(m_data.m_value.array),view(simple)
145
+ </ExpandedItem>
146
+ </Expand>
147
+ </Type>
148
+
149
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
150
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
151
+ <Type Name="std::pair&lt;*, nlohmann::json_abi_diag_v3_12_0::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
152
+ <DisplayString>{second}</DisplayString>
153
+ <Expand>
154
+ <ExpandedItem>second</ExpandedItem>
155
+ </Expand>
156
+ </Type>
157
+
158
+ <!-- Namespace nlohmann::json_abi_ldvcmp -->
159
+ <Type Name="nlohmann::json_abi_ldvcmp::basic_json&lt;*&gt;">
160
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::null">null</DisplayString>
161
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
162
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
163
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
164
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
165
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
166
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
167
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
168
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::discarded">discarded</DisplayString>
169
+ <Expand>
170
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::object">
171
+ *(m_data.m_value.object),view(simple)
172
+ </ExpandedItem>
173
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_ldvcmp::detail::value_t::array">
174
+ *(m_data.m_value.array),view(simple)
175
+ </ExpandedItem>
176
+ </Expand>
177
+ </Type>
178
+
179
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
180
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
181
+ <Type Name="std::pair&lt;*, nlohmann::json_abi_ldvcmp::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
182
+ <DisplayString>{second}</DisplayString>
183
+ <Expand>
184
+ <ExpandedItem>second</ExpandedItem>
185
+ </Expand>
186
+ </Type>
187
+
188
+ <!-- Namespace nlohmann::json_abi_ldvcmp_v3_12_0 -->
189
+ <Type Name="nlohmann::json_abi_ldvcmp_v3_12_0::basic_json&lt;*&gt;">
190
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::null">null</DisplayString>
191
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
192
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
193
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
194
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
195
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
196
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
197
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
198
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::discarded">discarded</DisplayString>
199
+ <Expand>
200
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::object">
201
+ *(m_data.m_value.object),view(simple)
202
+ </ExpandedItem>
203
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_ldvcmp_v3_12_0::detail::value_t::array">
204
+ *(m_data.m_value.array),view(simple)
205
+ </ExpandedItem>
206
+ </Expand>
207
+ </Type>
208
+
209
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
210
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
211
+ <Type Name="std::pair&lt;*, nlohmann::json_abi_ldvcmp_v3_12_0::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
212
+ <DisplayString>{second}</DisplayString>
213
+ <Expand>
214
+ <ExpandedItem>second</ExpandedItem>
215
+ </Expand>
216
+ </Type>
217
+
218
+ <!-- Namespace nlohmann::json_abi_diag_ldvcmp -->
219
+ <Type Name="nlohmann::json_abi_diag_ldvcmp::basic_json&lt;*&gt;">
220
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::null">null</DisplayString>
221
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
222
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
223
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
224
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
225
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
226
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
227
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
228
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::discarded">discarded</DisplayString>
229
+ <Expand>
230
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::object">
231
+ *(m_data.m_value.object),view(simple)
232
+ </ExpandedItem>
233
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp::detail::value_t::array">
234
+ *(m_data.m_value.array),view(simple)
235
+ </ExpandedItem>
236
+ </Expand>
237
+ </Type>
238
+
239
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
240
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
241
+ <Type Name="std::pair&lt;*, nlohmann::json_abi_diag_ldvcmp::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
242
+ <DisplayString>{second}</DisplayString>
243
+ <Expand>
244
+ <ExpandedItem>second</ExpandedItem>
245
+ </Expand>
246
+ </Type>
247
+
248
+ <!-- Namespace nlohmann::json_abi_diag_ldvcmp_v3_12_0 -->
249
+ <Type Name="nlohmann::json_abi_diag_ldvcmp_v3_12_0::basic_json&lt;*&gt;">
250
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::null">null</DisplayString>
251
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::object">{*(m_data.m_value.object)}</DisplayString>
252
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::array">{*(m_data.m_value.array)}</DisplayString>
253
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::string">{*(m_data.m_value.string)}</DisplayString>
254
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::boolean">{m_data.m_value.boolean}</DisplayString>
255
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::number_integer">{m_data.m_value.number_integer}</DisplayString>
256
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::number_unsigned">{m_data.m_value.number_unsigned}</DisplayString>
257
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::number_float">{m_data.m_value.number_float}</DisplayString>
258
+ <DisplayString Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::discarded">discarded</DisplayString>
259
+ <Expand>
260
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::object">
261
+ *(m_data.m_value.object),view(simple)
262
+ </ExpandedItem>
263
+ <ExpandedItem Condition="m_data.m_type == nlohmann::json_abi_diag_ldvcmp_v3_12_0::detail::value_t::array">
264
+ *(m_data.m_value.array),view(simple)
265
+ </ExpandedItem>
266
+ </Expand>
267
+ </Type>
268
+
269
+ <!-- Skip the pair first/second members in the treeview while traversing a map.
270
+ Only works in VS 2015 Update 2 and beyond using the new visualization -->
271
+ <Type Name="std::pair&lt;*, nlohmann::json_abi_diag_ldvcmp_v3_12_0::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
272
+ <DisplayString>{second}</DisplayString>
273
+ <Expand>
274
+ <ExpandedItem>second</ExpandedItem>
275
+ </Expand>
276
+ </Type>
277
+
278
+ </AutoVisualizer>
@@ -12,7 +12,14 @@ from __future__ import annotations
12
12
 
13
13
  from typing import TYPE_CHECKING
14
14
 
15
- from qiskit.circuit import AncillaRegister, ClassicalRegister, Clbit, QuantumCircuit, QuantumRegister, Qubit
15
+ from qiskit.circuit import (
16
+ AncillaRegister,
17
+ ClassicalRegister,
18
+ IfElseOp,
19
+ QuantumCircuit,
20
+ QuantumRegister,
21
+ )
22
+ from qiskit.circuit.classical import expr
16
23
  from qiskit.circuit.library import (
17
24
  DCXGate,
18
25
  ECRGate,
@@ -46,11 +53,11 @@ from qiskit.transpiler.layout import Layout, TranspileLayout
46
53
 
47
54
  from ...ir import Permutation
48
55
  from ...ir.operations import (
49
- ClassicControlledOperation,
56
+ ComparisonKind,
50
57
  CompoundOperation,
51
58
  Control,
59
+ IfElseOperation,
52
60
  NonUnitaryOperation,
53
- Operation,
54
61
  OpType,
55
62
  StandardOperation,
56
63
  )
@@ -58,9 +65,11 @@ from ...ir.operations import (
58
65
  if TYPE_CHECKING:
59
66
  from collections.abc import Mapping, Sequence
60
67
 
68
+ from qiskit.circuit import Clbit, Qubit
61
69
  from qiskit.circuit.singleton import SingletonGate
62
70
 
63
71
  from ...ir import QuantumComputation
72
+ from ...ir.operations import Operation
64
73
 
65
74
  __all__ = ["mqt_to_qiskit"]
66
75
 
@@ -205,7 +214,10 @@ def _add_standard_operation(circ: QuantumCircuit, op: StandardOperation, qubit_m
205
214
 
206
215
 
207
216
  def _add_non_unitary_operation(
208
- circ: QuantumCircuit, op: NonUnitaryOperation, qubit_map: Mapping[int, Qubit], clbit_map: Mapping[int, Clbit]
217
+ circ: QuantumCircuit,
218
+ op: NonUnitaryOperation,
219
+ qubit_map: Mapping[int, Qubit],
220
+ clbit_map: Mapping[int, Clbit],
209
221
  ) -> None:
210
222
  """Add a :class:`~mqt.core.ir.operations.NonUnitaryOperation`.
211
223
 
@@ -216,7 +228,7 @@ def _add_non_unitary_operation(
216
228
  clbit_map: A mapping from classical bit indices to Qiskit :class:`~qiskit.circuit.Clbit`.
217
229
  """
218
230
  if op.type_ == OpType.measure:
219
- for qubit, clbit in zip(op.targets, op.classics):
231
+ for qubit, clbit in zip(op.targets, op.classics, strict=False):
220
232
  circ.measure(qubit_map[qubit], clbit_map[clbit])
221
233
  return
222
234
 
@@ -227,7 +239,10 @@ def _add_non_unitary_operation(
227
239
 
228
240
 
229
241
  def _add_compound_operation(
230
- circ: QuantumCircuit, op: CompoundOperation, qubit_map: Mapping[int, Qubit], clbit_map: Mapping[int, Clbit]
242
+ circ: QuantumCircuit,
243
+ op: CompoundOperation,
244
+ qubit_map: Mapping[int, Qubit],
245
+ clbit_map: Mapping[int, Clbit],
231
246
  ) -> None:
232
247
  """Add a :class:`~mqt.core.ir.operations.CompoundOperation`.
233
248
 
@@ -243,8 +258,59 @@ def _add_compound_operation(
243
258
  circ.append(inner_circ.to_instruction(), circ.qubits, circ.clbits)
244
259
 
245
260
 
261
+ def _add_if_else_operation(
262
+ circ: QuantumCircuit,
263
+ op: IfElseOperation,
264
+ qubit_map: Mapping[int, Qubit],
265
+ clbit_map: Mapping[int, Clbit],
266
+ ) -> None:
267
+ """Add a :class:`~.IfElseOperation`.
268
+
269
+ Args:
270
+ circ: The Qiskit circuit to add the operation to.
271
+ op: The :class:`~.IfElseOperation` operation to add.
272
+ qubit_map: A mapping from qubit indices to Qiskit :class:`~qiskit.circuit.Qubit`.
273
+ clbit_map: A mapping from classical bit indices to Qiskit :class:`~qiskit.circuit.Clbit`.
274
+ """
275
+ if op.control_register is not None:
276
+ left_hand_side = next(reg for reg in circ.cregs if reg.name == op.control_register.name)
277
+ right_hand_side = op.expected_value_register
278
+ else:
279
+ assert op.control_bit is not None
280
+ left_hand_side = clbit_map[op.control_bit]
281
+ right_hand_side = op.expected_value_bit
282
+
283
+ condition: expr.Expr | tuple[ClassicalRegister | Clbit, int]
284
+ if op.comparison_kind == ComparisonKind.eq:
285
+ # directly handle equality conditions without expressions
286
+ condition = (left_hand_side, right_hand_side)
287
+ elif op.comparison_kind == ComparisonKind.neq:
288
+ condition = expr.not_equal(left_hand_side, right_hand_side)
289
+ elif op.comparison_kind == ComparisonKind.lt:
290
+ condition = expr.less(left_hand_side, right_hand_side)
291
+ elif op.comparison_kind == ComparisonKind.leq:
292
+ condition = expr.less_equal(left_hand_side, right_hand_side)
293
+ elif op.comparison_kind == ComparisonKind.gt:
294
+ condition = expr.greater(left_hand_side, right_hand_side)
295
+ elif op.comparison_kind == ComparisonKind.geq:
296
+ condition = expr.greater_equal(left_hand_side, right_hand_side)
297
+
298
+ then_circ = QuantumCircuit(*circ.qregs, *circ.cregs)
299
+ _add_operation(then_circ, op.then_operation, qubit_map, clbit_map)
300
+
301
+ else_circ: QuantumCircuit | None = None
302
+ if op.else_operation is not None:
303
+ else_circ = QuantumCircuit(*circ.qregs, *circ.cregs)
304
+ _add_operation(else_circ, op.else_operation, qubit_map, clbit_map)
305
+
306
+ circ.append(IfElseOp(condition, then_circ, else_circ), circ.qubits, circ.clbits)
307
+
308
+
246
309
  def _add_operation(
247
- circ: QuantumCircuit, op: Operation, qubit_map: Mapping[int, Qubit], clbit_map: Mapping[int, Clbit]
310
+ circ: QuantumCircuit,
311
+ op: Operation,
312
+ qubit_map: Mapping[int, Qubit],
313
+ clbit_map: Mapping[int, Clbit],
248
314
  ) -> None:
249
315
  """Add an operation to a Qiskit circuit.
250
316
 
@@ -256,7 +322,6 @@ def _add_operation(
256
322
 
257
323
  Raises:
258
324
  TypeError: If the operation type is not supported.
259
- NotImplementedError: If the operation type is not yet supported.
260
325
  """
261
326
  if isinstance(op, StandardOperation):
262
327
  _add_standard_operation(circ, op, qubit_map)
@@ -264,9 +329,8 @@ def _add_operation(
264
329
  _add_non_unitary_operation(circ, op, qubit_map, clbit_map)
265
330
  elif isinstance(op, CompoundOperation):
266
331
  _add_compound_operation(circ, op, qubit_map, clbit_map)
267
- elif isinstance(op, ClassicControlledOperation):
268
- msg = "Conversion of classic-controlled operations to Qiskit is not yet supported."
269
- raise NotImplementedError(msg)
332
+ elif isinstance(op, IfElseOperation):
333
+ _add_if_else_operation(circ, op, qubit_map, clbit_map)
270
334
  else:
271
335
  msg = f"Unsupported operation type: {type(op)}"
272
336
  raise TypeError(msg)
@@ -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, Qubit
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