mqt-core 3.2.1__cp311-cp311-win_amd64.whl → 3.3.0__cp311-cp311-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.cp311-win_amd64.pyd +0 -0
- mqt/core/dd.pyi +5 -7
- mqt/core/fomac.cp311-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/dd/CachedEdge.hpp +7 -0
- mqt/core/include/mqt-core/dd/Operations.hpp +12 -14
- 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.cp311-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.cp311-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.1.dist-info → mqt_core-3.3.0.dist-info}/METADATA +74 -33
- {mqt_core-3.2.1.dist-info → mqt_core-3.3.0.dist-info}/RECORD +244 -50
- {mqt_core-3.2.1.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.1.dist-info/DELVEWHEEL +0 -2
- {mqt_core-3.2.1.dist-info → mqt_core-3.3.0.dist-info}/entry_points.txt +0 -0
- {mqt_core-3.2.1.dist-info → mqt_core-3.3.0.dist-info}/licenses/LICENSE.md +0 -0
mqt/core/__init__.py
CHANGED
|
@@ -12,14 +12,14 @@ from __future__ import annotations
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
# start delvewheel patch
|
|
15
|
-
def
|
|
15
|
+
def _delvewheel_patch_1_11_2():
|
|
16
16
|
import os
|
|
17
17
|
if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'mqt_core.libs'))):
|
|
18
18
|
os.add_dll_directory(libs_dir)
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
del
|
|
21
|
+
_delvewheel_patch_1_11_2()
|
|
22
|
+
del _delvewheel_patch_1_11_2
|
|
23
23
|
# end delvewheel patch
|
|
24
24
|
|
|
25
25
|
import os
|
mqt/core/_commands.py
CHANGED
|
@@ -23,7 +23,7 @@ def include_dir() -> Path:
|
|
|
23
23
|
"""
|
|
24
24
|
try:
|
|
25
25
|
dist = distribution("mqt-core")
|
|
26
|
-
located_include_dir = Path(dist.locate_file("mqt/core/include/mqt-core"))
|
|
26
|
+
located_include_dir = Path(str(dist.locate_file("mqt/core/include/mqt-core")))
|
|
27
27
|
if located_include_dir.exists() and located_include_dir.is_dir():
|
|
28
28
|
return located_include_dir
|
|
29
29
|
msg = "mqt-core include files not found."
|
|
@@ -42,7 +42,7 @@ def cmake_dir() -> Path:
|
|
|
42
42
|
"""
|
|
43
43
|
try:
|
|
44
44
|
dist = distribution("mqt-core")
|
|
45
|
-
located_cmake_dir = Path(dist.locate_file("mqt/core/share/cmake"))
|
|
45
|
+
located_cmake_dir = Path(str(dist.locate_file("mqt/core/share/cmake")))
|
|
46
46
|
if located_cmake_dir.exists() and located_cmake_dir.is_dir():
|
|
47
47
|
return located_cmake_dir
|
|
48
48
|
msg = "mqt-core CMake files not found."
|
mqt/core/_version.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
3
|
|
|
4
|
-
__all__ = [
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
5
12
|
|
|
6
13
|
TYPE_CHECKING = False
|
|
7
14
|
if TYPE_CHECKING:
|
|
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
|
|
|
9
16
|
from typing import Union
|
|
10
17
|
|
|
11
18
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
12
20
|
else:
|
|
13
21
|
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
14
23
|
|
|
15
24
|
version: str
|
|
16
25
|
__version__: str
|
|
17
26
|
__version_tuple__: VERSION_TUPLE
|
|
18
27
|
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
19
30
|
|
|
20
|
-
__version__ = version = '3.
|
|
21
|
-
__version_tuple__ = version_tuple = (3,
|
|
31
|
+
__version__ = version = '3.3.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 3, 0)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = 'ga354ba3d0'
|
|
Binary file
|
|
Binary file
|
mqt/core/bin/mqt-core-dd.dll
CHANGED
|
Binary file
|
mqt/core/bin/mqt-core-ds.dll
CHANGED
|
Binary file
|
|
Binary file
|
mqt/core/bin/mqt-core-ir.dll
CHANGED
|
Binary file
|
|
Binary file
|
mqt/core/bin/mqt-core-na.dll
CHANGED
|
Binary file
|
mqt/core/bin/mqt-core-qasm.dll
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
mqt/core/bin/mqt-core-zx.dll
CHANGED
|
Binary file
|
mqt/core/dd.cp311-win_amd64.pyd
CHANGED
|
Binary file
|
mqt/core/dd.pyi
CHANGED
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
from collections.abc import Iterable
|
|
12
12
|
from enum import Enum
|
|
13
|
-
from typing import Any
|
|
14
13
|
|
|
15
14
|
import numpy as np
|
|
16
15
|
import numpy.typing as npt
|
|
17
16
|
|
|
18
17
|
from .ir import Permutation, QuantumComputation
|
|
19
|
-
from .ir.operations import
|
|
18
|
+
from .ir.operations import Control, IfElseOperation, NonUnitaryOperation, Operation
|
|
20
19
|
|
|
21
20
|
__all__ = [
|
|
22
21
|
"BasisStates",
|
|
@@ -289,7 +288,7 @@ class DDPackage:
|
|
|
289
288
|
The resulting state is guaranteed to have its reference count increased.
|
|
290
289
|
"""
|
|
291
290
|
|
|
292
|
-
def from_vector(self, state: npt.NDArray[
|
|
291
|
+
def from_vector(self, state: npt.NDArray[np.cdouble]) -> VectorDD:
|
|
293
292
|
"""Create a DD from a state vector.
|
|
294
293
|
|
|
295
294
|
Args:
|
|
@@ -361,10 +360,10 @@ class DDPackage:
|
|
|
361
360
|
The input DD must have a non-zero reference count.
|
|
362
361
|
"""
|
|
363
362
|
|
|
364
|
-
def
|
|
363
|
+
def apply_if_else_operation(
|
|
365
364
|
self,
|
|
366
365
|
vec: VectorDD,
|
|
367
|
-
operation:
|
|
366
|
+
operation: IfElseOperation,
|
|
368
367
|
measurements: list[bool],
|
|
369
368
|
permutation: Permutation = ...,
|
|
370
369
|
) -> VectorDD:
|
|
@@ -374,8 +373,7 @@ class DDPackage:
|
|
|
374
373
|
vec: The input DD.
|
|
375
374
|
operation: The classically controlled operation.
|
|
376
375
|
measurements: A list of bits with stored measurement outcomes.
|
|
377
|
-
permutation: The permutation of the qubits.
|
|
378
|
-
Defaults to the identity permutation.
|
|
376
|
+
permutation: The permutation of the qubits. Defaults to the identity permutation.
|
|
379
377
|
|
|
380
378
|
Returns:
|
|
381
379
|
The resulting DD after the operation.
|
|
Binary file
|
mqt/core/fomac.pyi
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
|
|
2
|
+
# Copyright (c) 2025 Munich Quantum Software Company GmbH
|
|
3
|
+
# All rights reserved.
|
|
4
|
+
#
|
|
5
|
+
# SPDX-License-Identifier: MIT
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the MIT License
|
|
8
|
+
|
|
9
|
+
from collections.abc import Iterable
|
|
10
|
+
from enum import Enum
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"Device",
|
|
14
|
+
"devices",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
class Device:
|
|
18
|
+
"""A device represents a quantum device with its properties and capabilities."""
|
|
19
|
+
class Status(Enum):
|
|
20
|
+
offline = ...
|
|
21
|
+
idle = ...
|
|
22
|
+
busy = ...
|
|
23
|
+
error = ...
|
|
24
|
+
maintenance = ...
|
|
25
|
+
calibration = ...
|
|
26
|
+
|
|
27
|
+
class Site:
|
|
28
|
+
"""A site represents a potential qubit location on a quantum device."""
|
|
29
|
+
def index(self) -> int:
|
|
30
|
+
"""Returns the index of the site."""
|
|
31
|
+
def t1(self) -> int | None:
|
|
32
|
+
"""Returns the T1 coherence time of the site."""
|
|
33
|
+
def t2(self) -> int | None:
|
|
34
|
+
"""Returns the T2 coherence time of the site."""
|
|
35
|
+
def name(self) -> str | None:
|
|
36
|
+
"""Returns the name of the site."""
|
|
37
|
+
def x_coordinate(self) -> int | None:
|
|
38
|
+
"""Returns the x coordinate of the site."""
|
|
39
|
+
def y_coordinate(self) -> int | None:
|
|
40
|
+
"""Returns the y coordinate of the site."""
|
|
41
|
+
def z_coordinate(self) -> int | None:
|
|
42
|
+
"""Returns the z coordinate of the site."""
|
|
43
|
+
def is_zone(self) -> bool | None:
|
|
44
|
+
"""Returns whether the site is a zone."""
|
|
45
|
+
def x_extent(self) -> int | None:
|
|
46
|
+
"""Returns the x extent of the site."""
|
|
47
|
+
def y_extent(self) -> int | None:
|
|
48
|
+
"""Returns the y extent of the site."""
|
|
49
|
+
def z_extent(self) -> int | None:
|
|
50
|
+
"""Returns the z extent of the site."""
|
|
51
|
+
def module_index(self) -> int | None:
|
|
52
|
+
"""Returns the index of the module the site belongs to."""
|
|
53
|
+
def submodule_index(self) -> int | None:
|
|
54
|
+
"""Returns the index of the submodule the site belongs to."""
|
|
55
|
+
def __eq__(self, other: object) -> bool:
|
|
56
|
+
"""Checks if two sites are equal."""
|
|
57
|
+
def __ne__(self, other: object) -> bool:
|
|
58
|
+
"""Checks if two sites are not equal."""
|
|
59
|
+
|
|
60
|
+
class Operation:
|
|
61
|
+
"""An operation represents a quantum operation that can be performed on a quantum device."""
|
|
62
|
+
def name(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> str:
|
|
63
|
+
"""Returns the name of the operation."""
|
|
64
|
+
def qubits_num(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> int | None:
|
|
65
|
+
"""Returns the number of qubits the operation acts on."""
|
|
66
|
+
def parameters_num(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> int:
|
|
67
|
+
"""Returns the number of parameters the operation has."""
|
|
68
|
+
def duration(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> int | None:
|
|
69
|
+
"""Returns the duration of the operation."""
|
|
70
|
+
def fidelity(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> float | None:
|
|
71
|
+
"""Returns the fidelity of the operation."""
|
|
72
|
+
def interaction_radius(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> int | None:
|
|
73
|
+
"""Returns the interaction radius of the operation."""
|
|
74
|
+
def blocking_radius(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> int | None:
|
|
75
|
+
"""Returns the blocking radius of the operation."""
|
|
76
|
+
def idling_fidelity(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> float | None:
|
|
77
|
+
"""Returns the idling fidelity of the operation."""
|
|
78
|
+
def is_zoned(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> bool | None:
|
|
79
|
+
"""Returns whether the operation is zoned."""
|
|
80
|
+
def sites(
|
|
81
|
+
self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...
|
|
82
|
+
) -> Iterable[Device.Site] | None:
|
|
83
|
+
"""Returns the list of sites the operation can be performed on."""
|
|
84
|
+
def mean_shuttling_speed(self, sites: Iterable[Device.Site] = ..., params: Iterable[float] = ...) -> int | None:
|
|
85
|
+
"""Returns the mean shuttling speed of the operation."""
|
|
86
|
+
def __eq__(self, other: object) -> bool:
|
|
87
|
+
"""Checks if two operations are equal."""
|
|
88
|
+
def __ne__(self, other: object) -> bool:
|
|
89
|
+
"""Checks if two operations are not equal."""
|
|
90
|
+
|
|
91
|
+
def name(self) -> str:
|
|
92
|
+
"""Returns the name of the device."""
|
|
93
|
+
def version(self) -> str:
|
|
94
|
+
"""Returns the version of the device."""
|
|
95
|
+
def status(self) -> Device.Status:
|
|
96
|
+
"""Returns the current status of the device."""
|
|
97
|
+
def library_version(self) -> str:
|
|
98
|
+
"""Returns the version of the library used to define the device."""
|
|
99
|
+
def qubits_num(self) -> int:
|
|
100
|
+
"""Returns the number of qubits available on the device."""
|
|
101
|
+
def sites(self) -> Iterable[Site]:
|
|
102
|
+
"""Returns the list of sites available on the device."""
|
|
103
|
+
def operations(self) -> Iterable[Operation]:
|
|
104
|
+
"""Returns the list of operations supported by the device."""
|
|
105
|
+
def coupling_map(self) -> Iterable[tuple[Site, Site]] | None:
|
|
106
|
+
"""Returns the coupling map of the device as a list of site pairs."""
|
|
107
|
+
def needs_calibration(self) -> int | None:
|
|
108
|
+
"""Returns whether the device needs calibration."""
|
|
109
|
+
def length_unit(self) -> str | None:
|
|
110
|
+
"""Returns the unit of length used by the device."""
|
|
111
|
+
def length_scale_factor(self) -> float | None:
|
|
112
|
+
"""Returns the scale factor for length used by the device."""
|
|
113
|
+
def duration_unit(self) -> str | None:
|
|
114
|
+
"""Returns the unit of duration used by the device."""
|
|
115
|
+
def duration_scale_factor(self) -> float | None:
|
|
116
|
+
"""Returns the scale factor for duration used by the device."""
|
|
117
|
+
def min_atom_distance(self) -> int | None:
|
|
118
|
+
"""Returns the minimum atom distance on the device."""
|
|
119
|
+
def __eq__(self, other: object) -> bool:
|
|
120
|
+
"""Checks if two devices are equal."""
|
|
121
|
+
def __ne__(self, other: object) -> bool:
|
|
122
|
+
"""Checks if two devices are not equal."""
|
|
123
|
+
|
|
124
|
+
def devices() -> Iterable[Device]:
|
|
125
|
+
"""Returns a list of available devices."""
|
|
@@ -93,6 +93,19 @@ public:
|
|
|
93
93
|
*/
|
|
94
94
|
static void collectBlocks(QuantumComputation& qc, std::size_t maxBlockSize);
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* @brief Collects all Clifford blocks in the circuit.
|
|
98
|
+
* @details The circuit is traversed and all operations that are part of a
|
|
99
|
+
* Clifford block are collected into a compound operation with a certain
|
|
100
|
+
* maximum block size. All non-Clifford operations remain untouched.
|
|
101
|
+
* Light optimizations are applied to the blocks, such as removing identity
|
|
102
|
+
* gates.
|
|
103
|
+
* @param qc the quantum circuit
|
|
104
|
+
* @param maxBlockSize the maximum size of a block
|
|
105
|
+
*/
|
|
106
|
+
static void collectCliffordBlocks(QuantumComputation& qc,
|
|
107
|
+
std::size_t maxBlockSize);
|
|
108
|
+
|
|
96
109
|
/**
|
|
97
110
|
* @brief Elide permutations by propagating them through the circuit.
|
|
98
111
|
* @details The circuit is traversed and any SWAP gate is eliminated by
|
|
@@ -160,6 +160,13 @@ template <typename Node> struct CachedEdge {
|
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
+
// Deduction guide for constructor: CachedEdge(Node*, const ComplexValue&)
|
|
164
|
+
template <class Node>
|
|
165
|
+
CachedEdge(Node*, const ComplexValue&) -> CachedEdge<Node>;
|
|
166
|
+
|
|
167
|
+
// Deduction guide for constructor: CachedEdge(Node*, const Complex&)
|
|
168
|
+
template <class Node> CachedEdge(Node*, const Complex&) -> CachedEdge<Node>;
|
|
169
|
+
|
|
163
170
|
} // namespace dd
|
|
164
171
|
|
|
165
172
|
template <class Node> struct std::hash<dd::CachedEdge<Node>> {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
#include "dd/Package.hpp"
|
|
16
16
|
#include "ir/Definitions.hpp"
|
|
17
17
|
#include "ir/Permutation.hpp"
|
|
18
|
-
#include "ir/operations/ClassicControlledOperation.hpp"
|
|
19
18
|
#include "ir/operations/Control.hpp"
|
|
19
|
+
#include "ir/operations/IfElseOperation.hpp"
|
|
20
20
|
#include "ir/operations/NonUnitaryOperation.hpp"
|
|
21
21
|
#include "ir/operations/OpType.hpp"
|
|
22
22
|
#include "ir/operations/Operation.hpp"
|
|
@@ -181,16 +181,15 @@ VectorDD applyReset(const qc::NonUnitaryOperation& op, VectorDD in, Package& dd,
|
|
|
181
181
|
const qc::Permutation& permutation = {});
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
* @brief Apply
|
|
184
|
+
* @brief Apply an if-else operation to a given DD.
|
|
185
185
|
*
|
|
186
|
-
* @details This is a convenience function that realizes the
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* counting.
|
|
186
|
+
* @details This is a convenience function that realizes the if-else operation
|
|
187
|
+
* @p op on @p in. It applies the underlying operation if the actual value
|
|
188
|
+
* stored in the measurement results matches the expected value according to the
|
|
189
|
+
* comparison kind. The function correctly accounts for the permutation of the
|
|
190
|
+
* operation's qubits as well as automatically handles reference counting.
|
|
192
191
|
*
|
|
193
|
-
* @param op The
|
|
192
|
+
* @param op The if-else operation to apply
|
|
194
193
|
* @param in The input DD
|
|
195
194
|
* @param dd The DD package to use
|
|
196
195
|
* @param measurements The vector of measurement results
|
|
@@ -198,11 +197,10 @@ VectorDD applyReset(const qc::NonUnitaryOperation& op, VectorDD in, Package& dd,
|
|
|
198
197
|
* empty permutation marks the identity permutation.
|
|
199
198
|
* @return The output DD
|
|
200
199
|
*/
|
|
201
|
-
VectorDD
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
const qc::Permutation& permutation = {});
|
|
200
|
+
VectorDD applyIfElseOperation(const qc::IfElseOperation& op, const VectorDD& in,
|
|
201
|
+
Package& dd,
|
|
202
|
+
const std::vector<bool>& measurements,
|
|
203
|
+
const qc::Permutation& permutation = {});
|
|
206
204
|
|
|
207
205
|
/**
|
|
208
206
|
* @brief Check whether @p op is virtually executable.
|