-
-
Notifications
You must be signed in to change notification settings - Fork 55
✨ Add SCF conversions between QC and QCO dialects #1638
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
Merged
burgholzer
merged 82 commits into
munich-quantum-toolkit:main
from
li-mingbao:scf-conversions
May 11, 2026
Merged
Changes from 67 commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
63f3e59
reuse scf builders for qc and qco from old implementation
e726180
initial support for easier register usage in qc
0fc693f
add conversion of scf.for
834047a
add conversion of while op
aa70f5e
add custom qco.if parser/printer for multiple types
8a67a7b
add scf.if to qco.if conversion
217bfc4
support scf conversion from qco to qc
f385b36
refactor the qc to qco conversion
8a29b41
store already extracted qubits in qco to qc conversion
2bcfc13
disable some verifications for qco::IfOp
380b8a7
add some documentation
09a0bc7
allow dynamic indices for tensors
2dd4a4b
add stubs for tests
3623b13
Merge remote-tracking branch 'upstream/main' into scf-conversions
74aea0a
adjust qco::IfOp and qco::YieldOp
4953677
add explicit memref loadOp
9daab96
add insert/extract of extracted qubits for tensors in the builder
ba92699
add initial tests
51a2f57
fix condition in scf::YieldOp conversion to qco
10e4232
Remove redundant definition in QCProgrambuilder and add index check f…
cc68bad
refactor QCOProgrambuilder
b6b0769
fix bug in qc->qco conversion
acc7ec8
add more tests
e7c2ee1
fix for operation example in QCProgramBuilder
d7c6fc9
fixing qc to qco conversion
052b329
update the QCOProgramBuilder
6f7907c
add additional test
560b2d2
fix docstrings of qco.yield
8422188
add linear type definition
0da9d67
add more tests
0fd2992
clean up IfOp parser/printer
4f3e1ea
Merge remote-tracking branch 'upstream/main' into scf-conversions
0ea7f1a
adjust docstrings
69360ab
Merge remote-tracking branch 'upstream/main' into scf-conversions
24c00a3
fix conversion rules for scf operations in qco to qc
4c527ea
cleanup code a bit
b94d119
fix linter issues
04c887a
use correct SmallVector
37f1440
use arrayRefs
f1d0f5b
adjust const usage
85533f8
address coderabbit comments
ca7fba5
more coderabbit feedback
958e059
remove redundant checks
69a1fe8
add codereview feedback
607f5cf
extract common functionality in scf builders
0df39ef
address coderabbit comments
d169014
simplify scf ops in QCOProgramBuilder
6fdb5b8
Merge remote-tracking branch 'upstream/main' into scf-conversions
f658ce0
Apply suggestions from code review
li-mingbao 9680f6a
apply codereview feedback
7ab958a
add qco.if parser test
c6e484a
fixing some docstrings
a79fb69
remove the StringAttr marker in the qc to qco conversion
964d7b0
add accidently removed line back
02ccb40
support only dynamic indices for memref.load
be3dc79
add missing argument in qco.if example
52aff06
improve tracking of already loaded qubits
56107ba
fix linter issues
d661f1e
restrict memrefLoad to nested regions and add details section
3b1e25e
address coderabbit comments
2e29ffc
Merge branch 'main' into scf-conversions
denialhaag 5647b54
Fix rebase and adapt to new include style
denialhaag 5bb31a5
🎨 pre-commit fixes
pre-commit-ci[bot] 5a681ef
Actually fix rebase and adapt to new include style
denialhaag ec53027
🎨 pre-commit fixes
pre-commit-ci[bot] b0b6bb1
fix some coderabbit comments
5c73a7a
add qco.if test if mixed qubit and qtensor type
8fc7fd3
🎨 Streamline QC builder code
burgholzer 18b2b4a
🎨 Streamline QCo builder code
burgholzer 63d0396
🎨 Small improvements for QC to QCO conversion
burgholzer 473019d
🎨 Minor tweaks to QCO<->QC conversion
burgholzer ad5dfe7
📝 Add changelog entry
burgholzer c9bf52d
Merge branch 'main' into fork/li-mingbao/scf-conversions
burgholzer 1745374
fix docstrings
a0a7e24
modify qco.if print from qubits to generics args
aa77eed
Merge remote-tracking branch 'upstream/main' into scf-conversions
85539f6
apply coderabbit suggestions
a32f751
adjust ifOp tests
c45b2fd
Merge remote-tracking branch 'upstream/main' into scf-conversions
93935fb
use llvm::to_vector for ValueRange to SmallVector conversion
d9bcd56
fix flaky test
5231bd7
remove debug statements
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
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.