Binary representation writes an integer or matrix index as an ordered string of bits. For an n-qubit system, indices range from 0 through 2^n − 1 and correspond to n-bit basis-state labels. section 3.9.1 section 4.1.1
Use the representation to connect integer indices with quantum-register structure:
- For k < 2^(n−1), k has an n-bit representation whose most significant bit is 0; 2^(n−1) + k has the same remaining bits with leading bit 1. section 3.9.1
- In little-endian notation, the n−1-bit representation of k specifies the control pattern for a controlled single-qubit gate. section 3.9.1
- For a measured n-qubit superposition, the binary notation of index k is returned with probability equal to the square of its amplitude. section 4.1.1
Three-qubit index pairing
With n = 3 and k = 2, the indices k and 2^(n−1) + k are 2 and 6. Their three-bit representations differ only in the most significant bit, pairing the matrix rows and columns affected by the controlled operation. section 3.9.1
Figure 4.2 Measuring two qubits in a superposition of all basis states can give any of the results 00, 01, 10, and 11, with probabilities equal to squares of the amplitudes of the corresponding basis states in the superposition state. When we measure a system that is in a specific basis state, we can only get the result that corresponds to that state, with 100% probability.
Relate binary basis-state labels to measurement outcomes: a superposition can produce 00, 01, 10, or 11, while a definite basis state produces its corresponding bit string with certainty. section 4.1.1





