Skip to content

✨ Add Barrier Operation To MLIR Dialects #1221

@MatthiasReumann

Description

@MatthiasReumann

Description

As of now, QASM's barrier operation can't be translated to the mqtref (and consequently mqtopt) dialect. Conceptually, Qiskit defines a barrier as

A directive for circuit compilation to separate pieces of a circuit so that any optimizations or re-writes are constrained to only act between barriers.

Implementation

TBD.

Some Ideas

  • The most straight forward solution would be to add a BarrierOp and translate QASM's barrier to mqtref.barrier. A potential downside of this approach is that any optimization pattern must check for barriers.
  • Alternatively, barriers might also be parsed into a custom basic sequence (as described in 🗺️ RFC: Quantum Dialect Revamp — Implementation Plan #1219) and optimizations run on these sequences (instead of mir::Module, let's say). This way patterns could ignore barriers altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MLIRAnything related to MLIRenhancementImprovement of existing feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions