6

The image is taken from this link.

Here Alice is using random bases to encode 0 or 1. After the process is completed, Bob has similarly polarized photons as Alice. These polarization can be any of the $\lvert 0 \rangle , \lvert 1 \rangle, \lvert + \rangle$ or $\lvert - \rangle$. However, how would Bob know what Alice meant for which two of these bases? Meaning, Alice might choose ${\lvert 0 \rangle, \lvert + \rangle}$ to encode a **0** and ${\lvert 1 \rangle, \lvert - \rangle}$ to encode a **1** or vice versa. How do they determine which polarization encodes which bits?

But the protocol says they only reveal the choice of basis at each iteration, not which basis was used to encode a bit. Isn't it? – Hasan Iqbal – 2018-05-28T19:29:55.517

There's no difference. Whatever basis Alice chose, she encodes a bit in the state that she prepares. Later, Alice and Bob only use the bits from the cases where Bob measured in the same basis as Alice prepared, and discard the rest. – DaftWullie – 2018-05-28T19:40:47.610