Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
5a2d414
Combining Gates and builing combined U3 works.
cs-tum-st Jan 13, 2026
8d4bb8f
Changed internal handling of U3 gates.
cs-tum-st Jan 20, 2026
bedfeaa
Merge branch 'munich-quantum-toolkit:main' into decomposition
cs-tum-st Jan 20, 2026
75caf7b
Changed
cs-tum-st Jan 22, 2026
9134d22
Added more Tests
cs-tum-st Jan 27, 2026
8c75e53
Merge branch 'main' into decomposition
ystade Jan 28, 2026
1344160
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 28, 2026
802b829
🎨 Adjust to naming convention
ystade Jan 28, 2026
20c47a9
🎨 Rename to NativeGateDecomposer and include in Compiler
ystade Jan 28, 2026
8fac867
🎨 Fix newly introduced bugs
ystade Jan 28, 2026
59fcb5e
🎨 Add nQubits to decompose interface and fix resulting bugs
ystade Jan 28, 2026
8933446
🎨 Improve docstring
ystade Jan 28, 2026
2931f5d
🎨 Improve docstrings
ystade Jan 28, 2026
b789b03
Fixed errors translating gates into Quaternions
cs-tum-st Feb 3, 2026
f93ed5e
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 3, 2026
b5c499d
Fixed errors translating gates into Quaternions
cs-tum-st Feb 5, 2026
d1bf227
Merge remote-tracking branch 'origin/decomposition' into decomposition
cs-tum-st Feb 5, 2026
31e85de
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 5, 2026
371ff1f
Adressed an outdated Test and some signed/unsigned type issues
cs-tum-st Feb 7, 2026
a4421de
Merge remote-tracking branch 'origin/decomposition' into decomposition
cs-tum-st Feb 7, 2026
3092711
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 7, 2026
fe4e45c
switched abs with fabs
cs-tum-st Feb 7, 2026
2302213
switched abs with fabs
cs-tum-st Feb 7, 2026
9504e59
Merge remote-tracking branch 'origin/decomposition' into decomposition
cs-tum-st Feb 7, 2026
5879e7f
made some changes to pushing decomposed operations into layers
cs-tum-st Feb 9, 2026
ebe3904
made some changes to pushing decomposed operations into layers
cs-tum-st Feb 9, 2026
0f0d429
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 9, 2026
5eaaa45
Merge remote-tracking branch 'origin/decomposition' into decomposition
cs-tum-st Feb 9, 2026
4873706
Merge branch 'main' into decomposition
cs-tum-st Feb 9, 2026
844e78c
minor comment change
cs-tum-st Feb 9, 2026
837e08f
Merge remote-tracking branch 'origin/decomposition' into decomposition
cs-tum-st Feb 9, 2026
0b2de5a
added check for empty target vector in operation
cs-tum-st Feb 16, 2026
b9e34ca
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 16, 2026
48accfa
Merge branch 'main' into decomposition
cs-tum-st Feb 16, 2026
cdaf880
Coverage Tests added
cs-tum-st Feb 27, 2026
2f96f6e
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 27, 2026
49386a5
Small fixes
cs-tum-st Mar 4, 2026
a3f5ac3
Small fixes
cs-tum-st Mar 4, 2026
396036e
Merge remote-tracking branch 'origin/decomposition' into decomposition
cs-tum-st Mar 4, 2026
c048044
Combining Gates and builing combined U3 works.
cs-tum-st Jan 13, 2026
4c2e71f
Changed internal handling of U3 gates.
cs-tum-st Jan 20, 2026
d45825b
Changed
cs-tum-st Jan 22, 2026
a5df7ff
Added more Tests
cs-tum-st Jan 27, 2026
5abc59a
⬆️🪝 Update patch versions (#917)
renovate[bot] Jan 24, 2026
0cf313f
♻️ Auto-generate stub files (#916)
denialhaag Jan 25, 2026
64a154a
⬆️🔒️ Lock file maintenance (#919)
renovate[bot] Jan 26, 2026
604bc22
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 28, 2026
78041d9
🎨 Adjust to naming convention
ystade Jan 28, 2026
f8c962b
🎨 Rename to NativeGateDecomposer and include in Compiler
ystade Jan 28, 2026
12ced4c
🎨 Fix newly introduced bugs
ystade Jan 28, 2026
e08023b
🎨 Add nQubits to decompose interface and fix resulting bugs
ystade Jan 28, 2026
21e7c6c
🎨 Improve docstring
ystade Jan 28, 2026
f1b778e
🎨 Improve docstrings
ystade Jan 28, 2026
ca6f971
Fixed errors translating gates into Quaternions
cs-tum-st Feb 3, 2026
f1e211c
Fixed errors translating gates into Quaternions
cs-tum-st Feb 5, 2026
accf727
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 3, 2026
917ae75
Adressed an outdated Test and some signed/unsigned type issues
cs-tum-st Feb 7, 2026
49136f1
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 5, 2026
a42674e
switched abs with fabs
cs-tum-st Feb 7, 2026
dfc4030
switched abs with fabs
cs-tum-st Feb 7, 2026
1047c35
made some changes to pushing decomposed operations into layers
cs-tum-st Feb 9, 2026
96b84f9
made some changes to pushing decomposed operations into layers
cs-tum-st Feb 9, 2026
9fefb28
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 9, 2026
abf5564
minor comment change
cs-tum-st Feb 9, 2026
5710c28
⬆️ Update `prek` checks (#925)
denialhaag Feb 2, 2026
6a30a7c
⬆️🔒️ Lock file maintenance (#926)
renovate[bot] Feb 2, 2026
7d1d343
⬆️🪝 Update patch versions (#922)
renovate[bot] Feb 2, 2026
5961eec
⬆️ Update `munich-quantum-toolkit/core` (#924)
mqt-app[bot] Feb 2, 2026
7ab6b3b
⬆️🪝 Update pre-commit hook astral-sh/ruff-pre-commit to v0.15.0 (#929)
renovate[bot] Feb 7, 2026
5b53957
⬆️🐍 Update dependency ty to v0.0.15 (#927)
renovate[bot] Feb 7, 2026
93ec973
⬆️🪝 Update pre-commit hook astral-sh/uv-pre-commit to v0.10.0 (#930)
renovate[bot] Feb 8, 2026
18b3c20
⬆️🔒️ Lock file maintenance (#931)
renovate[bot] Feb 9, 2026
fd46fef
added check for empty target vector in operation
cs-tum-st Feb 16, 2026
0f93636
🎨 pre-commit fixes
pre-commit-ci[bot] Feb 16, 2026
3100f6f
⬆️🪝 Update pre-commit hook adhtruong/mirrors-typos to v1.43.2 (#928)
renovate[bot] Feb 10, 2026
4189f4b
Bump pillow from 12.1.0 to 12.1.1 in the uv group across 1 directory …
dependabot[bot] Feb 11, 2026
b79673b
⬆️🪝 Update pre-commit hook henryiii/validate-pyproject-schema-store t…
renovate[bot] Feb 15, 2026
9e51b68
⬆️🔒️ Lock file maintenance (#935)
renovate[bot] Feb 16, 2026
9a96db8
Coverage Tests added
cs-tum-st Feb 27, 2026
c2700b5
Small fixes
cs-tum-st Mar 4, 2026
20d0b6a
Copy elison fix
cs-tum-st Mar 10, 2026
8c474ba
First impl preprocessing & Dag creation
cs-tum-st Mar 16, 2026
1eb1e15
More impl
cs-tum-st Mar 30, 2026
2e7cb4f
More impl
cs-tum-st Apr 4, 2026
6840edf
Decomposer Version of the Scheduler
cs-tum-st Apr 7, 2026
c61492a
Decomposer Version of the Scheduler
cs-tum-st Apr 7, 2026
261d508
Intriduced Variants instead of unique pointers:
cs-tum-st Apr 10, 2026
67549b8
Compiler fix and new test
cs-tum-st Apr 13, 2026
7824125
TESTS and FIxes
cs-tum-st Apr 14, 2026
bf0d6c6
TESTS and FIxes
cs-tum-st Apr 16, 2026
cf1c399
🎨 Update Python bindings
ystade Apr 17, 2026
38bdc9b
🎨 Update interface
ystade Apr 17, 2026
df150e7
🎨 Add script for native gate compiler
ystade Apr 17, 2026
8cbf07b
TESTS and FIxes
cs-tum-st Apr 19, 2026
42f1c71
Merge pull request #1 from munich-quantum-toolkit/caro/native-gate-de…
cs-tum-st Apr 19, 2026
973031b
➖ Only have NA compiler in python build
ystade Apr 20, 2026
c461f7b
Merge pull request #2 from munich-quantum-toolkit/caro/native-gate-de…
cs-tum-st Apr 20, 2026
0c4e79a
🎨 COmment out subdirs
ystade Apr 23, 2026
2cf6547
🎨 Fix cmake
ystade Apr 23, 2026
786aef6
🎨 Add bindings
ystade Apr 23, 2026
43f3d96
Merge pull request #3 from munich-quantum-toolkit/caro/native-gate-de…
cs-tum-st Apr 23, 2026
ee20ff0
Eval Script changes to remove need for z3 and add AxialDecomposer
cs-tum-st Apr 27, 2026
d80d412
🎨 Fix warning
ystade Apr 27, 2026
f801cb7
🎨 Fix bindings
ystade Apr 27, 2026
4813aeb
Merge pull request #4 from munich-quantum-toolkit/caro/native-gate-de…
cs-tum-st Apr 27, 2026
eca1016
Small change to the Decomposers to avoid adding global rotations by 0…
cs-tum-st Apr 28, 2026
69b47a3
🐛 Fix binding
ystade Apr 29, 2026
f7f7ae9
🎨 Looking for bug
ystade Apr 30, 2026
8fb3e32
Merge pull request #5 from munich-quantum-toolkit/caro/native-gate-de…
cs-tum-st Apr 30, 2026
4a9398d
Small fix in theta opt scheduler&Compiler
cs-tum-st Apr 30, 2026
8e08a70
Changed shortest path to cheapest path to allow for last layer 2QGL's…
cs-tum-st Apr 30, 2026
83a3253
chnage to proper layers in compiler
cs-tum-st Apr 30, 2026
a6ed950
Added memo element to recursive function looking for path
cs-tum-st May 1, 2026
24ffd9d
Axial- unneeded
cs-tum-st May 29, 2026
8aecd2a
Merge branch 'main' into fiona/native-gate-decomposer
ystade Jun 25, 2026
d17021b
⏪️ Revert cmake setup
ystade Jun 25, 2026
cba8d5b
🎨 pre-commit fixes
pre-commit-ci[bot] Jun 25, 2026
127f331
🎨 Update evaluation script
ystade Jun 25, 2026
9736ee3
🎨 Remove unnecessary binding from interface file and update docs
ystade Jun 25, 2026
28d6e0c
♻️ Recover bindings code
ystade Jun 25, 2026
39fa2bb
🎨 Remove unnecessary bindings code and align interfaces
ystade Jun 25, 2026
5bb67d4
🔥 Delete axial compiler
ystade Jun 25, 2026
2fd31a1
♻️ Restore NoOpDecomposer
ystade Jun 25, 2026
6ee449f
🐛 Fix
ystade Jun 25, 2026
003631a
🐛 Fix interface
ystade Jun 25, 2026
52b1cd4
🎨 First pass through native gate decomposer
ystade Jun 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions bindings/na/register_zoned.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,169 @@ void registerZoned(nb::module_& m) {
},
R"pb(Get the statistics of the last compilation.

Returns:
The statistics as a dictionary)pb");

//===--------------------------------------------------------------------===//
// Routing-aware Native Gate Compiler
//===--------------------------------------------------------------------===//
nb::class_<na::zoned::RoutingAwareNativeGateCompiler>
routingAwareNativeGateCompiler(
m, "RoutingAwareNativeGateCompiler",
"Routing-aware native gate zoned neutral atom compiler.");
{
const na::zoned::RoutingAwareNativeGateCompiler::Config defaultConfig;
routingAwareNativeGateCompiler.def(
"__init__",
[](na::zoned::RoutingAwareNativeGateCompiler* self,
const na::zoned::Architecture& arch, const std::string& logLevel,
const double maxFillingFactor, const bool thetaOptSchedule,
const bool checkFinalCond, const bool useWindow,
const size_t windowMinWidth, const double windowRatio,
const double windowShare,
const na::zoned::HeuristicPlacer::Config::Method placementMethod,
const float deepeningFactor, const float deepeningValue,
const float lookaheadFactor, const float reuseLevel,
const size_t maxNodes, const size_t trials,
const size_t queueCapacity,
const na::zoned::IndependentSetRouter::Config::Method routingMethod,
const double preferSplit, const bool warnUnsupportedGates) {
na::zoned::RoutingAwareNativeGateCompiler::Config config;
config.logLevel = spdlog::level::from_str(logLevel);
config.schedulerConfig.maxFillingFactor = maxFillingFactor;
config.decomposerConfig = {.thetaOptSchedule = thetaOptSchedule,
.checkFinalCond = checkFinalCond};
config.layoutSynthesizerConfig.placerConfig = {
.useWindow = useWindow,
.windowMinWidth = windowMinWidth,
.windowRatio = windowRatio,
.windowShare = windowShare,
.method = placementMethod,
.deepeningFactor = deepeningFactor,
.deepeningValue = deepeningValue,
.lookaheadFactor = lookaheadFactor,
.reuseLevel = reuseLevel,
.maxNodes = maxNodes,
.trials = trials,
.queueCapacity = queueCapacity,
};
config.layoutSynthesizerConfig.routerConfig = {
.method = routingMethod, .preferSplit = preferSplit};
config.codeGeneratorConfig = {.warnUnsupportedGates =
warnUnsupportedGates};
new (self) na::zoned::RoutingAwareNativeGateCompiler{arch, config};
},
nb::keep_alive<1, 2>(), "arch"_a,
"log_level"_a = spdlog::level::to_short_c_str(defaultConfig.logLevel),
"max_filling_factor"_a = defaultConfig.schedulerConfig.maxFillingFactor,
"theta_opt_schedule"_a =
defaultConfig.decomposerConfig.thetaOptSchedule,
"check_final_cond"_a = defaultConfig.decomposerConfig.checkFinalCond,
"use_window"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.useWindow,
"window_min_width"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.windowMinWidth,
"window_ratio"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.windowRatio,
"window_share"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.windowShare,
"placement_method"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.method,
"deepening_factor"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.deepeningFactor,
"deepening_value"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.deepeningValue,
"lookahead_factor"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.lookaheadFactor,
"reuse_level"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.reuseLevel,
"max_nodes"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.maxNodes,
"trials"_a = defaultConfig.layoutSynthesizerConfig.placerConfig.trials,
"queue_capacity"_a =
defaultConfig.layoutSynthesizerConfig.placerConfig.queueCapacity,
"routing_method"_a =
defaultConfig.layoutSynthesizerConfig.routerConfig.method,
"prefer_split"_a =
defaultConfig.layoutSynthesizerConfig.routerConfig.preferSplit,
"warn_unsupported_gates"_a =
defaultConfig.codeGeneratorConfig.warnUnsupportedGates,
R"pb(Create a routing-aware native gate compiler for the given architecture and configurations.

Args:
arch: The zoned neutral atom architecture
log_level: The log level for the compiler, possible values are "debug"/"D", "info"/"I", "warning"/"W", "error"/"E", and "critical"/"C"
max_filling_factor: The maximum filling factor for the entanglement zone, i.e., it sets the limit for the maximum number of entangling gates that are scheduled in parallel
theta_opt_schedule: If this setting is turned on, a re-scheduling pass is executed immediately after translating the gates into their U3 representation. The theta optimization tries to minimize the maximum theta per layer by possibly scheduling single-qubit gates in later layers.
check_final_cond: If enabled the theta optimization checks if the sum of the resulting layer's maximum theta and the next layer's maximum theta is strictly less than the sum of previous maximum thetas. This does not guarantee that the total schedule is the one with minimal cost but reduces the recursive calls by excluding some subsets.
use_window: Whether to use a window for the placer
window_min_width: The minimum width of the window for the placer
window_ratio: The ratio between the height and the width of the window
window_share: The share of free sites in the window in relation to the number of atoms to be moved in this step
placement_method: The placement method that should be used for the heuristic placer
deepening_factor: Controls the impact of the term in the heuristic of the A* search that resembles the standard deviation of the differences between the current and target sites of the atoms to be moved in every orientation
deepening_value: Is added to the sum of standard deviations before it is multiplied with the number of unplaced nodes and :attr:`deepening_factor`
lookahead_factor: Controls the lookahead's influence that considers the distance of atoms to their interaction partner in the next layer
reuse_level: The reuse level that corresponds to the estimated extra fidelity loss due to the extra trap transfers when the atom is not reused and instead moved to the storage zone and back to the entanglement zone
max_nodes: The maximum number of nodes that are considered in the A* search.
If this number is exceeded, the search is aborted and an error is raised.
In the current implementation, one node roughly consumes 120 Byte.
Hence, allowing 50,000,000 nodes results in memory consumption of about 6 GB plus the size of the rest of the data structures.
trials: The number of restarts during IDS.
queue_capacity: The maximum capacity of the priority queue used during IDS.
routing_method: The routing method that should be used for the independent set router
prefer_split: The threshold factor for group merging decisions during routing.
warn_unsupported_gates: Whether to warn about unsupported gates in the code generator)pb");
}

routingAwareNativeGateCompiler.def_static(
"from_json_string",
[](const na::zoned::Architecture& arch,
const std::string& json) -> na::zoned::RoutingAwareNativeGateCompiler {
// The correct header <nlohmann/json.hpp> is included, but clang-tidy
// confuses it with the wrong forward header <nlohmann/json_fwd.hpp>
// NOLINTNEXTLINE(misc-include-cleaner)
return {arch, nlohmann::json::parse(json)};
},
"arch"_a, "json"_a,
R"pb(Create a compiler for the given architecture and configurations from a JSON string.

Args:
arch: The zoned neutral atom architecture
json: The JSON string

Returns:
The initialized compiler

Raises:
ValueError: If the string is not a valid JSON string)pb");

routingAwareNativeGateCompiler.def(
"compile",
[](na::zoned::RoutingAwareNativeGateCompiler& self,
const qc::QuantumComputation& qc) -> std::string {
return self.compile(qc).toString();
},
"qc"_a,
R"pb(Compile a quantum circuit for the zoned neutral atom architecture.

Args:
qc: The quantum circuit

Returns:
The compilation result as a string in the .naviz format.)pb");

routingAwareNativeGateCompiler.def(
"stats",
[](const na::zoned::RoutingAwareNativeGateCompiler& self) {
const auto json = nb::module_::import_("json");
const auto loads = json.attr("loads");
const nlohmann::json stats = self.getStatistics();
const auto dict = loads(stats.dump());
return nb::cast<nb::typed<nb::dict, nb::str, nb::float_>>(dict);
},
R"pb(Get the statistics of the last compilation.

Returns:
The statistics as a dictionary)pb");
}
Loading
Loading