I would like to add numbers. In this simple example a = 1 and b = 1.
The circuit I created looks like this:
We have two registers a and b. Both have a size of 3 qubits. I'm using Big Endian notation, so for example the bit array [1, 1, 0] = 6. I start with encoding both numbers by adding a X-Gate to qubit 2 and 5. After that I follow Drapper's algorithm for integer addition: QFT on a, Evolve a by b. QFT-Inverted on a.
However the result is wrong that I'm getting at the end: The state 17 (= [0, 1, 0, 0, 0, 1]) has probability 1. I would like to see state 2 with probability 1 obviously. What am I doing wrong?