Remove quantum dialect components at the end of quantum-to-ion
lowering
#1482
+137
−105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.bit
s. We change them to act onion.ion
by:ion.ion
operation for each qubit. This is the equivalent of the initialquantum.extract
operations at the start of a circuit.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.