Skip to content

Support controlled composition of named parametric circuits #374

Description

@arniber21

What to build

Make a controlled wrapper around a user-defined, parameterized circuit elaborate end to end. A controlled product-formula evolution built with a symbolic step count and repeat currently reaches elaboration, then fails with elaboration is not implemented for circuit body expression during elaboration at the first function declaration rather than the controlled expression.

This blocks ordinary Hadamard-test and phase-estimation constructions. It is distinct from #369: this reproduction does not use controlled(par { ... }) or the nested target tuple syntax.

Acceptance criteria

  • A named evolution circuit parameterized by a natural-number step count can be wrapped in controlled(...) and compiled to OpenQASM.
  • The controlled circuit preserves the expected control-plus-target width and emits a controlled realization for every specialization used by the program.
  • The same program compiles through the neutral-atom schedule path.
  • If a genuinely unsupported controlled form remains, its diagnostic identifies the controlled expression and gives a supported rewrite or limitation.
  • A regression test covers the named parametric controlled-circuit path.

Blocked by

None - can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerFrontend / MLIR passes, type system, language semanticsready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions