Skip to content

🐛 Duplicate qubit label/s created during synthesis #278

Open
@TooMuchDakka

Description

@TooMuchDakka

Environment information

  • OS: Windows 10 x64
  • C++ Compiler: clang 17.0.3
  • MQT-Core: 3.0.3
  • MQT-Syrec: Commit #995f203

Description

During the synthesis of the following SyReC program, duplicate qubit labels are created when the local variable c of module add is inlined by the CallStatement in the main module due to the identifier of the local variable matching the identifier of the parameter c.

module add(inout a(2), in b(2))
 wire c(2)

 a += (b + c)

module main(inout a(2), in c(2))
 call add(a, c)

Expected behavior

The SyReC program should be synthesizable without errors.

How to Reproduce

  1. Perform a build from source of mqt.syrec
  2. Launch the syrec-editor python application and copy the SyReC circuit from the bug description into the code editor
  3. Select either the cost or line aware synthesis radio button and then press the 'Build' button

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingc++Anything related to C++ code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions