We can easily obtain the maximum-probability bit array from q by simply assuming the i-th bit is 1 if q i ≥ 1/2, or 0 otherwise.
this calculation may generate invalid bit arrays which do not correspond to actual words according to the mapping between words and bit arrays.