-
-
Notifications
You must be signed in to change notification settings - Fork 55
✨ Improve Mapping Pass #1600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MatthiasReumann
wants to merge
69
commits into
main
Choose a base branch
from
enh/improved-layering
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
✨ Improve Mapping Pass #1600
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
f1140e1
Add "Layer" data structure
MatthiasReumann 2fad455
Add split layer logic
MatthiasReumann 391a27b
Add "fit" initial layout strategy
MatthiasReumann 336f4dc
Add partitioning
MatthiasReumann f646661
Add fullLayers to unit test
MatthiasReumann 43c5cd0
Fix Pass Option Description
MatthiasReumann 6b06f38
Update CHANGELOG..md
MatthiasReumann 15c3862
Fix linting issues
MatthiasReumann 2e2b290
Apply bunny suggestions
MatthiasReumann d1a03c0
Merge branch 'main' into enh/improved-layering
MatthiasReumann 820d9ff
Remove unused imports
MatthiasReumann 6623145
Update pass option descriptions
MatthiasReumann dfdb923
Use entry point for executability check
MatthiasReumann eaab159
Update function description
MatthiasReumann c262d5f
Merge branch 'refs/heads/main' into enh/improved-layering
burgholzer ab899f3
🎨 Reduce includes through forward declaration
burgholzer 7252d16
🔀 Fixes after merge
burgholzer c0300a0
🎨 Miscelaneous code quality optimizations
burgholzer 8f08084
Add first walkLayer draft
MatthiasReumann ad49626
Improve naming
MatthiasReumann 806fe1a
Improve walkLayer API
MatthiasReumann 54415f3
Add convienience method
MatthiasReumann 9db964d
Add function signature
MatthiasReumann 726a69b
Improve API
MatthiasReumann bce9979
Add walkCircuitGraph driver
MatthiasReumann fe191e2
Clean up functions
MatthiasReumann d3ea059
Merge branch 'main' into enh/improved-layering
MatthiasReumann ef56ec9
Use llvm::priority_queue
MatthiasReumann 3c620d4
Make tensors "work"
MatthiasReumann 1132b30
Fix tests
MatthiasReumann 8132ff7
Add walkQubitBlock and clean up a bit
MatthiasReumann f028b0a
Fix segmentation fault
MatthiasReumann 6dd34df
Fix another segmentation fault
MatthiasReumann 25ca7a3
Fix linting
MatthiasReumann a87443a
Remove mapping pass from compiler pipeline
MatthiasReumann 46e36fe
Remove layout info
MatthiasReumann fded839
Fix linting
MatthiasReumann 972fc9e
Implement partial solution A*
MatthiasReumann b1c5eb8
Final linting issues
MatthiasReumann 0cccb05
Remove enumerations
MatthiasReumann 6ef4e68
Add architecture to pass constructor
MatthiasReumann 7f24f77
Improve runtime of skipTwoQubitBlock
MatthiasReumann def22ec
Use make_filter_range and workset approach
MatthiasReumann d127c6f
Update isGoal method
MatthiasReumann 43ec985
Fix empty window bug
MatthiasReumann 6c6ff04
Try individual gate strategy
MatthiasReumann a3ea538
Implement templated route function
MatthiasReumann f22a7f3
Merge branch 'main' into enh/improved-layering
MatthiasReumann 858678f
Fix lint
MatthiasReumann 6791aec
🎨 pre-commit fixes
pre-commit-ci[bot] d42623c
Fix direction in refineLayout
MatthiasReumann a0b09c9
Add anonym namespace
MatthiasReumann 8503afa
Merge branch 'enh/improved-layering' of https://github.com/munich-qua…
MatthiasReumann fa805fc
Add two-qubit block skipping
MatthiasReumann f0a1175
Add documentation
MatthiasReumann d52d2bb
🎨 pre-commit fixes
pre-commit-ci[bot] 002ea5c
Sort window items by complexity
MatthiasReumann 9b68929
Remove sorting of windows as it didn't improve quality
MatthiasReumann ee29ee2
Merge branch 'main' into enh/improved-layering
MatthiasReumann c35db4d
🎨 pre-commit fixes
pre-commit-ci[bot] aecc320
Revert default ntrails to 4
MatthiasReumann 62dac7f
Removed unused function_ref
MatthiasReumann b4fd16f
Remove debug header
MatthiasReumann b3c8c3e
Remove debug header in Mapping.cpp
MatthiasReumann 2a60fec
Clean up code
MatthiasReumann 8a35d2e
Slightly improve placement function
MatthiasReumann 52c9be7
Apply bunny's suggestions
MatthiasReumann 093064d
Merge branch 'main' into enh/improved-layering
denialhaag 4989dfb
Fix linter errors
denialhaag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
mlir/include/mlir/Dialect/QCO/Transforms/Mapping/Mapping.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * Copyright (c) 2023 - 2026 Chair for Design Automation, TUM | ||
| * Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH | ||
| * All rights reserved. | ||
| * | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * Licensed under the MIT License | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "mlir/Dialect/QCO/Transforms/Passes.h" | ||
|
|
||
| #include <llvm/Support/LogicalResult.h> | ||
| #include <mlir/IR/Region.h> | ||
| #include <mlir/Pass/Pass.h> | ||
|
|
||
| #include <memory> | ||
|
|
||
| namespace mlir::qco { | ||
|
|
||
| // Forward declaration | ||
| class Architecture; | ||
|
|
||
| /** | ||
| * @brief Verifies if all two-qubit gates within the region are executable on | ||
| * the targeted architecture. Expects static qubits only. | ||
| * @returns llvm::success() if executable, llvm::failure() otherwise. | ||
| */ | ||
| LogicalResult isExecutable(Region& region, const Architecture& arch); | ||
|
|
||
| /** | ||
| * @brief Create a mapping pass instance with the given target architecture. | ||
| * @returns a pass object. | ||
| */ | ||
| std::unique_ptr<Pass> | ||
| createMappingPass(std::shared_ptr<Architecture> arch, | ||
| MappingPassOptions options = MappingPassOptions{}); | ||
| } // namespace mlir::qco | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.