# 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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 6, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7769978046417236, "perplexity": 442.98091457012674}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-06/segments/1674764499911.86/warc/CC-MAIN-20230201045500-20230201075500-00428.warc.gz"}