Binary representation gives quantum-state simulation a direct way to identify computational-basis outcomes. For a target qubit t, pair outcomes whose binary strings differ only at position t; their decimal indices differ by 2^t. section 4.3.1
Use binary positions to organize single-qubit transformations:
- Index qubits from right to left, with the rightmost binary digit representing qubit 0. section 4.3.1
- For target t = 0, pair neighboring decimal indices; for t = 1 and t = 2, pair indices separated by 2 and 4. section 4.3.1
- In an IQFT, recover binary digits from right to left through successive Hadamard gates and controlled phase shifts. section 7.4.1
Recovering 13 in binary
Repeatedly apply divmod by 2: 13 gives quotient 6 and remainder 1; 6 gives 3 and 0; 3 gives 1 and 1; 1 gives 0 and 1. Reading remainders from last to first produces 1101. section 7.4.1





