Description
Environment information
- OS: Windows
- C++ Compiler: clang 17.0.3
- MQT-Core: 3.0.2
- MQT-Syrec: Main branch commit 2ba6873
Description
A shift expression using the right shift operation is currently synthesized as a sequence of CNOT gates while ignoring the defined shift amount of the operation. A simulation of the following SyReC program:
module main(in a(4), out b(4))
b ^= ~(a >> 2)
with the input state a=1 (0001), b=0
leads to the result a=1, b=14 (1110)
Expected behavior
For the given input state a=1, b=0
the expected output state is a=1, b=15 (1111)
.
How to Reproduce
- Install mqt.syrec version 1.21.1 via pip install mqt.syrec==1.21.1
- Launch the syrec-editor python application and copy the SyReC circuit from the bug description into the code editor
- Select either the cost or line aware synthesis radio button and then press the 'Build' button