Closed DevelopDaily closed 4 years ago
Thanks for the report! Sorry it's taken awhile to get to.
I just tried it and got the same result as you. I think what's really happening is that q[2]
is mapped to the original circuit's qs[6]
. The only way I can make sense of this so far is if there's a second level of indirection going on somewhere, since there's q[2] --> qs[0]
and q[0] --> qs[6]
. I'll review the code again and try to untangle these permutations.
Found the problem, it's fixed now. I also removed the initial layout information by default as it's maybe more confusing than it is useful.
Thanks!
Thanks for the previous
qpp
fix. The Grover's algorithm circuit works fine now, for all the physical devices, and for bothswap
andsteiner
.Here is a test case to reveal another possible bug.
128_2_1.zip
It produces a final periodic state like this:
Now, run this:
./staq -S -m -O1 -d square -M swap -l bestfit -f qasm -o 128_2_1_staq.qasm 128_2_1.qasm
The
128_2_1_staq.qasm
produces a final (virtual) state like this:64
zeros followed by64
values of0.125
. The interpretation is based on// Output layout (physical --> virtual)
info.That is wrong. By the way, it works perfectly if the
steiner
is used.The problem seems to happen when the number of qubits increases. For example, here is a similar test case with fewer qubits. The
swap
works as expected.32_2_1.zip