Skip to content

🐛 Fix QIR functions for controlled gates #1833

Description

@denialhaag

We currently define functions such as __quantum__qis__ccx__body and __quantum__qis__crx__body which cannot be found in any other framework. We should align our functions for controlled gates with those defined in qir-runner.

For example, the RX gate should be represented by void @__quantum__qis__rx__ctl(ptr, ptr), where the first pointer is an array of control qubits, and the second pointer is a tuple of the rotation angle and the target qubit. See, for example, here for some implementation deatils: https://github.com/qir-alliance/qir-runner/blob/9a0aa6ef42a94650f9cb7777fa0fe496535aa5ac/backend/src/lib.rs#L531-L547

All other functions for controlled gates can be defined similarly. We should also support the "short-hand" notations (e.g., __quantum__qis__cx__body) supported by qir-runner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MLIRAnything related to MLIRQIRAnything related to QIR

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions