You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the explanation of Fig 5-11 on page 96, we have:
Note that for some values of a, subtracting 3 from a will cause its lowest-weight qubit to be set. We can use this top bit as a condition for our increment operation.
Emphasis mine.
I'm reading this as referring to the nots in the if (a<0) then b++ block being conditioned over 0x4 (for a). Should this be the most significant qubit?
The text was updated successfully, but these errors were encountered:
Agreed. Further, the result of the program (and the QCEngine implementation) agree with the most significant interpretation - note the 0x4 line being conditioned in the CNOTs below.
This may just be a terminology clarification since the exact wording used is "lowest-weight" not "least significant".
It is also not very clear that the net result is if(a >= -1 && a < 3) b++. It took me quite a long time to understand that -1-3 = -4 (duh). Perhaps a-4 would be more clear? Or maybe even just, don't modify a for this example and setup "negative" a states from the beginning and skip the a-3 / a+3. I felt like a bit too much was thrown into it at once and made it pretty dense to work through.
In the explanation of Fig 5-11 on page 96, we have:
Emphasis mine.
I'm reading this as referring to the
not
s in theif (a<0) then b++
block being conditioned over 0x4 (fora
). Should this be the most significant qubit?The text was updated successfully, but these errors were encountered: