Skip to content

🧊 MLIR - Eliminate qubit registers in MQTOpt (value semantics only) #1125

@burgholzer

Description

@burgholzer

Background

Registers make liveness/hoisting/reuse analysis harder and introduce boilerplate (alloc β†’ extract β†’ use β†’ insert β†’ dealloc).

Problem

Analyses must reason through register indirections and partial reuse, increasing complexity and risk of missed optimizations.

Proposal:

  • In MQTOpt, allocate individual qubits and deallocate when done; convert from MQTRef register form during lowering to Opt.
  • Update passes to operate on individual qubit values.

Acceptance criteria:

  • Conversion implemented; passes adjusted; tests show simpler IR and correct behavior.
  • Measurement hoisting and qubit reuse analyses become simpler/clearer (tests or before/after diffs).

Metadata

Metadata

Labels

MLIRAnything related to MLIRc++Anything related to C++ coderefactorAnything related to code refactoringusabilityAnything related to usability

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions