# The Quantum Key to Understanding

I had taken a course on Quantum Information and Computation during my undergrad, and I learnt a lot of cool encryption strategies. For those that are new to the field of cryptography, the objective is to encode information using a shared key between an encoder (Alice) and a decoder (Bob). Anyone who doesn’t have the shared key will not be able to decode this information. Of course, the eavesdropper (Eve) may iteratively try out several different keys to successfully decode the message. The ease of decoding by a third party would determine the robustness (or lack of) of the encryption strategy.

Now, in quantum information theory, bits of information is encoded in terms of the spin of the particle (for instance, an electron can have a spin quantum number $+\frac{1}{2}$ or $-\frac{1}{2}$).

These two states are orthogonal to each other, as if the electron suffers from a split personality disorder. It can either have a positive spin (0) or a negative spin (1) but not both at the same time. The glass is either full or empty. There are associated probabilities with both events. Since these two events constitute a partition, their probabilities add up to $1$ and equal to $\frac{1}{2}$ each.

Now suppose the electrons think of getting a better perceptive. For half the time, it has a positive spin and for the remaining half, negative (0H and 1H). A glass half full or half empty kinda situation.

This forms the Hadamard basis. I suppose Hadamard was a rational guy*. Let’s figure out the whole encoding  and decoding strategy. Now, the probability that the eavesdropper Eve picks the same measurement basis as the encoder Alice, is $\frac{1}{2}$ ( because there are only two possible bases: the standard basis and the Hadamard basis). If she does, she correctly decodes the bit encoded by Alice. If instead, Eve chooses the wrong basis, the probability of that is $\frac{1}{2}$. Subsequently the probability she guesses the right bit is $\frac{1}{2}$.

So, probability ( Eve guesses correctly ) = $\frac{1}{2}$ + $\frac{1}{2}$ x $\frac{1}{2}$ = $\frac{3}{4}$.

Probability ( failure of encryption ) = Probability ( Eve guessing correctly ) = $\frac{3}{4}$.

Pretty high huh? Well, luckily math in on our side. So one would rarely encode information in 1 bit right? Most messages are 10s and 100s of bits long. Maybe even more! Let’s see how the problem works out then.

For the encryption to fail, it must fail for every single bit.

Probability ( failure of encryption )
= Probability ( bit 1 fails ) x ….. Probability ( bit n fails )
= $(\frac{3}{4})^n$.

Probability ( success of encryption )
= 1 – Probability ( failure of encryption )
= 1 – $(\frac{3}{4})^n$.

This value approaches $1$ as $n$ approaches $\infty$. Even for $n=10$, the probability of success of encryption is $0.944$. See how the tables turned? What are the odds of that happening? (well, you know the answer now). Classic quantum mess around. What I discussed here is also called the BB84 quantum key distribution protocol. You could read more about it here: BB84.

Now this is a brilliant way to look at situations in life, in general, isn’t it? Aren’t the events in life also probabilistic? I follow this up in my next post: Why Murphy was probably right.

*Side note: There’s a disturbing lack of females in applied mathematics. I’d most naturally tend to assume that a mathematician is a guy. Here’s an article on how, even though women exist in science, they generally take up positions in biology and healthcare related fields, instead of more mathematically gruesome areas:women in science.