mqt-core 3.0.1__cp39-cp39-win_amd64.whl → 3.1.0__cp39-cp39-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.
- mqt/core/__init__.py +5 -5
- mqt/core/_version.py +2 -2
- 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-ir.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-zx.dll +0 -0
- mqt/core/dd.cp39-win_amd64.pyd +0 -0
- mqt/core/include/mqt-core/dd/Approximation.hpp +45 -0
- mqt/core/include/mqt-core/dd/Complex.hpp +6 -0
- mqt/core/include/mqt-core/dd/ComplexNumbers.hpp +0 -18
- mqt/core/include/mqt-core/dd/ComputeTable.hpp +4 -1
- mqt/core/include/mqt-core/dd/DDDefinitions.hpp +0 -7
- mqt/core/include/mqt-core/dd/Edge.hpp +16 -0
- mqt/core/include/mqt-core/dd/Export.hpp +1 -2
- mqt/core/include/mqt-core/dd/Node.hpp +26 -49
- mqt/core/include/mqt-core/dd/Operations.hpp +27 -0
- mqt/core/include/mqt-core/dd/Package.hpp +138 -120
- mqt/core/include/mqt-core/dd/RealNumber.hpp +49 -66
- mqt/core/include/mqt-core/dd/RealNumberUniqueTable.hpp +14 -25
- mqt/core/include/mqt-core/dd/StateGeneration.hpp +143 -0
- mqt/core/include/mqt-core/dd/UnaryComputeTable.hpp +6 -4
- mqt/core/include/mqt-core/dd/UniqueTable.hpp +13 -39
- mqt/core/include/mqt-core/dd/statistics/PackageStatistics.hpp +8 -7
- mqt/core/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp +0 -10
- mqt/core/include/mqt-core/ir/QuantumComputation.hpp +3 -0
- mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +2 -0
- mqt/core/include/mqt-core/ir/operations/Operation.hpp +2 -2
- mqt/core/ir.cp39-win_amd64.pyd +0 -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-ir.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-zx.lib +0 -0
- mqt/core/plugins/__init__.py +0 -8
- mqt/core/plugins/qiskit/qiskit_to_mqt.py +6 -0
- mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +52 -0
- mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +4 -4
- mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +3 -3
- mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +1 -0
- mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +1 -1
- mqt_core-3.1.0.dist-info/DELVEWHEEL +2 -0
- {mqt_core-3.0.1.dist-info → mqt_core-3.1.0.dist-info}/METADATA +54 -9
- {mqt_core-3.0.1.dist-info → mqt_core-3.1.0.dist-info}/RECORD +55 -102
- {mqt_core-3.0.1.dist-info → mqt_core-3.1.0.dist-info}/WHEEL +1 -1
- mqt_core.libs/msvcp140.dll +0 -0
- mqt/core/include/nlohmann/adl_serializer.hpp +0 -55
- mqt/core/include/nlohmann/byte_container_with_subtype.hpp +0 -103
- mqt/core/include/nlohmann/detail/abi_macros.hpp +0 -100
- mqt/core/include/nlohmann/detail/conversions/from_json.hpp +0 -497
- mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +0 -1118
- mqt/core/include/nlohmann/detail/conversions/to_json.hpp +0 -446
- mqt/core/include/nlohmann/detail/exceptions.hpp +0 -257
- mqt/core/include/nlohmann/detail/hash.hpp +0 -129
- mqt/core/include/nlohmann/detail/input/binary_reader.hpp +0 -3009
- mqt/core/include/nlohmann/detail/input/input_adapters.hpp +0 -492
- mqt/core/include/nlohmann/detail/input/json_sax.hpp +0 -727
- mqt/core/include/nlohmann/detail/input/lexer.hpp +0 -1633
- mqt/core/include/nlohmann/detail/input/parser.hpp +0 -519
- mqt/core/include/nlohmann/detail/input/position_t.hpp +0 -37
- mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +0 -35
- mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +0 -751
- mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +0 -242
- mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +0 -61
- mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +0 -130
- mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +0 -132
- mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +0 -39
- mqt/core/include/nlohmann/detail/json_pointer.hpp +0 -988
- mqt/core/include/nlohmann/detail/json_ref.hpp +0 -78
- mqt/core/include/nlohmann/detail/macro_scope.hpp +0 -482
- mqt/core/include/nlohmann/detail/macro_unscope.hpp +0 -45
- mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +0 -17
- mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +0 -17
- mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +0 -171
- mqt/core/include/nlohmann/detail/meta/detected.hpp +0 -70
- mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +0 -21
- mqt/core/include/nlohmann/detail/meta/is_sax.hpp +0 -159
- mqt/core/include/nlohmann/detail/meta/std_fs.hpp +0 -29
- mqt/core/include/nlohmann/detail/meta/type_traits.hpp +0 -795
- mqt/core/include/nlohmann/detail/meta/void_t.hpp +0 -24
- mqt/core/include/nlohmann/detail/output/binary_writer.hpp +0 -1838
- mqt/core/include/nlohmann/detail/output/output_adapters.hpp +0 -147
- mqt/core/include/nlohmann/detail/output/serializer.hpp +0 -988
- mqt/core/include/nlohmann/detail/string_concat.hpp +0 -146
- mqt/core/include/nlohmann/detail/string_escape.hpp +0 -72
- mqt/core/include/nlohmann/detail/value_t.hpp +0 -118
- mqt/core/include/nlohmann/json.hpp +0 -5258
- mqt/core/include/nlohmann/json_fwd.hpp +0 -75
- mqt/core/include/nlohmann/ordered_map.hpp +0 -359
- mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +0 -2045
- mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +0 -158
- mqt/core/nlohmann_json.natvis +0 -278
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +0 -15
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +0 -20
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +0 -110
- mqt/core/share/pkgconfig/nlohmann_json.pc +0 -4
- mqt_core-3.0.1.dist-info/DELVEWHEEL +0 -2
- {mqt_core-3.0.1.dist-info → mqt_core-3.1.0.dist-info}/entry_points.txt +0 -0
- {mqt_core-3.0.1.dist-info → mqt_core-3.1.0.dist-info}/licenses/LICENSE.md +0 -0
- /mqt_core.libs/{.load-order-mqt_core-3.0.1 → .load-order-mqt_core-3.1.0} +0 -0
|
@@ -29,11 +29,13 @@ namespace dd {
|
|
|
29
29
|
* @tparam OperandType type of the operation's operand
|
|
30
30
|
* @tparam ResultType type of the operation's result
|
|
31
31
|
*/
|
|
32
|
-
template <class OperandType, class ResultType
|
|
33
|
-
class UnaryComputeTable {
|
|
32
|
+
template <class OperandType, class ResultType> class UnaryComputeTable {
|
|
34
33
|
public:
|
|
34
|
+
/// Default number of buckets for the compute table
|
|
35
|
+
static constexpr std::size_t DEFAULT_NUM_BUCKETS = 32768U;
|
|
36
|
+
|
|
35
37
|
/// Default constructor
|
|
36
|
-
explicit UnaryComputeTable(const size_t numBuckets =
|
|
38
|
+
explicit UnaryComputeTable(const size_t numBuckets = DEFAULT_NUM_BUCKETS) {
|
|
37
39
|
// numBuckets must be a power of two
|
|
38
40
|
if ((numBuckets & (numBuckets - 1)) != 0) {
|
|
39
41
|
throw std::invalid_argument("Number of buckets must be a power of two.");
|
|
@@ -106,7 +108,7 @@ public:
|
|
|
106
108
|
* @brief Clear the compute table
|
|
107
109
|
* @details Sets all entries to invalid.
|
|
108
110
|
*/
|
|
109
|
-
void clear() { valid = std::vector(
|
|
111
|
+
void clear() { valid = std::vector(stats.numBuckets, false); }
|
|
110
112
|
|
|
111
113
|
private:
|
|
112
114
|
/// The actual table storing the entries
|
|
@@ -96,10 +96,8 @@ public:
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
//
|
|
100
|
-
// if it has not been found
|
|
101
|
-
// function invoking the table lookup and only normalized nodes shall be
|
|
102
|
-
// stored.
|
|
99
|
+
// Lookup a node in the unique table for the appropriate variable and insert
|
|
100
|
+
// it if it has not been found. Only normalized nodes shall be stored.
|
|
103
101
|
template <class Node> [[nodiscard]] Node* lookup(Node* p) {
|
|
104
102
|
static_assert(std::is_base_of_v<NodeBase, Node>,
|
|
105
103
|
"Node must be derived from NodeBase");
|
|
@@ -144,42 +142,19 @@ public:
|
|
|
144
142
|
/// Get the total number of entries
|
|
145
143
|
[[nodiscard]] std::size_t getNumEntries() const noexcept;
|
|
146
144
|
|
|
147
|
-
///
|
|
148
|
-
[[nodiscard]] std::size_t
|
|
145
|
+
/// Count the number of marked entries
|
|
146
|
+
[[nodiscard]] std::size_t countMarkedEntries() const noexcept;
|
|
149
147
|
|
|
150
|
-
/// Get the peak total number of active entries
|
|
151
|
-
[[nodiscard]] std::size_t getPeakNumActiveEntries() const noexcept;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @brief Increment the reference count of a node.
|
|
155
|
-
* @details This is a pass-through function that calls the increment function
|
|
156
|
-
* of the node. It additionally keeps track of the number of active entries
|
|
157
|
-
* in the table (entries with a reference count greater than zero). Reference
|
|
158
|
-
* counts saturate at the maximum value of RefCount.
|
|
159
|
-
* @param p A pointer to the node to increase the reference count of.
|
|
160
|
-
* @returns Whether the reference count was increased.
|
|
161
|
-
* @see Node::incRef(Node*)
|
|
162
|
-
*/
|
|
163
|
-
[[nodiscard]] bool incRef(NodeBase* p) noexcept;
|
|
164
148
|
/**
|
|
165
|
-
* @brief
|
|
166
|
-
* @details This is a pass-through function that calls the decrement function
|
|
167
|
-
* of the node. It additionally keeps track of the number of active entries
|
|
168
|
-
* in the table (entries with a reference count greater than zero). Reference
|
|
169
|
-
* counts saturate at the maximum value of RefCount.
|
|
170
|
-
* @param p A pointer to the node to decrease the reference count of.
|
|
171
|
-
* @returns Whether the reference count was decreased.
|
|
172
|
-
* @see Node::decRef(Node*)
|
|
149
|
+
* @brief Determine whether the table possibly requires garbage collection.
|
|
173
150
|
*/
|
|
174
|
-
[[nodiscard]] bool decRef(NodeBase* p) noexcept;
|
|
175
|
-
|
|
176
151
|
[[nodiscard]] bool possiblyNeedsCollection() const;
|
|
177
152
|
|
|
178
153
|
std::size_t garbageCollect(bool force = false);
|
|
179
154
|
|
|
180
155
|
void clear();
|
|
181
156
|
|
|
182
|
-
template <class Node> void print() {
|
|
157
|
+
template <class Node> void print() const {
|
|
183
158
|
static_assert(std::is_base_of_v<NodeBase, Node>,
|
|
184
159
|
"Node must be derived from NodeBase");
|
|
185
160
|
auto q = cfg.nVars - 1U;
|
|
@@ -194,8 +169,8 @@ public:
|
|
|
194
169
|
}
|
|
195
170
|
|
|
196
171
|
while (p != nullptr) {
|
|
197
|
-
std::cout << "\t\t" << std::hex
|
|
198
|
-
<< std::
|
|
172
|
+
std::cout << "\t\t" << std::hex
|
|
173
|
+
<< reinterpret_cast<std::uintptr_t>(p);
|
|
199
174
|
for (const auto& e : p->e) {
|
|
200
175
|
std::cout << " p" << reinterpret_cast<std::uintptr_t>(e.p) << "(r"
|
|
201
176
|
<< reinterpret_cast<std::uintptr_t>(e.w.r) << " i"
|
|
@@ -235,12 +210,11 @@ private:
|
|
|
235
210
|
std::vector<UniqueTableStatistics> stats;
|
|
236
211
|
|
|
237
212
|
/**
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
**/
|
|
213
|
+
* @brief Search for a node in the hash table with the given key.
|
|
214
|
+
* @param p The node to search for.
|
|
215
|
+
* @param key The hashed value used to search the table.
|
|
216
|
+
* @returns A pointer to the node if found or Node::getTerminal() otherwise.
|
|
217
|
+
*/
|
|
244
218
|
template <class Node>
|
|
245
219
|
[[nodiscard]] Node* searchTable(Node& p, const std::size_t& key) {
|
|
246
220
|
static_assert(std::is_base_of_v<NodeBase, Node>,
|
|
@@ -20,13 +20,14 @@ namespace dd {
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @brief Computes an estimate for the memory usage of active DDs.
|
|
23
|
-
* @details The estimate is based on the number of active entries
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* @details The estimate is based on the number of active entries which are
|
|
24
|
+
* computed by temporarily marking all nodes reachable from the current root
|
|
25
|
+
* set and subsequently counting them in the unique tables. It accounts for the
|
|
26
|
+
* memory used by DD nodes, DD edges, and real numbers.
|
|
26
27
|
* @param package The package instance
|
|
27
28
|
* @return The estimated memory usage in MiB
|
|
28
29
|
*/
|
|
29
|
-
[[nodiscard]] double computeActiveMemoryMiB(
|
|
30
|
+
[[nodiscard]] double computeActiveMemoryMiB(Package& package);
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* @brief Computes an estimate for the peak memory usage of DDs.
|
|
@@ -39,7 +40,7 @@ namespace dd {
|
|
|
39
40
|
[[nodiscard]] double computePeakMemoryMiB(const Package& package);
|
|
40
41
|
|
|
41
42
|
[[nodiscard]] nlohmann::basic_json<>
|
|
42
|
-
getStatistics(
|
|
43
|
+
getStatistics(Package& package, bool includeIndividualTables = false);
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
46
|
* @brief Get some key statistics about data structures used by the DD package
|
|
@@ -47,8 +48,8 @@ getStatistics(const Package& package, bool includeIndividualTables = false);
|
|
|
47
48
|
*/
|
|
48
49
|
[[nodiscard]] nlohmann::basic_json<> getDataStructureStatistics();
|
|
49
50
|
|
|
50
|
-
[[nodiscard]] std::string getStatisticsString(
|
|
51
|
+
[[nodiscard]] std::string getStatisticsString(Package& package);
|
|
51
52
|
|
|
52
|
-
void printStatistics(
|
|
53
|
+
void printStatistics(Package& package, std::ostream& os = std::cout);
|
|
53
54
|
|
|
54
55
|
} // namespace dd
|
|
@@ -18,19 +18,9 @@
|
|
|
18
18
|
namespace dd {
|
|
19
19
|
/// \brief A class for storing statistics of a unique table
|
|
20
20
|
struct UniqueTableStatistics : public TableStatistics {
|
|
21
|
-
/**
|
|
22
|
-
* @brief The total number of active entries
|
|
23
|
-
* @details An entry is considered active if it has a non-zero reference count
|
|
24
|
-
*/
|
|
25
|
-
std::size_t numActiveEntries = 0U;
|
|
26
|
-
/// The peak number of active entries in the table
|
|
27
|
-
std::size_t peakNumActiveEntries = 0U;
|
|
28
21
|
/// The number of garbage collection runs
|
|
29
22
|
std::size_t gcRuns = 0U;
|
|
30
23
|
|
|
31
|
-
/// Track a new active entry
|
|
32
|
-
void trackActiveEntry() noexcept;
|
|
33
|
-
|
|
34
24
|
/// Reset all statistics (except for the peak values)
|
|
35
25
|
void reset() noexcept override;
|
|
36
26
|
|
|
@@ -124,6 +124,9 @@ public:
|
|
|
124
124
|
[[nodiscard]] decltype(mt)& getGenerator() noexcept { return mt; }
|
|
125
125
|
|
|
126
126
|
[[nodiscard]] fp getGlobalPhase() const noexcept { return globalPhase; }
|
|
127
|
+
[[nodiscard]] bool hasGlobalPhase() const noexcept {
|
|
128
|
+
return std::abs(getGlobalPhase()) > 0;
|
|
129
|
+
}
|
|
127
130
|
|
|
128
131
|
[[nodiscard]] const std::unordered_set<sym::Variable>&
|
|
129
132
|
getVariables() const noexcept {
|
|
@@ -48,6 +48,8 @@ public:
|
|
|
48
48
|
|
|
49
49
|
[[nodiscard]] std::unique_ptr<Operation> clone() const override;
|
|
50
50
|
|
|
51
|
+
[[nodiscard]] size_t getNqubits() const override;
|
|
52
|
+
|
|
51
53
|
[[nodiscard]] bool isCompoundOperation() const noexcept override;
|
|
52
54
|
|
|
53
55
|
[[nodiscard]] bool isNonUnitaryOperation() const override;
|
|
@@ -68,8 +68,8 @@ public:
|
|
|
68
68
|
[[nodiscard]] virtual std::size_t getNcontrols() const {
|
|
69
69
|
return controls.size();
|
|
70
70
|
}
|
|
71
|
-
[[nodiscard]] std::size_t getNqubits() const {
|
|
72
|
-
return
|
|
71
|
+
[[nodiscard]] virtual std::size_t getNqubits() const {
|
|
72
|
+
return getNcontrols() + getNtargets();
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
[[nodiscard]] const std::vector<fp>& getParameter() const {
|
mqt/core/ir.cp39-win_amd64.pyd
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
mqt/core/lib/mqt-core-dd.lib
CHANGED
|
Binary file
|
mqt/core/lib/mqt-core-ds.lib
CHANGED
|
Binary file
|
mqt/core/lib/mqt-core-ir.lib
CHANGED
|
Binary file
|
mqt/core/lib/mqt-core-na.lib
CHANGED
|
Binary file
|
mqt/core/lib/mqt-core-qasm.lib
CHANGED
|
Binary file
|
mqt/core/lib/mqt-core-zx.lib
CHANGED
|
Binary file
|
mqt/core/plugins/__init__.py
CHANGED
|
@@ -150,6 +150,7 @@ _NATIVELY_SUPPORTED_GATES = frozenset({
|
|
|
150
150
|
"sxdg",
|
|
151
151
|
"csx",
|
|
152
152
|
"mcx",
|
|
153
|
+
# we keep the "mcx_*" variants here for compatibility with Qiskit 1.x
|
|
153
154
|
"mcx_gray",
|
|
154
155
|
"mcx_recursive",
|
|
155
156
|
"mcx_vchain",
|
|
@@ -207,6 +208,8 @@ def _emplace_operation(
|
|
|
207
208
|
if name in {"i", "id", "iden"}:
|
|
208
209
|
return _add_operation(qc, OpType.i, qargs, params, qubit_map)
|
|
209
210
|
|
|
211
|
+
# we keep "mcx_gray" here for compatibility reasons with older Qiskit versions, e.g., 1.0.0 where "noancilla"
|
|
212
|
+
# is the default for the argument "mode" which leads to the gate name "gray_code"
|
|
210
213
|
if name in {"x", "cx", "ccx", "mcx", "mcx_gray"}:
|
|
211
214
|
return _add_operation(qc, OpType.x, qargs, params, qubit_map)
|
|
212
215
|
|
|
@@ -234,6 +237,9 @@ def _emplace_operation(
|
|
|
234
237
|
if name in {"sx", "csx"}:
|
|
235
238
|
return _add_operation(qc, OpType.sx, qargs, params, qubit_map)
|
|
236
239
|
|
|
240
|
+
if name == "sxdg":
|
|
241
|
+
return _add_operation(qc, OpType.sxdg, qargs, params, qubit_map)
|
|
242
|
+
|
|
237
243
|
if name == "mcx_recursive":
|
|
238
244
|
if len(qargs) <= 5:
|
|
239
245
|
return _add_operation(qc, OpType.x, qargs, params, qubit_map)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
|
|
2
|
+
# Copyright (c) 2025 Munich Quantum Software Company GmbH
|
|
3
|
+
# All rights reserved.
|
|
4
|
+
#
|
|
5
|
+
# SPDX-License-Identifier: MIT
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the MIT License
|
|
8
|
+
|
|
9
|
+
function(add_mqt_python_binding package_name target_name)
|
|
10
|
+
# parse the arguments
|
|
11
|
+
cmake_parse_arguments(ARG "" "MODULE_NAME;INSTALL_DIR" "LINK_LIBS" ${ARGN})
|
|
12
|
+
set(SOURCES ${ARG_UNPARSED_ARGUMENTS})
|
|
13
|
+
|
|
14
|
+
# declare the Python module
|
|
15
|
+
pybind11_add_module(
|
|
16
|
+
# name of the extension
|
|
17
|
+
${target_name}
|
|
18
|
+
# Pprefer thin LTO if available
|
|
19
|
+
THIN_LTO
|
|
20
|
+
# optimize the bindings for size
|
|
21
|
+
OPT_SIZE
|
|
22
|
+
# source code goes here
|
|
23
|
+
${SOURCES})
|
|
24
|
+
|
|
25
|
+
# set default "." for INSTALL_DIR
|
|
26
|
+
if(NOT ARG_INSTALL_DIR)
|
|
27
|
+
set(ARG_INSTALL_DIR ".")
|
|
28
|
+
endif()
|
|
29
|
+
|
|
30
|
+
if(ARG_MODULE_NAME)
|
|
31
|
+
# the library name must be the same as the module name
|
|
32
|
+
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${ARG_MODULE_NAME})
|
|
33
|
+
target_compile_definitions(${target_name}
|
|
34
|
+
PRIVATE MQT_${package_name}_MODULE_NAME=${ARG_MODULE_NAME})
|
|
35
|
+
else()
|
|
36
|
+
# use the target name as the module name
|
|
37
|
+
target_compile_definitions(${target_name}
|
|
38
|
+
PRIVATE MQT_${package_name}_MODULE_NAME=${target_name})
|
|
39
|
+
endif()
|
|
40
|
+
|
|
41
|
+
# add project libraries to the link libraries
|
|
42
|
+
list(APPEND ARG_LINK_LIBS MQT::ProjectOptions MQT::ProjectWarnings)
|
|
43
|
+
|
|
44
|
+
# link the required libraries
|
|
45
|
+
target_link_libraries(${target_name} PRIVATE ${ARG_LINK_LIBS})
|
|
46
|
+
|
|
47
|
+
# install directive for scikit-build-core
|
|
48
|
+
install(
|
|
49
|
+
TARGETS ${target_name}
|
|
50
|
+
DESTINATION ${ARG_INSTALL_DIR}
|
|
51
|
+
COMPONENT ${MQT_${package_name}_TARGET_NAME}_Python)
|
|
52
|
+
endfunction()
|
|
@@ -12,8 +12,8 @@ macro(PACKAGE_ADD_TEST testname linklibs)
|
|
|
12
12
|
# create an executable in which the tests will be stored
|
|
13
13
|
add_executable(${testname} ${ARGN})
|
|
14
14
|
# link the Google test infrastructure and a default main function to the test executable.
|
|
15
|
-
target_link_libraries(${testname} PRIVATE ${linklibs} gmock gtest_main
|
|
16
|
-
MQT::ProjectWarnings)
|
|
15
|
+
target_link_libraries(${testname} PRIVATE ${linklibs} GTest::gmock GTest::gtest_main
|
|
16
|
+
MQT::ProjectOptions MQT::ProjectWarnings)
|
|
17
17
|
# discover tests
|
|
18
18
|
gtest_discover_tests(
|
|
19
19
|
${testname}
|
|
@@ -28,8 +28,8 @@ macro(PACKAGE_ADD_TEST_WITH_WORKING_DIR testname linklibs test_working_directory
|
|
|
28
28
|
# create an executable in which the tests will be stored
|
|
29
29
|
add_executable(${testname} ${ARGN})
|
|
30
30
|
# link the Google test infrastructure and a default main function to the test executable.
|
|
31
|
-
target_link_libraries(${testname} PRIVATE ${linklibs} gmock gtest_main
|
|
32
|
-
MQT::ProjectWarnings)
|
|
31
|
+
target_link_libraries(${testname} PRIVATE ${linklibs} GTest::gmock GTest::gtest_main
|
|
32
|
+
MQT::ProjectOptions MQT::ProjectWarnings)
|
|
33
33
|
# discover tests
|
|
34
34
|
gtest_discover_tests(
|
|
35
35
|
${testname}
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
# The variable CVF_VERSION must be set before calling configure_file().
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
set(PACKAGE_VERSION "3.0
|
|
13
|
+
set(PACKAGE_VERSION "3.1.0")
|
|
14
14
|
|
|
15
15
|
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
|
16
16
|
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
17
17
|
else()
|
|
18
18
|
|
|
19
|
-
if("3.0
|
|
19
|
+
if("3.1.0" MATCHES "^([0-9]+)\\.([0-9]+)")
|
|
20
20
|
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
|
21
21
|
set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
|
|
22
22
|
|
|
@@ -27,7 +27,7 @@ else()
|
|
|
27
27
|
string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
|
|
28
28
|
endif()
|
|
29
29
|
else()
|
|
30
|
-
set(CVF_VERSION_MAJOR "3.0
|
|
30
|
+
set(CVF_VERSION_MAJOR "3.1.0")
|
|
31
31
|
set(CVF_VERSION_MINOR "")
|
|
32
32
|
endif()
|
|
33
33
|
|
|
@@ -37,6 +37,7 @@ if(TARGET MQT::Core)
|
|
|
37
37
|
return()
|
|
38
38
|
endif()
|
|
39
39
|
|
|
40
|
+
include("${CMAKE_CURRENT_LIST_DIR}/AddMQTPythonBinding.cmake")
|
|
40
41
|
include("${CMAKE_CURRENT_LIST_DIR}/Cache.cmake")
|
|
41
42
|
include("${CMAKE_CURRENT_LIST_DIR}/PackageAddTest.cmake")
|
|
42
43
|
include("${CMAKE_CURRENT_LIST_DIR}/PreventInSourceBuilds.cmake")
|
|
@@ -193,7 +193,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
|
|
|
193
193
|
FILE_SET "HEADERS"
|
|
194
194
|
TYPE "HEADERS"
|
|
195
195
|
BASE_DIRS "${_IMPORT_PREFIX}/include/mqt-core"
|
|
196
|
-
FILES "${_IMPORT_PREFIX}/include/mqt-core/dd/CachedEdge.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Complex.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComplexNumbers.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComplexValue.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComputeTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DDDefinitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DDpackageConfig.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DensityNoiseTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Edge.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Export.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/FunctionalityConstruction.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/GateMatrixDefinitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/LinkedListBase.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/MemoryManager.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Node.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/NoiseFunctionality.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Operations.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Package.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Package_fwd.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/RealNumber.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/RealNumberUniqueTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Simulation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/StochasticNoiseOperationTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/UnaryComputeTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/UniqueTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/mqt_core_dd_export.h" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/MemoryManagerStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/PackageStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/Statistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/TableStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp"
|
|
196
|
+
FILES "${_IMPORT_PREFIX}/include/mqt-core/dd/Approximation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/CachedEdge.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Complex.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComplexNumbers.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComplexValue.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/ComputeTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DDDefinitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DDpackageConfig.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/DensityNoiseTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Edge.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Export.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/FunctionalityConstruction.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/GateMatrixDefinitions.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/LinkedListBase.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/MemoryManager.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Node.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/NoiseFunctionality.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Operations.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Package.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Package_fwd.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/RealNumber.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/RealNumberUniqueTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/Simulation.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/StateGeneration.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/StochasticNoiseOperationTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/UnaryComputeTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/UniqueTable.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/mqt_core_dd_export.h" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/MemoryManagerStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/PackageStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/Statistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/TableStatistics.hpp" "${_IMPORT_PREFIX}/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp"
|
|
197
197
|
)
|
|
198
198
|
else()
|
|
199
199
|
set_property(TARGET MQT::CoreDD
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Version: 1.10.1
|
|
2
|
+
Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-horcz0kp\\cp39-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-horcz0kp\\cp39-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-horcz0kp\\cp39-win_amd64\\built_wheel\\mqt_core-3.1.0-cp39-cp39-win_amd64.whl', '--namespace-pkg', 'mqt', '--ignore-existing']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mqt-core
|
|
3
|
-
Version: 3.0
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: The Backbone of the Munich Quantum Toolkit
|
|
5
5
|
Keywords: MQT,quantum-computing,design-automation,decision-diagrams,zx-calculus
|
|
6
6
|
Author-Email: Lukas Burgholzer <burgholzer@me.com>
|
|
@@ -22,10 +22,12 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
23
|
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
24
24
|
Classifier: Typing :: Typed
|
|
25
|
-
Project-URL: Homepage, https://github.com/
|
|
25
|
+
Project-URL: Homepage, https://github.com/munich-quantum-toolkit/core
|
|
26
|
+
Project-URL: Changelog, https://github.com/munich-quantum-toolkit/core/blob/main/CHANGELOG.md
|
|
26
27
|
Project-URL: Documentation, https://mqt.readthedocs.io/projects/core
|
|
27
|
-
Project-URL: Issues, https://github.com/
|
|
28
|
-
Project-URL: Discussions, https://github.com/
|
|
28
|
+
Project-URL: Issues, https://github.com/munich-quantum-toolkit/core/issues
|
|
29
|
+
Project-URL: Discussions, https://github.com/munich-quantum-toolkit/core/discussions
|
|
30
|
+
Project-URL: PyPI, https://pypi.org/project/mqt-core/
|
|
29
31
|
Requires-Python: >=3.9
|
|
30
32
|
Provides-Extra: evaluation
|
|
31
33
|
Requires-Dist: pandas[output-formatting]>=2.1.2; extra == "evaluation"
|
|
@@ -36,6 +38,7 @@ Description-Content-Type: text/markdown
|
|
|
36
38
|
[](https://pypi.org/project/mqt.core/)
|
|
37
39
|

|
|
38
40
|
[](https://opensource.org/licenses/MIT)
|
|
41
|
+
[](https://doi.org/10.21105/joss.07478)
|
|
39
42
|
[](https://github.com/munich-quantum-toolkit/core/actions/workflows/ci.yml)
|
|
40
43
|
[](https://github.com/munich-quantum-toolkit/core/actions/workflows/cd.yml)
|
|
41
44
|
[](https://mqt.readthedocs.io/projects/core)
|
|
@@ -44,16 +47,15 @@ Description-Content-Type: text/markdown
|
|
|
44
47
|
<p align="center">
|
|
45
48
|
<a href="https://mqt.readthedocs.io">
|
|
46
49
|
<picture>
|
|
47
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-
|
|
48
|
-
<img src="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-
|
|
50
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/logo-mqt-dark.svg" width="60%">
|
|
51
|
+
<img src="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/logo-mqt-light.svg" width="60%" alt="MQT Logo">
|
|
49
52
|
</picture>
|
|
50
53
|
</a>
|
|
51
54
|
</p>
|
|
52
55
|
|
|
53
56
|
# MQT Core - The Backbone of the Munich Quantum Toolkit (MQT)
|
|
54
57
|
|
|
55
|
-
MQT Core is an open-source C++17 and Python library for quantum computing that forms the backbone of the quantum software tools developed as part of the [_Munich Quantum Toolkit (MQT)_](https://mqt.readthedocs.io)
|
|
56
|
-
To this end, it consists of multiple components that are used throughout the MQT, including a fully fledged intermediate representation (IR) for quantum computations, a state-of-the-art decision diagram (DD) package for quantum computing, and a dedicated ZX-diagram package for working with the ZX-calculus.
|
|
58
|
+
MQT Core is an open-source C++17 and Python library for quantum computing that forms the backbone of the quantum software tools developed as part of the [_Munich Quantum Toolkit (MQT)_](https://mqt.readthedocs.io).
|
|
57
59
|
|
|
58
60
|
<p align="center">
|
|
59
61
|
<a href="https://mqt.readthedocs.io/projects/core">
|
|
@@ -61,8 +63,34 @@ To this end, it consists of multiple components that are used throughout the MQT
|
|
|
61
63
|
</a>
|
|
62
64
|
</p>
|
|
63
65
|
|
|
66
|
+
## Key Features
|
|
67
|
+
|
|
68
|
+
- Fully fledged intermediate representation (IR) for quantum computations.
|
|
69
|
+
- A state-of-the-art decision diagram (DD) package for quantum computing.
|
|
70
|
+
- A dedicated ZX-diagram package for working with the ZX-calculus.
|
|
71
|
+
|
|
64
72
|
If you have any questions, feel free to create a [discussion](https://github.com/munich-quantum-toolkit/core/discussions) or an [issue](https://github.com/munich-quantum-toolkit/core/issues) on [GitHub](https://github.com/munich-quantum-toolkit/core).
|
|
65
73
|
|
|
74
|
+
## Contributors and Supporters
|
|
75
|
+
|
|
76
|
+
The _[Munich Quantum Toolkit (MQT)](https://mqt.readthedocs.io)_ is developed by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/) and supported by the [Munich Quantum Software Company (MQSC)](https://munichquantum.software).
|
|
77
|
+
Among others, it is part of the [Munich Quantum Software Stack (MQSS)](https://www.munich-quantum-valley.de/research/research-areas/mqss) ecosystem, which is being developed as part of the [Munich Quantum Valley (MQV)](https://www.munich-quantum-valley.de) initiative.
|
|
78
|
+
|
|
79
|
+
<p align="center">
|
|
80
|
+
<picture>
|
|
81
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-logo-banner-dark.svg" width="90%">
|
|
82
|
+
<img src="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-logo-banner-light.svg" width="90%" alt="MQT Partner Logos">
|
|
83
|
+
</picture>
|
|
84
|
+
</p>
|
|
85
|
+
|
|
86
|
+
Thank you to all the contributors who have helped make MQT Core a reality!
|
|
87
|
+
|
|
88
|
+
<p align="center">
|
|
89
|
+
<a href="https://github.com/munich-quantum-toolkit/core/graphs/contributors">
|
|
90
|
+
<img src="https://contrib.rocks/image?repo=munich-quantum-toolkit/core" />
|
|
91
|
+
</a>
|
|
92
|
+
</p>
|
|
93
|
+
|
|
66
94
|
## Getting Started
|
|
67
95
|
|
|
68
96
|
`mqt.core` is available via [PyPI](https://pypi.org/project/mqt.core/) for all major operating systems and supports Python 3.9 to 3.13.
|
|
@@ -104,7 +132,24 @@ It is recommended (although not required) to have [GraphViz](https://www.graphvi
|
|
|
104
132
|
|
|
105
133
|
If you want to use the ZX library, it is recommended (although not strictly necessary) to have [GMP](https://gmplib.org/) installed in your system.
|
|
106
134
|
|
|
107
|
-
|
|
135
|
+
## Cite This
|
|
136
|
+
|
|
137
|
+
If you want to cite MQT Core, please use the following BibTeX entry:
|
|
138
|
+
|
|
139
|
+
```bibtex
|
|
140
|
+
@article{burgholzer2025MQTCore,
|
|
141
|
+
title = {{{MQT Core}}: {{The}} Backbone of the {{Munich Quantum Toolkit (MQT)}}},
|
|
142
|
+
author = {Lukas Burgholzer and Yannick Stade and Tom Peham and Robert Wille},
|
|
143
|
+
year = {2025},
|
|
144
|
+
journal = {Journal of Open Source Software},
|
|
145
|
+
publisher = {The Open Journal},
|
|
146
|
+
volume = {10},
|
|
147
|
+
number = {108},
|
|
148
|
+
pages = {7478},
|
|
149
|
+
doi = {10.21105/joss.07478},
|
|
150
|
+
url = {https://doi.org/10.21105/joss.07478},
|
|
151
|
+
}
|
|
152
|
+
```
|
|
108
153
|
|
|
109
154
|
---
|
|
110
155
|
|