-
Notifications
You must be signed in to change notification settings - Fork 57
Migrate quantum dialect to new one-shot bufferization
#1686
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
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
ac23d69
Update LLVM and MLIR-HLO
erick-xanadu 16bc357
Update TopologicalSortUtils.h's location.
erick-xanadu d81e8d2
Use operator==(StringRef, StringRef)
tzunghanjuang 3b70b9f
Comment out deprecated bufferization pipelines
erick-xanadu c037c72
Add disableVerification to translateModuleToLLVMIR
tzunghanjuang c30269c
Comment out retired bufferization passes
tzunghanjuang c40c02f
Temporarily disable finalizing-bufferization for debugging
tzunghanjuang 10ec118
Remove all passes and use one-shot-bufferize only
tzunghanjuang 84da76b
Add new buffer passes except for the deallocation pipeline
tzunghanjuang 0e1b5fe
Temporarily set side effect of InitOp and FinalizeOp as zero
tzunghanjuang 8d49feb
Draft Quantum Impl of BufferizableOpInterface
tzunghanjuang 0e70f99
Add empty one-shot-bufferize for quantum::ExtractOp
tzunghanjuang 8283274
unused variable
erick-xanadu ec95417
revert llvm/mhlo version to current;
paul0403 65642ba
.dep_versions EOF new line
paul0403 823e23f
revert TopologicalSortUtils.h location
paul0403 a0de280
restore llvm and mhlo version: source files
paul0403 26e6e24
restore another topological sort location
paul0403 7005ed9
restore `disableVerification` in CompilerDriver.cpp
paul0403 a5a99d1
add buffer interface for quantum.set_state op
paul0403 fee74cd
add buffer_play.mlir playground for exhibition
paul0403 c006d6a
add bufferization for set_basis_state
paul0403 cf08821
do stateop
paul0403 108f5be
probs op
paul0403 93b25d3
sample op
paul0403 a61a151
counts op
paul0403 1ad56d9
remove buffer_play playground
paul0403 c00cc8c
quantum bufferization lit test uses --one-shot-bufferize
paul0403 9c2638d
restore pipelines
paul0403 ab6b525
Merge remote-tracking branch 'origin/main' into eochoa/2025-04-16/upd…
paul0403 29d2dd8
register quantum dialect bufferization interface for the main catalys…
paul0403 bfdac15
revert `NoMemoryEffect` in quantum.init/finalize
paul0403 77d4544
change quantum-bufferize in py pipeline to one-shot bufferize with fi…
paul0403 b963ed7
qubit unitary op
paul0403 1f5662b
license
paul0403 5015f76
hermitian op
paul0403 f14b450
hamiltonian op
paul0403 064ca44
I accidentally ran clang-format on test.mlir
paul0403 ebf6b10
format
paul0403 7524f35
remove old quantum bufferization pass
paul0403 89bdc03
add one shot quantum bufferize to cpp pipeline
paul0403 d45d859
changelog
paul0403 5e13151
remove BufferizationPatterns.cpp from cmakelists
paul0403 974122c
Merge branch 'main' into eochoa/2025-04-16/updating-to0jaxv0.4.29.0
erick-xanadu 05e9a83
Merge remote-tracking branch 'origin/eochoa/2025-04-16/updating-to0ja…
paul0403 ddde955
remove extra comments
paul0403 6ddcb80
add Tzunghan's origin PR to changelog
paul0403 9e38dc0
Merge remote-tracking branch 'origin/main' into eochoa/2025-04-16/upd…
paul0403 78d1b4c
Update mlir/lib/Quantum/Transforms/BufferizableOpInterfaceImpl.cpp
paul0403 6c9e70e
format
paul0403 6154409
Turn on bufferizesToAllocation for sample, counts, probs and state.
paul0403 4fc788b
Merge remote-tracking branch 'origin/main' into eochoa/2025-04-16/upd…
paul0403 cdea054
changelog line too long
paul0403 3f2fa2d
remove quantum_bufferize.cpp from cmakelists
paul0403 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
27 changes: 27 additions & 0 deletions
27
mlir/include/Quantum/Transforms/BufferizableOpInterfaceImpl.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,27 @@ | ||
| // Copyright 2024-2025 Xanadu Quantum Technologies Inc. | ||
|
|
||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
|
|
||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| #pragma once | ||
paul0403 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| using namespace mlir; | ||
|
|
||
| namespace catalyst { | ||
|
|
||
| namespace quantum { | ||
|
|
||
| void registerBufferizableOpInterfaceExternalModels(mlir::DialectRegistry ®istry); | ||
|
|
||
| } | ||
|
|
||
| } // namespace catalyst | ||
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
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.
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.