Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
c20a742
✨ Add max filling factor
ystade Nov 27, 2025
1620370
✅ Add test for added behaviour
ystade Nov 27, 2025
ec0d8e8
Apply suggestions from code review
ystade Nov 27, 2025
c69f26e
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 27, 2025
0252833
🎨 Remove leftover
ystade Nov 27, 2025
c94ac78
🎨 Fix missing parking offset
ystade Nov 27, 2025
5ee5b7c
🎨 Fix type conversion bug on windows
ystade Nov 28, 2025
708d11d
✅ Increase test coverage
ystade Nov 28, 2025
6dfb970
Merge branch 'main' into ystade/max-filling-factor
ystade Nov 28, 2025
a8c042c
📝 Add changelog entry
ystade Nov 28, 2025
61688dd
✨ Enable relaxed rearrangements in code-generator
ystade Nov 28, 2025
77e2fbc
✅ Adapt tests
ystade Nov 28, 2025
9a05354
✅ Fix tests
ystade Nov 28, 2025
03d2c8c
💚 Fix clang-tidy warnings
ystade Nov 28, 2025
064eef4
🐛 Fix compilation bug on old mac OS
ystade Nov 28, 2025
aad203b
✅ Try increase test coverage
ystade Nov 28, 2025
4936455
🐛 Fix bug
ystade Dec 1, 2025
97c60a5
🐛 Fix missing constructor bug
ystade Dec 1, 2025
fc8a2d9
🐛 Fix logical bug
ystade Dec 1, 2025
40c596f
✅ Add test for better coverage
ystade Dec 1, 2025
068f659
Merge remote-tracking branch 'origin/main' into ystade/relaxed-code-g…
ystade Dec 1, 2025
3e7c7bc
🎨 Some fixes/improvements
ystade Dec 1, 2025
1353fc4
📝 Update changelog
ystade Dec 1, 2025
4890a6d
🎨 Fix enumerate for rvalues
ystade Dec 3, 2025
a7e891c
🎨 Add Upgrading note
ystade Dec 3, 2025
18ef464
🎨 Implement relaxed router
ystade Dec 3, 2025
5fceb33
Merge remote-tracking branch 'origin/main' into ystade/relaxed-router
ystade Dec 3, 2025
16ec923
🎨 Remove references from chrono variable
ystade Dec 4, 2025
2d46808
📝 Add docstrings
ystade Dec 4, 2025
1740419
📝 Add docstring
ystade Dec 4, 2025
362bee6
🎨 Make function static
ystade Dec 4, 2025
9575f66
🎨 More readable alternative
ystade Dec 4, 2025
c4e58a9
📝 Add addtional comment
ystade Dec 4, 2025
00a4121
🔧 Add missing config option
ystade Dec 4, 2025
1eac09f
🎨 Improve platform compatibility
ystade Dec 4, 2025
85212ba
🎨 Add override annotations
ystade Dec 5, 2025
d19af9a
🎨 Fix minor bug
ystade Dec 5, 2025
272c0d2
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 5, 2025
77ebe3b
🚚 Rename AStarPlacer to HeuristicPlacer
ystade Dec 5, 2025
f5607f6
🚚 Update header to combine astar and ids placer
ystade Dec 5, 2025
cc9b214
🎨 Update HeuristicPlacer.cpp
ystade Dec 5, 2025
013801f
📝 Refine docstring
ystade Dec 5, 2025
b80464f
📝 Correct docstring
ystade Dec 5, 2025
4b440b8
📝 Fix comment
ystade Dec 5, 2025
e5db010
Merge remote-tracking branch 'origin/main' into ystade/relaxed-router
ystade Dec 5, 2025
98d1bd0
🎨 Combine both routers
ystade Dec 5, 2025
a9f018d
🎨 Adapt test suite and fix bugs
ystade Dec 5, 2025
309194a
🎨 Fix docstring
ystade Dec 5, 2025
7e5feaf
🎨 Fix strict router
ystade Dec 5, 2025
ba19512
🎨 Fix json parsing
ystade Dec 5, 2025
f722105
🎨 Expose routing method
ystade Dec 5, 2025
b1379bd
🎨 Adopt python inteface file
ystade Dec 5, 2025
3edebd7
💚 Add missing header
ystade Dec 5, 2025
e649e18
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 5, 2025
acdfa87
🎨 Add serialization for placement method
ystade Dec 5, 2025
703f9c9
🎨 Expose placement method
ystade Dec 5, 2025
b70c807
🎨 Adopt python interface
ystade Dec 5, 2025
dfc8370
🎨 Adopting the tests and fixing minor bugs
ystade Dec 5, 2025
de7ef5e
📝 Fix docstrings
ystade Dec 5, 2025
b556d1b
🎨 Refactor code
ystade Dec 5, 2025
2b53107
📝 Update changelog
ystade Dec 5, 2025
17fbb32
📝 Make docstring more comprehensible
ystade Dec 5, 2025
41eb559
📝 Fix changelog
ystade Dec 5, 2025
a4f4695
✅ Fix a star test
ystade Dec 5, 2025
5f07b8d
🎨 Avoid overflow
ystade Dec 5, 2025
d0aba74
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 5, 2025
e80dcf0
🎨 Move templated function to header
ystade Dec 5, 2025
b37d570
🐛 Fix placement method
ystade Dec 5, 2025
4684fb1
🎨 Split routing function
ystade Dec 5, 2025
6f4b011
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 5, 2025
a39d267
🎨 Fix parsing
ystade Dec 5, 2025
f3e4399
⚡️ Micro optimization
ystade Dec 6, 2025
342b89d
💚 Add missing headers
ystade Dec 6, 2025
a102c6b
📝 Make docstrings more precise
ystade Dec 6, 2025
b617658
📝 Mention preferSPlit parameter
ystade Dec 6, 2025
837b393
⚡️ Improve performance
ystade Dec 6, 2025
d35f58d
📝 Provide defaults andd improve docstring
ystade Dec 6, 2025
d301fd3
📝 Improve docstring
ystade Dec 6, 2025
3b7c22c
Merge branch 'main' into ystade/relaxed-router
ystade Dec 6, 2025
039797b
🐛 Fix docstring and ordering of atoms to route
ystade Dec 6, 2025
01fee79
Merge remote-tracking branch 'origin/main' into ystade/relaxed-router
ystade Dec 6, 2025
a9274c7
📝 Improve docstrings
ystade Dec 8, 2025
1de1a75
Merge remote-tracking branch 'origin/main' into ystade/relaxed-router
ystade Dec 8, 2025
8144152
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 8, 2025
4b82679
🐛 Fix mac os 14 build
ystade Dec 8, 2025
a72dafe
🎨 Remove superfluous capture
ystade Dec 8, 2025
fb88af1
🎨 Micro opt
ystade Dec 8, 2025
7765014
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 8, 2025
a3358ed
🎨 Apply suggestions from code review
ystade Dec 9, 2025
24cd390
🎨 Apply suggestions from code review
ystade Dec 9, 2025
37006fa
🎨 Remove leftovers from parking_offset
ystade Dec 9, 2025
122fe45
🎨 Expose prefer_split
ystade Dec 9, 2025
7389950
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 10, 2025
9a447cb
🎨 Expose trials and queueCapacity
ystade Dec 9, 2025
ff1bb53
🐛 Fix pyi file
ystade Dec 11, 2025
fd4cbf4
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 11, 2025
ab6e623
🐛 Fix queue capacity parameter
ystade Dec 11, 2025
ac91302
🎨 Apply coderabbit's suggestion
ystade Dec 11, 2025
0b02d53
📝 Improve docstring
ystade Dec 11, 2025
99a30ed
Merge remote-tracking branch 'origin/main' into ystade/relaxed-router
ystade Dec 11, 2025
747195e
Revert "🎨 Apply coderabbit's suggestion"
ystade Dec 11, 2025
3d9a446
🎨 Apply coderabbit's suggestion
ystade Dec 11, 2025
18dfdcf
📝 Improve docstring
ystade Dec 11, 2025
7452910
👷 Update C++ test matrices (#874)
denialhaag Dec 11, 2025
b1d8928
📝 Update Changelog
ystade Dec 11, 2025
ae01d18
Revert "🎨 Apply coderabbit's suggestion"
ystade Dec 11, 2025
add9662
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 11, 2025
f04b572
🐛 Fix pyi
ystade Dec 11, 2025
c9546bd
🚚 Rename variable for clarity
ystade Dec 11, 2025
ff5b920
Merge branch 'ystade/relaxed-router' into ystade/ids-placer
ystade Dec 11, 2025
542b452
Merge remote-tracking branch 'origin/main' into ystade/ids-placer
ystade Dec 11, 2025
17176b0
📝 Improve docstring
ystade Dec 12, 2025
fd4c837
⚡️ Implement contract
ystade Dec 12, 2025
1bef6f9
🎨 Apply suggestions from code review
ystade Dec 12, 2025
0061553
🎨 Enforce positive maxNodes param
ystade Dec 12, 2025
5d6b057
📝 Apply suggestions from code review
ystade Dec 12, 2025
d42f80b
⬆️ Upgrade networkx
ystade Dec 13, 2025
aea1fe0
🎨 pre-commit fixes
pre-commit-ci[bot] Dec 13, 2025
825e3e2
🎨 Remove other places where python 3.10 occurs
ystade Dec 13, 2025
e0e12f4
Merge remote-tracking branch 'origin/main' into ystade/ids-placer
ystade Dec 13, 2025
58e1a01
Revert "🎨 Remove other places where python 3.10 occurs"
ystade Dec 13, 2025
e10eb24
Revert "🎨 pre-commit fixes"
ystade Dec 13, 2025
a804780
Revert "⬆️ Upgrade networkx"
ystade Dec 13, 2025
144e208
🎨 Upgrade networkx for Python >0 3.14
ystade Dec 13, 2025
9190ba1
🐛 Improve docstrings fix bug in priority queue
ystade Dec 13, 2025
42d7ad3
🐛 Fix pyproject.toml
ystade Dec 13, 2025
ca53526
📝 Fix docstring for heuristic placer configuration
burgholzer Dec 13, 2025
345d4ac
🐛 Simplify networkx dependencies and blacklist Python 3.14.1
burgholzer Dec 13, 2025
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ _If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md#unreleased)._

### Added

- ✨ Add iterative diving search as a more efficient placement heuristic method ([#862]) ([**@ystade**])
- ✨ Add relaxed routing method to the zoned neutral atom compiler ([#859]) ([**@ystade**])

### Changed
Expand Down Expand Up @@ -173,6 +174,7 @@ _📚 Refer to the [GitHub Release Notes] for previous changelogs._
<!-- PR links -->

[#874]: https://github.com/munich-quantum-toolkit/qmap/pull/874
[#862]: https://github.com/munich-quantum-toolkit/qmap/pull/862
[#859]: https://github.com/munich-quantum-toolkit/qmap/pull/859
[#848]: https://github.com/munich-quantum-toolkit/qmap/pull/848
[#847]: https://github.com/munich-quantum-toolkit/qmap/pull/847
Expand Down
86 changes: 54 additions & 32 deletions bindings/na/zoned/zoned.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "na/zoned/Compiler.hpp"
#include "na/zoned/code_generator/CodeGenerator.hpp"
#include "na/zoned/layout_synthesizer/PlaceAndRouteSynthesizer.hpp"
#include "na/zoned/layout_synthesizer/placer/AStarPlacer.hpp"
#include "na/zoned/layout_synthesizer/placer/HeuristicPlacer.hpp"
#include "na/zoned/layout_synthesizer/placer/VertexMatchingPlacer.hpp"
#include "na/zoned/layout_synthesizer/router/IndependentSetRouter.hpp"

Expand Down Expand Up @@ -53,6 +53,16 @@ PYBIND11_MODULE(MQT_QMAP_MODULE_NAME, m, py::mod_gil_not_used()) {
return self.exportNAVizMachine();
});

//===--------------------------------------------------------------------===//
// Placement Method Enum
//===--------------------------------------------------------------------===//
py::native_enum<na::zoned::HeuristicPlacer::Config::Method>(
m, "PlacementMethod", "enum.Enum")
.value("astar", na::zoned::HeuristicPlacer::Config::Method::ASTAR)
.value("ids", na::zoned::HeuristicPlacer::Config::Method::IDS)
.export_values()
.finalize();

//===--------------------------------------------------------------------===//
// Routing Method Enum
//===--------------------------------------------------------------------===//
Expand Down Expand Up @@ -140,37 +150,44 @@ PYBIND11_MODULE(MQT_QMAP_MODULE_NAME, m, py::mod_gil_not_used()) {
{
const na::zoned::RoutingAwareCompiler::Config defaultConfig;
routingAwareCompiler.def(
py::init([](const na::zoned::Architecture& arch,
const std::string& logLevel, const double maxFillingFactor,
const bool useWindow, const size_t windowMinWidth,
const double windowRatio, const double windowShare,
const float deepeningFactor, const float deepeningValue,
const float lookaheadFactor, const float reuseLevel,
const size_t maxNodes,
const na::zoned::IndependentSetRouter::Config::Method
routingMethod,
const double preferSplit, const bool warnUnsupportedGates)
-> na::zoned::RoutingAwareCompiler {
na::zoned::RoutingAwareCompiler::Config config;
config.logLevel = spdlog::level::from_str(logLevel);
config.schedulerConfig.maxFillingFactor = maxFillingFactor;
config.layoutSynthesizerConfig.placerConfig = {
.useWindow = useWindow,
.windowMinWidth = windowMinWidth,
.windowRatio = windowRatio,
.windowShare = windowShare,
.deepeningFactor = deepeningFactor,
.deepeningValue = deepeningValue,
.lookaheadFactor = lookaheadFactor,
.reuseLevel = reuseLevel,
.maxNodes = maxNodes,
};
config.layoutSynthesizerConfig.routerConfig = {
.method = routingMethod, .preferSplit = preferSplit};
config.codeGeneratorConfig = {.warnUnsupportedGates =
warnUnsupportedGates};
return {arch, config};
}),
py::init(
[](const na::zoned::Architecture& arch, const std::string& logLevel,
const double maxFillingFactor, 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::RoutingAwareCompiler {
na::zoned::RoutingAwareCompiler::Config config;
config.logLevel = spdlog::level::from_str(logLevel);
config.schedulerConfig.maxFillingFactor = maxFillingFactor;

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};
return {arch, config};
}),
py::keep_alive<1, 2>(), "arch"_a,
"log_level"_a = spdlog::level::to_short_c_str(defaultConfig.logLevel),
"max_filling_factor"_a = defaultConfig.schedulerConfig.maxFillingFactor,
Expand All @@ -182,6 +199,8 @@ PYBIND11_MODULE(MQT_QMAP_MODULE_NAME, m, py::mod_gil_not_used()) {
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 =
Expand All @@ -192,6 +211,9 @@ PYBIND11_MODULE(MQT_QMAP_MODULE_NAME, m, py::mod_gil_not_used()) {
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 =
Expand Down
4 changes: 2 additions & 2 deletions include/na/zoned/Compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "ir/QuantumComputation.hpp"
#include "ir/operations/Operation.hpp"
#include "layout_synthesizer/PlaceAndRouteSynthesizer.hpp"
#include "layout_synthesizer/placer/AStarPlacer.hpp"
#include "layout_synthesizer/placer/HeuristicPlacer.hpp"
#include "layout_synthesizer/placer/VertexMatchingPlacer.hpp"
#include "layout_synthesizer/router/IndependentSetRouter.hpp"
#include "na/NAComputation.hpp"
Expand Down Expand Up @@ -269,7 +269,7 @@ class RoutingAgnosticCompiler final
};

class RoutingAwareSynthesizer
: public PlaceAndRouteSynthesizer<RoutingAwareSynthesizer, AStarPlacer,
: public PlaceAndRouteSynthesizer<RoutingAwareSynthesizer, HeuristicPlacer,
IndependentSetRouter> {
public:
RoutingAwareSynthesizer(const Architecture& architecture,
Expand Down
Loading
Loading