# Why does entanglement of 3 qubits break this?

Another user asked about the Ekert Quantum Key Distribution protocol: Alice and Bob each randomly choose one of three bases separated by $$120^{\circ}$$ in which to measure, and then later compare the results both when choosing the same base and when choosing a different base. For fun, I decided to implement this in Quirk. Quirk: Alice and Bob. Picture below.

[The gate "0/1/2" maps $$|00\rangle$$ to $$(|00\rangle + |01\rangle + |10\rangle)/\sqrt3$$ so that each of the three basis is chosen with equal probability.]

As you can see, Alice and Bob always get the same result when they use the same basis, and agree $$\frac14$$ of the time when they use a different basis. Exactly what theory demands.

I was uncertain how to implement Eve. To start, I gave Eve a copy of the entangled qubit by adding an X gate on the empty line between the two spacers. Quirk: Eve. Much to my surprise, that was all that was needed. The probabilities immediately changed to $$\frac34$$ and $$\frac38$$, as predicted by theory.

I have two questions:

1. Why does the existence of the third entangled qubit destroy the algorithm? I could understand if we measured the qubit or used it to control something, then we'd get another algorithm. But somehow the very fact that Alice and Bob's pair is actually a triplet is all that is necessary. I don't quite grok why that is sufficient.

2. If Eve decides not to e[a]vesdrop, is there anything that she can do to her qubit so that Alice and Bob can exchange keys in peace? Or is the very fact that the third entangled qubit was created mean the algorithm won't work? You didn't quite answer my question, but you got me awfully close.

You gave me the insight I needed to realize that I could simplify my query to the following circuit. If you only look at two qubits, things look a lot alike until suddenly they don't. I need to look a bit more with the linear algebra to see why the third qubit makes such a big difference. 