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

Remove quantum dialect components at the end of quantum-to-ion lowering #1482

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

Conversation

paul0403
Copy link
Contributor

Context:
We would like the ion dialect mlir to not generate any core catalyst runtime capi stubs at the moment, since the OQD runtime needs to generate openapl instead of going through the usual catalyst runtime device interface.

To aid this, we remove all quantum dialect components from the product mlir of quantum-to-ion. With this, the ion dialect mlir can be lowered to oqd stubs a bit easier.

Description of the Change:
After the existing gate-to-pulse decomposition, the parallel protocol ops are still acting on quantum.bits. We change them to act on ion.ion by:

  1. Use an ion.ion operation for each qubit. This is the equivalent of the initial quantum.extract operations at the start of a circuit.
  2. Change parallel protocol operation to return ion.ion types.

Benefits:
Easier generation of openapl.

Possible Drawbacks:
Ultimately, we do want to post process the results returned by OQD backend and massage them into the form in accordance with the usual runtime device interface, e.g. probs, var, expval, etc, but at the moment this is not possible and makes openapl generation harder.

@paul0403 paul0403 added the OQD OQD-related work label Jan 23, 2025
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.

@paul0403 paul0403 marked this pull request as ready for review January 23, 2025 21:11
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.

1 participant