Skip to content
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

Implement remaining OQD integration chores #1517

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f557ab9
add json library attribution
paul0403 Feb 12, 2025
4511ece
update mlir: create ion json string and pass into device init kwargs;…
paul0403 Feb 12, 2025
cd2eef6
add oqd runtime stubs, tests and build system
paul0403 Feb 12, 2025
c1bc821
update oqd device.so path in test
paul0403 Feb 12, 2025
ff53926
format
paul0403 Feb 12, 2025
7de4339
discover oqd device.so in execution context
paul0403 Feb 12, 2025
f7f2c26
remove check 1==0 fake test
paul0403 Feb 12, 2025
b0b4027
set device lib to "oqd.qubit" during loweing
paul0403 Feb 12, 2025
93a8ac5
update stub signature in mlir to agree with runtime
paul0403 Feb 12, 2025
ef5c37c
update mlir test
paul0403 Feb 12, 2025
a468a90
format
paul0403 Feb 12, 2025
066fd60
changelog
paul0403 Feb 12, 2025
1bca93e
Merge remote-tracking branch 'origin/main' into paul0403/create_oqd_rt
paul0403 Feb 13, 2025
ea99d30
update fetchcontent to use gittag instead of url
paul0403 Feb 13, 2025
349c6a4
use url hash
paul0403 Feb 13, 2025
e1aea8e
add unit allocate/release tests (codecov); update to use qubit manage…
paul0403 Feb 13, 2025
792e590
Merge remote-tracking branch 'origin/main' into paul0403/create_oqd_rt
paul0403 Feb 13, 2025
554446c
add transition label ("l0->l1")
paul0403 Feb 13, 2025
8d48bf8
link to oqd capi from python
paul0403 Feb 13, 2025
c2592e7
Merge remote-tracking branch 'origin/main' into paul0403/create_oqd_rt
paul0403 Feb 13, 2025
0b39f13
make toml file parameter types cinsistent wih oqd AtomicCircuit types
mehrdad2m Feb 12, 2025
4d53478
Fixed typo
mehrdad2m Feb 12, 2025
0500dbb
Add multipole to Transitions in Ion dialect
mehrdad2m Feb 12, 2025
8045664
Fix typo
mehrdad2m Feb 12, 2025
0705810
Fix tests
mehrdad2m Feb 12, 2025
419da91
Add toml files as class variables to oqd device class
mehrdad2m Feb 13, 2025
edf662a
Add Phonon attribute and ModeOp to ion dialect
mehrdad2m Feb 13, 2025
147fab0
remove PhononMode
mehrdad2m Feb 13, 2025
4551f91
Fix indexing phonons in database
mehrdad2m Feb 13, 2025
99cdc64
Add lowering rules for ion.modes
mehrdad2m Feb 13, 2025
ff832a9
Add __catalyst__oqd__modes to runtime
mehrdad2m Feb 13, 2025
7275b0d
Add __catalyst__oqd__modes implementation
mehrdad2m Feb 13, 2025
0644a7b
fix rebase mistake
mehrdad2m Feb 14, 2025
a92fbce
Fixed the rest of lit test
mehrdad2m Feb 18, 2025
5923391
Fix phonons in database
mehrdad2m Feb 18, 2025
f0147ea
revert changes added by mistake
mehrdad2m Feb 18, 2025
a4dc002
remove label from transition in toml
mehrdad2m Feb 18, 2025
6eef988
add estate2
mehrdad2m Feb 18, 2025
e624db8
modify database to include estate2
mehrdad2m Feb 18, 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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ licenses:
- [accelerate-lapacke](https://github.com/lepus2589/accelerate-lapacke)
- [LAPACK](https://github.com/Reference-LAPACK/lapack)
- [TOML++](https://github.com/marzer/tomlplusplus)
- [json](https://github.com/nlohmann/json)
7 changes: 6 additions & 1 deletion doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,14 @@

- Add a new pass `convert-ion-to-llvm` which lowers the Ion dialect to llvm dialect. This pass
introduces oqd device specific stubs that will be implemented in oqd runtime including:
`@__catalyst_ion`, `@ __catalyst_pulse_op`, `@ __catalyst_parallel_protocol`.
`@__catalyst__oqd__ion`, `@ __catalyst__oqd__pulse`, `@ __catalyst__oqd__ParallelProtocol`.
[(#1466)](https://github.com/PennyLaneAI/catalyst/pull/1466)

- The OQD device can now generate OpenAPL JSON specs during runtime. The oqd stubs
`@__catalyst__oqd__ion`, `@ __catalyst__oqd__pulse`, and `@ __catalyst__oqd__ParallelProtocol`, which
are called in the llvm dialect after the aforementioned lowering ([(#1466)](https://github.com/PennyLaneAI/catalyst/pull/1466)), are defined to produce JSON specs that OpenAPL expects.
[(#1516)](https://github.com/PennyLaneAI/catalyst/pull/1516)

- The OQD device is moved from `frontend/catalyst/third_party/oqd` to `runtime/lib/backend/oqd`. An overall switch, `ENABLE_OQD`, is added to control the OQD build system from a single entry point. The switch is `OFF` by default, and OQD can be built from source via `make all ENABLE_OQD=ON`, or `make runtime ENABLE_OQD=ON`.
[(#1508)](https://github.com/PennyLaneAI/catalyst/pull/1508)

Expand Down
5 changes: 5 additions & 0 deletions frontend/catalyst/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ def get_default_flags(options):
"-lcustom_calls",
"-lmlir_async_runtime",
]

# If OQD runtime capi is built, link to it as well
if os.path.isfile(os.path.join(rt_lib_path, "librtd_oqd_device" + file_extension)):
default_flags.append("-lrt_OQD_capi")

return default_flags

@staticmethod
Expand Down
Loading