Talking about bases such as $\left|0\rangle\langle0\right|$ and $\left|1\rangle\langle1\right|$ (or the equivalent vector notation $\left|0\right>$ and $\left|1\right>$, which I'll use in this answer) at the same time as 'horizontal' and 'vertical' are, to a fair extent (pardon the pun) orthogonal concepts.

On a Bloch sphere, there are 3 different orthonormal bases - we generally consider $\left|0\right\rangle$ and $\left|1\right\rangle$; $\frac{1}{\sqrt 2}\left(\left|0\right\rangle+\left|1\right\rangle\right)$ and $\frac{1}{\sqrt 2}\left(\left|0\right\rangle-\left|1\right\rangle\right)$; $\frac{1}{\sqrt 2}\left(\left|0\right\rangle+i\left|1\right\rangle\right)$ and $\frac{1}{\sqrt 2}\left(\left|0\right\rangle-i\left|1\right\rangle\right)$. I'll refer to these as the 'quantum information bases' as this is the notation generally used in quantum information.

That looks a bit of a mess, so we can also write this as $\left|\uparrow_z\right\rangle$, $\left|\downarrow_z\right\rangle$; $\left|\uparrow_x\right\rangle$, $\left|\downarrow_x\right\rangle$; $\left|\uparrow_y\right\rangle$, $\left|\downarrow_y\right\rangle$, where the different bases are now labelled as $x, y$ and $z$. In terms of spin-half particles, this has a natural definition of up/down spin in each of those directions. However, there is freedom in choosing which direction (in the lab) these axes are in (unless otherwise constrained).

Photons (used in the BB84 protocol) aren't spin-half particles (they have a spin of one), but nevertheless have similarities to this - the 'axes' are the possible directions of the polarisation of a photon, only instead of labelling these as $x, y$ and $z$, they're labelled as horizontal/vertical, diagonal/antidiagonal and left-/right-circular, or in vector notation, this is shortened to $\left|H\right>$, $\left|V\right>$; $\left|D\right>$, $\left|A\right>$; $\left|L\right>$ and $\left|R\right>$. These can then be mapped on to the 'quantum information' bases above, although which basis gets labelled as $\left|0\right>$ and $\left|1\right>$ is somewhat arbitrary.

For the BB84 protocol (and indeed, frequently used in other applications), the rectilinear (vertical/horizontal) basis is the one labelled using $\left|0\right>$ and $\left|1\right>$.

That is: $$\left|H\right>=\left|0\right>$$
$$\left|V\right>=\left|1\right>$$
$$\left|D\right>=\frac{1}{\sqrt 2}\left(\left|H\right\rangle+\left|V\right\rangle\right)=\frac{1}{\sqrt 2}\left(\left|0\right\rangle+\left|1\right\rangle\right)$$
$$\left|A\right>=\frac{1}{\sqrt 2}\left(\left|H\right\rangle-\left|V\right\rangle\right)=\frac{1}{\sqrt 2}\left(\left|0\right\rangle-\left|1\right\rangle\right)$$
$$\left|R\right>=\frac{1}{\sqrt 2}\left(\left|H\right\rangle+i\left|V\right\rangle\right)=\frac{1}{\sqrt 2}\left(\left|0\right\rangle+i\left|1\right\rangle\right)$$
$$\left|L\right>=\frac{1}{\sqrt 2}\left(\left|H\right\rangle-i\left|V\right\rangle\right)=\frac{1}{\sqrt 2}\left(\left|0\right\rangle-i\left|1\right\rangle\right)$$

If you want to measure in any of these bases, use the 'projectors' of that basis. That is, **if you want to measure in the rectilinear basis**, the projectors are $\left|H\rangle\langle H\right|$ and $\left|V\rangle\langle V\right|$. Similarly, in the diagonal basis, $\left|D\rangle\langle D\right|$ and $\left|A\rangle\langle A\right|$; and in the circularly polarised basis, $\left|L\rangle\langle L\right|$ and $\left|R\rangle\langle R\right|$

2

I think the terminology comes from photon polarisations which according to wikipedia at least is how the protocol was originally described. https://en.wikipedia.org/wiki/Quantum_key_distribution#BB84_protocol:_Charles_H._Bennett_and_Gilles_Brassard_(1984)

– snulty – 2018-05-16T19:48:22.3901As written right now, the question seems to (wrongly) state that |0> is a basis and |1> is a different basis. Instead, they are the two possible results in the same basis. – agaitaarino – 2018-05-17T04:25:50.430