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

Ensure an ion.yield operation is returning a region output to all parallal protocol ops #1475

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

Conversation

paul0403
Copy link
Contributor

Context: During quantum-to-ion pass, when decomposing RX, RY and MS gates to pulses in a ParallelProtocolOp's region, the region was terminated with yield ops without any operands. This means no SSA values were actually yielded from the region. At the same time, ParallelProtocolOp returns (variadic-length) values of type !quantum.bit. This means the IR is ill-formed.

Description of the Change:
Ensure that all ParallelProtocolOps will yield the input-ed qubit SSA values by doing so in the builder, when building the region of the ParallelProtocolOp.

Benefits: mlir is no longer ill-formed; increased readability

@paul0403 paul0403 added the OQD OQD-related work label Jan 20, 2025
@paul0403 paul0403 requested a review from mehrdad2m January 20, 2025 22:01
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.

1 participant