-
-
Notifications
You must be signed in to change notification settings - Fork 11
🐛 Value of qubits of state variables not editable in syrec-editor and not correctly matched in output state matching #541
Description
System and Environment Information
- Windows 10 x64
- Clang: 19.1.5
- mqt-syrec: Latest commit of main branch (0f20935)
- Python: 3.10.11
Bug Description
According to the RevLib 2.0.1 specification section 2.1, qubits generated for local SyReC module variables of type state are data qubits and their value thus editable in the simulation run editor of the syrec-editor and checked when determining whether the expected and actual output state of a simulation run match in both the C++ tests as well as the syrec-editor.
While the data qubits generated for the parameters of the defined main module of a SyReC module form a consecutive sequence of qubits starting with qubit 0 (i.e. the qubit range [0, N) with N being the first ancillary qubit), said qubit sequence is not the only containing data qubits due to the qubits generated for variables of type state also being considered as data qubits. However, the current C++ simulation tests, simulation run editor, input state generator as well as the simulation run execution dialogs/workers in the python syrec-editor assume that the data qubits are only defined in the qubit range [0, N).
Steps to Reproduce
- Perform a build from source of mqt.syrec
- Launch the installed
syrec-editorexecutable - Synthesize the following SyReC program:
module incr(inout a(4)) wire t(4) ++= a module test(in a(4)) wire b(4), c(4) call incr(b) module main(inout a(2), in b(4), out c(2)) wire d(4), e(4) state f(4) wire g(4) call test(b) - Open the simulation view in the
syrec-editor - Either add a single simulation run or generate all simulation run combinations and check the displayed quantum registers or their generated values (the latter only when generating all simulation run combinations).