Skip to content

Integrating gate decomposition into squin operator dialect #18

@Roger-luo

Description

@Roger-luo

gate decomposition can be done by finding wire.apply and get the SSAValue of %op, because we ask users to explicitly write at which stage they want to apply the operator. We can assume we are allowed to evaluate the operator before executing the quantum operation.

Thus we will implement an analysis pass that try to evaluate the operator expression using #21 as much as possible and record the unknown SSAValue in the generated op expression.

then in the rewrite pass of gate decomposition

  1. for constant expression or simple expression like rot(X, %theta) we send it to external engines like Cirq (for now) directly
  2. for complicated expression, we traverse the expression tree and send smaller components to external engines (Cirq for now) and get back the corresponding decomposition operation.
  3. the rewrite pass then insert these decompositions as new wire.apply statement and delte the old statement.

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions