-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to Shor's algorithm notebook #2167
Conversation
Command Bot: Processing... |
1 similar comment
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
"Measurement results in big-endian notation: { 00101:200 }\n", | ||
"\n", | ||
"For x =5, 5^x mod 21 = 17\n", | ||
"For x =5,the computed result of the circuit is 17\n" | ||
"For x = 3, 5^x mod 21 = 20\n", | ||
"For x = 3, the computed result of the circuit is 20\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still little confused by the reference to big endian here. When 00101
is interpreted in big endian (where the MSB is on the left and the LSB is on the right), the result should be 5
. The only way to get 20
from 00101
is to treat 00101
as a little endian number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to elaborate, I agree that in CUDA-Q, one could say that 00101
corresponds to 20
, because we print the bitstrings left to right, lowest index to highest index. So, if the bitstring indices 00101
corresponds to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Maybe I'll just remove the "endian" terminology altogether and just be more explicit about how things are printed out and stored in qubits
Description
fixed and double checked the modular arithmetic circuits to make sure they were written in the big endian convention of CUDA-Q