Skip to content
Open
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
46c39de
RTIO dialect is added to Catalyst
rniczh Nov 10, 2025
fd2dea4
Merge branch 'main' into rniczh/add-rtio-dialect
rniczh Nov 10, 2025
f127e6a
reformatting
rniczh Nov 10, 2025
eb19fa3
pulse should use f64 for duration
rniczh Nov 11, 2025
e5b170f
Update mlir/include/RTIO/IR/RTIODialect.td
rniczh Nov 17, 2025
6c9e90d
Update mlir/include/RTIO/IR/RTIODialect.td
rniczh Nov 17, 2025
a502944
Update mlir/include/RTIO/IR/RTIODialect.td
rniczh Nov 17, 2025
94927c3
Update mlir/include/RTIO/IR/RTIODialect.td
rniczh Nov 17, 2025
e9b1e84
Update mlir/include/RTIO/IR/RTIOOps.td
rniczh Nov 17, 2025
1452e7b
Update mlir/include/RTIO/IR/RTIODialect.td
rniczh Nov 17, 2025
38242f5
Update mlir/include/RTIO/IR/RTIOOps.td
rniczh Nov 17, 2025
6c00116
add empty op
rniczh Nov 18, 2025
48ecf52
Merge branch 'rniczh/add-rtio-dialect' of github.com:PennyLaneAI/cata…
rniczh Nov 18, 2025
ef5c3a6
fix formatting
rniczh Nov 18, 2025
c819333
update td
rniczh Nov 18, 2025
a26864c
Add pass to lower ion dialect to rtio dialect
rniczh Nov 18, 2025
c0e7234
update
rniczh Nov 18, 2025
f1ad990
add missing include
rniczh Nov 18, 2025
4cf83fe
update
rniczh Nov 18, 2025
27a4b98
add missing lib
rniczh Nov 18, 2025
4b3408f
Merge branch 'rniczh/add-rtio-dialect' of github.com:PennyLaneAI/cata…
rniczh Nov 18, 2025
29ffc70
remove redundant include
rniczh Nov 18, 2025
fcd540d
update
rniczh Nov 19, 2025
82bb3aa
remove other redundant functions
rniczh Nov 20, 2025
4a7430a
update pass
rniczh Nov 27, 2025
a349b1c
remove redundant code
rniczh Nov 27, 2025
cc814da
update linkage
rniczh Nov 28, 2025
5681bb3
add rtio.config
rniczh Dec 2, 2025
f326bf2
drop timeline IR
rniczh Dec 2, 2025
0e6b14f
remove unrelated thing
rniczh Dec 2, 2025
c0da830
Merge branch 'main' into rniczh/add-rtio-dialect
rniczh Dec 2, 2025
bd1c4c4
update channel ID underlying number
rniczh Dec 2, 2025
8e58bbe
Merge branch 'rniczh/add-rtio-dialect' of github.com:PennyLaneAI/cata…
rniczh Dec 2, 2025
6d57469
add bracket for if
rniczh Dec 2, 2025
cf5874e
fix
rniczh Dec 2, 2025
c4a3afa
add assert for oob
rniczh Dec 2, 2025
5e136eb
update comment
rniczh Dec 2, 2025
9fd57fc
merge from upstream
rniczh Dec 2, 2025
b623d0d
supports importing json to rtio.config
rniczh Dec 2, 2025
b127e9e
update changelog
rniczh Dec 2, 2025
1ce02ba
add deviceDB option
rniczh Dec 2, 2025
a379528
add missing comma
rniczh Dec 2, 2025
4f851ef
add missing include
rniczh Dec 2, 2025
2ff88f9
Update mlir/lib/RTIO/IR/RTIODialect.cpp
rniczh Dec 3, 2025
2486c74
Update mlir/include/RTIO/IR/RTIOOps.td
rniczh Dec 3, 2025
e6d0c7c
Add filecheck line
rniczh Dec 3, 2025
d8588ad
Merge branch 'main' into rniczh/add-rtio-dialect
rniczh Dec 3, 2025
49b2c0b
merge from upstream
rniczh Dec 3, 2025
3937ecf
revert
rniczh Dec 3, 2025
5559870
merge
rniczh Dec 3, 2025
e92d58e
Add changelog
rniczh Dec 3, 2025
7ed6c04
Merge branch 'rniczh/add-rtio-dialect' of github.com:PennyLaneAI/cata…
rniczh Dec 3, 2025
f77a12b
update changelog
rniczh Dec 3, 2025
ff777d3
merge from upstream
rniczh Dec 4, 2025
d0eba30
udpate
rniczh Dec 4, 2025
9837334
update
rniczh Dec 4, 2025
6314072
add test
rniczh Dec 5, 2025
528e0bb
remove comment
rniczh Dec 5, 2025
99a85c5
remove comment
rniczh Dec 5, 2025
7e7ee45
update changelog
rniczh Dec 5, 2025
2040912
Add scf.if and scf.for test
rniczh Dec 5, 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
3 changes: 2 additions & 1 deletion doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

<h3>New features since last release</h3>

* RTIO dialect is added to bypass the compilation flow from OpenAPL to ARTIQ’s LLVM IR. It is introduced to bridge the gap between ION dialect and ARTIQ’s LLVM IR. The design philosophy of RTIO dialect is primarily event-based. Every operation is asynchronous; sync behaviour occurs only via `rtio.sync` or `wait operand` in event operation.
* RTIO dialect is added to bypass the compilation flow from OpenAPL to ARTIQ’s LLVM IR. It is introduced to bridge the gap between ION dialect and ARTIQ’s LLVM IR. The design philosophy of RTIO dialect is primarily event-based. Every operation is asynchronous; sync behaviour occurs only via `rtio.sync` or `wait operand` in event operation. And we now support the compiling from ION dialect to RTIO dilalect.
[(#2185)](https://github.com/PennyLaneAI/catalyst/pull/2185)
[(#2204)](https://github.com/PennyLaneAI/catalyst/pull/2204)

* Added ``catalyst.switch``, a qjit compatible, index-switch style control flow decorator.
[(#2171)](https://github.com/PennyLaneAI/catalyst/pull/2171)
Expand Down
24 changes: 24 additions & 0 deletions mlir/include/Ion/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,28 @@ def IonConversionPass : Pass<"convert-ion-to-llvm"> {
];
}

def IonToRTIOPass : Pass<"convert-ion-to-rtio", "mlir::ModuleOp"> {
let summary = "Convert Ion dialect operations to RTIO dialect";

let dependentDialects = [
"rtio::RTIODialect",
"arith::ArithDialect",
"func::FuncDialect",
"memref::MemRefDialect",
"scf::SCFDialect",
"quantum::QuantumDialect",
"ion::IonDialect",
"linalg::LinalgDialect",
];

let options = [
Option<"kernelName", "kernel-name",
"std::string", /*default=*/"\"__kernel__\"",
"Name of the generated kernel function">,
Option<"deviceDb", "device_db",
"std::string", /*default=*/"\"\"",
"Path to the device database JSON file">,
];
}

#endif // ION_PASSES
1 change: 1 addition & 0 deletions mlir/include/RTIO/IR/RTIOOps.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "mlir/Bytecode/BytecodeOpInterface.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"

#define GET_ATTRDEF_CLASSES
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/RTIO/IR/RTIOOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include "mlir/IR/BuiltinAttributes.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
include "RTIO/IR/RTIODialect.td"

def RTIOChannelOp : RTIO_Op<"channel"> {
def RTIOChannelOp : RTIO_Op<"channel", [Pure]> {
let summary = "Define a channel";
let description = [{
The channel's identity (kind, qualifiers, and channel id) is
Expand Down Expand Up @@ -51,7 +51,7 @@ def RTIOChannelOp : RTIO_Op<"channel"> {
}];
}

def RTIOQubitToChannelOp : RTIO_Op<"qubit_to_channel"> {
def RTIOQubitToChannelOp : RTIO_Op<"qubit_to_channel", [Pure]> {
let summary = "Map a qubit to an RTIO channel";
let description = [{
It's a temporary operation that will be lowered to a static `rtio.channel` operation during
Expand Down
3 changes: 3 additions & 0 deletions mlir/lib/Ion/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(LIBRARY_NAME ion-transforms)

file(GLOB SRC
ion-to-llvm.cpp
ion-to-rtio.cpp
ConversionPatterns.cpp
gates_to_pulses.cpp
GatesToPulsesPatterns.cpp
Expand All @@ -13,6 +14,7 @@ set(LIBS
${dialect_libs}
${conversion_libs}
MLIRIon
MLIRRTIO
)

set(DEPENDS
Expand All @@ -36,6 +38,7 @@ target_link_libraries(${LIBRARY_NAME} PRIVATE
if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
set_source_files_properties(
ion-to-llvm.cpp
ion-to-rtio.cpp
ConversionPatterns.cpp
gates_to_pulses.cpp
GatesToPulsesPatterns.cpp
Expand Down
Loading