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

[WIP] Lowering Ion dialect to llvm dialect #1466

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

mehrdad2m
Copy link
Contributor

@mehrdad2m mehrdad2m commented Jan 16, 2025

Context:
So far, as part of the ion dialect pass infrastructure, we have the ion decomposition pass which genreates a universal gate set of (RX,RY, MS). This gate set would be lowered to ion dialect which consists of IonOp, PulseOp and ParallelProtocolOp operations and IonType. we need to lower the ion dialect operations into llvm stubs which will be used in runtime to generate machine related instructions.

Description of the Change:

  • Added a new lowering pass --convert-ion-to-llvm
  • Added IonOp lowering to @__catalyst_ion
  • Added IonType lowering
  • Added pulseOp lowering to @ __catalyst_pulse_op
  • Added parallelprotocolOp lowering to @ __catalyst_parallel_protocol
  • Added changelog

Benefits:
This PR would enable runtime to capture the ion dialect related instructions.

Possible Drawbacks:

Related GitHub Issues:
[sc-79342]

@paul0403
Copy link
Contributor

I will take a look once I get back! @joeycarter can also fill you in on the ion op semantics if they feel unclear

@paul0403 paul0403 added the OQD OQD-related work label Jan 20, 2025
@@ -0,0 +1,187 @@
// Copyright 2024 Xanadu Quantum Technologies Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Copyright 2024 Xanadu Quantum Technologies Inc.
// Copyright 2025 Xanadu Quantum Technologies Inc.

@@ -0,0 +1,58 @@
// Copyright 2024 Xanadu Quantum Technologies Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Copyright 2024 Xanadu Quantum Technologies Inc.
// Copyright 2025 Xanadu Quantum Technologies Inc.

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md on your branch with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OQD OQD-related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants