Skip to content

Instantly share code, notes, and snippets.

@ayazskhan
Forked from quantum-kittens/BB84_QKD.ipynb
Created August 20, 2020 06:15
Show Gist options
  • Save ayazskhan/70e876675b6e3a932742596b4dc0f16e to your computer and use it in GitHub Desktop.
Save ayazskhan/70e876675b6e3a932742596b4dc0f16e to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Hello! In this notebook we discuss the basics of quantum key distribution (QKD). Specifically, we look at BB84, the *one protocol that started it all*. Dun dun dunnn. \n",
"\n",
"We make use of Qiskit, which is IBM's open-source quantum computing software development framework. \n",
"\n",
"(Information about Qiskit and how to install it can be found in [1].)\n",
"\n",
"## Introduction\n",
"\n",
"Let's visit our old friends Alice and Bob, who want to share a secret message. Alice can send Bob a secret message by encrypting it with a one-time-key, which is an unbreakable encryption technique. A one-time key is just that: a key that is used once. By the time a third party -- let's call her Eve, shall we? -- gets her hands on the message, Alice and Bob would have discarded that key and moved on to another. So unless Eve has access to the key, or can accurately predict the key, she cannot decrypt the message.\n",
"\n",
"'Key distribution' is essentially the process of getting the key to both communicating parties while minimizing the risk of Eve gaining knowledge of the key. In different words, a key distribution protocol’s purpose is to output a key at one end (Alice's), and a good estimate of that key at the other (Bob's).\n",
"\n",
"When principles of quantum physics and qubit measurements come into the picture to create secure cryptographic keys, you've got quantum key distribution. \n",
"\n",
"Quantum key distribution is essentially made up of two parts. The first is the quantum component, in which quantum principles are used to check for the presence of an eavesdropper and a raw key is generated through qubit measurements. The second is the classical part, in which the final key is distilled from the raw key through classical post-processing. We're going to stick to the quantum part and discuss the seminal BB84 protocol proposed by Bennett and Brassard in 1984 [2].\n",
"\n",
"\n",
"## How the BB84 Protocol Works\n",
"\n",
"BB84 is a simple \"prepare and measure\" protocol in which Alice prepares a sequence of qubits, sends the qubits to Bob, and then Bob measures them. The two discard those for which the measurement bases do not match. A subset of the remaining string of bits is used to check for the presence of sneaky Eve, and the rest is used as the raw key.\n",
"\n",
"The protocol works something like this:\n",
"\n",
"- Alice generates a random bit string.\n",
"- Alice encodes the bits in qubit states by randomly choosing between two bases, say, the perpendicular (z) and diagonal (x) bases. Let's say she uses photons as qubits. This scenario translates to a choice between rectilinear polarization and diagonal polarization.\n",
"\n",
"She follows a convention that she established before hand, perhaps something like this:\n",
"\n",
"| | 0 | 1 |\n",
"|---|---|---|\n",
"| z basis | $\\uparrow$ | $\\rightarrow$ | \n",
"| x basis | $\\nwarrow$ | $\\nearrow$ | \n",
"\n",
"Suppose Alice generates the bit string 100100. She then prepares a train of 6 photons in the following manner:\n",
"\n",
"\n",
"| Alice's Random Bits | 1 | 0 | 0 | 1 | 0 | 0 |\n",
"|---|---|---|---|---|---|---|\n",
"| Alice's Random Basis Choice | X | Z | Z | X | Z | X |\n",
"| What Alice Sends Bob | $\\nearrow$ | $\\uparrow$ | $\\uparrow$ | $\\nearrow$ | $\\uparrow$ | $\\nwarrow$ |\n",
"\n",
"\n",
"- Alice sends the qubit sequence to Bob over a quantum channel.\n",
"- Bob randomly chooses his measurement bases.\n",
"- Alice and Bob publicize their measurement bases choices through an open communication channel, and retain those qubits for which the bases match.\n",
"\n",
"\n",
"| Alice's Random Bits | 1 | 0 | 0 | 1 | 0 | 0 |\n",
"|---|---|---|---|---|---|---|\n",
"| Alice's Random Basis Choice | X | Z | Z | X | Z | X |\n",
"| What Alice Sends Bob | $\\nearrow$ | $\\uparrow$ | $\\uparrow$ | $\\nearrow$ | $\\uparrow$ | $\\nwarrow$ |\n",
"| Bob's Random Basis Choice | X | Z | X | X | Z | Z |\n",
"| Shared Information | 1 | 0 | - | 1 | 0 | - |\n",
"\n",
"- A subset of the sequence is used to check for the presence of an eavesdropper. So, if the first two bits are selected, then Alice and Bob would check if they both have the result 10. If their answers don't match, then Eve was probably snooping around. If their answers match, they can use the rest of the sequence, the second 10, as a raw key.\n",
"\n",
"This is the end of the BB84 protocol, but Alice and Bob are not quite yet done with their work. They still have the classical component of QKD to work through! The key that they have at the end of the quantum part is a raw key. Usually the raw key is just that: raw with errors. A final key is distilled from the raw key through post-processing that is completely classical, because they are now working with bit strings. Post-processing includes privacy amplification [3] and information reconcilliation [4]. \n",
"\n",
"Note that the final key needs to be at least as long as the message Alice wants to send in order for it to be used as a cryptographic key. Since the QKD process entails dropping parts of the sequence due to a basis mismatch, an eavesdrop check, and whatever is required during post-processing, the initial sequence should be much larger to account for any type of discardment [5]. \n",
"\n",
"Now let's put this into action using Qiskit, by looking at a very basic, ideal scenario, simply for the purpose of demonstrating BB84 principles. We will simplify what we've described by encoding 0's and 1's as $|0>$ and $|1>$ in the z-basis only (you can come back later to implement a convention like the one described above), and randomly choose between z and x measurements, that is, making use of the Z and H gates.\n",
"\n",
"(If you are unfamiliar with quantum gates, or need a bit of a refresher, check out the Qiskit textbook [6].)\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Created with matplotlib (http://matplotlib.org/) -->\n",
"<svg height=\"357pt\" version=\"1.1\" viewBox=\"0 0 594 357\" width=\"594pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
" <defs>\n",
" <style type=\"text/css\">\n",
"*{stroke-linecap:butt;stroke-linejoin:round;}\n",
" </style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 357.7374 \n",
"L 594.0826 357.7374 \n",
"L 594.0826 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill:#ffffff;\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 391.12487 309.426697 \n",
"L 402.94213 309.426697 \n",
"L 397.0335 319.7668 \n",
"z\n",
"\" style=\"fill:#778899;\"/>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 436.57587 309.426697 \n",
"L 448.39313 309.426697 \n",
"L 442.4845 319.7668 \n",
"z\n",
"\" style=\"fill:#778899;\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 482.02687 309.426697 \n",
"L 493.84413 309.426697 \n",
"L 487.9355 319.7668 \n",
"z\n",
"\" style=\"fill:#778899;\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 527.47787 309.426697 \n",
"L 539.29513 309.426697 \n",
"L 533.3865 319.7668 \n",
"z\n",
"\" style=\"fill:#778899;\"/>\n",
" </g>\n",
" <g id=\"line2d_1\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 101.602 47.0608 \n",
"L 578.8375 47.0608 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_2\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 101.602 92.5118 \n",
"L 578.8375 92.5118 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_3\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 101.602 137.9628 \n",
"L 578.8375 137.9628 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_4\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 101.602 183.4138 \n",
"L 578.8375 183.4138 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_5\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 101.602 228.8648 \n",
"L 578.8375 228.8648 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_6\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 101.602 274.3158 \n",
"L 578.8375 274.3158 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_7\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 101.602 318.289642 \n",
"L 578.8375 318.289642 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_8\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 101.602 321.243957 \n",
"L 578.8375 321.243957 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 160.915555 297.0413 \n",
"L 178.641445 297.0413 \n",
"L 178.641445 24.3353 \n",
"L 160.915555 24.3353 \n",
"z\n",
"\" style=\"fill:#bdbdbd;opacity:0.6;\"/>\n",
" </g>\n",
" <g id=\"patch_7\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 251.817555 297.0413 \n",
"L 269.543445 297.0413 \n",
"L 269.543445 24.3353 \n",
"L 251.817555 24.3353 \n",
"z\n",
"\" style=\"fill:#bdbdbd;opacity:0.6;\"/>\n",
" </g>\n",
" <g id=\"patch_8\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 342.719555 297.0413 \n",
"L 360.445445 297.0413 \n",
"L 360.445445 24.3353 \n",
"L 342.719555 24.3353 \n",
"z\n",
"\" style=\"fill:#bdbdbd;opacity:0.6;\"/>\n",
" </g>\n",
" <g id=\"line2d_9\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 398.510657 47.0608 \n",
"L 398.510657 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_10\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 395.556342 47.0608 \n",
"L 395.556342 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_11\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 443.961657 92.5118 \n",
"L 443.961657 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_12\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 441.007342 92.5118 \n",
"L 441.007342 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_13\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 489.412657 183.4138 \n",
"L 489.412657 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_14\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 486.458342 183.4138 \n",
"L 486.458342 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_15\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 534.863657 228.8648 \n",
"L 534.863657 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_16\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 531.909342 228.8648 \n",
"L 531.909342 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_17\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 128.8726 324.3119 \n",
"L 133.4177 315.2217 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:1.5;\"/>\n",
" </g>\n",
" <g id=\"patch_9\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 109.555925 61.832375 \n",
"L 139.099075 61.832375 \n",
"L 139.099075 32.289225 \n",
"L 109.555925 32.289225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_10\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 109.555925 198.185375 \n",
"L 139.099075 198.185375 \n",
"L 139.099075 168.642225 \n",
"L 109.555925 168.642225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_11\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 200.457925 61.832375 \n",
"L 230.001075 61.832375 \n",
"L 230.001075 32.289225 \n",
"L 200.457925 32.289225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_12\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 200.457925 107.283375 \n",
"L 230.001075 107.283375 \n",
"L 230.001075 77.740225 \n",
"L 200.457925 77.740225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_13\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 200.457925 152.734375 \n",
"L 230.001075 152.734375 \n",
"L 230.001075 123.191225 \n",
"L 200.457925 123.191225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_14\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 200.457925 198.185375 \n",
"L 230.001075 198.185375 \n",
"L 230.001075 168.642225 \n",
"L 200.457925 168.642225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_15\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 200.457925 243.636375 \n",
"L 230.001075 243.636375 \n",
"L 230.001075 214.093225 \n",
"L 200.457925 214.093225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_16\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 200.457925 289.087375 \n",
"L 230.001075 289.087375 \n",
"L 230.001075 259.544225 \n",
"L 200.457925 259.544225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_17\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 291.359925 61.832375 \n",
"L 320.903075 61.832375 \n",
"L 320.903075 32.289225 \n",
"L 291.359925 32.289225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_18\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 291.359925 107.283375 \n",
"L 320.903075 107.283375 \n",
"L 320.903075 77.740225 \n",
"L 291.359925 77.740225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_19\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 291.359925 152.734375 \n",
"L 320.903075 152.734375 \n",
"L 320.903075 123.191225 \n",
"L 291.359925 123.191225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_20\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 291.359925 198.185375 \n",
"L 320.903075 198.185375 \n",
"L 320.903075 168.642225 \n",
"L 291.359925 168.642225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_21\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 291.359925 243.636375 \n",
"L 320.903075 243.636375 \n",
"L 320.903075 214.093225 \n",
"L 291.359925 214.093225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_22\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 291.359925 289.087375 \n",
"L 320.903075 289.087375 \n",
"L 320.903075 259.544225 \n",
"L 291.359925 259.544225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_23\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 382.261925 61.832375 \n",
"L 411.805075 61.832375 \n",
"L 411.805075 32.289225 \n",
"L 382.261925 32.289225 \n",
"z\n",
"\"/>\n",
" </g>\n",
" <g id=\"patch_24\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 407.373602 51.492272 \n",
"C 407.373602 48.750959 406.283458 46.119118 404.345057 44.180716 \n",
"C 402.406655 42.242314 399.774814 41.15217 397.0335 41.15217 \n",
"C 394.292186 41.15217 391.660345 42.242314 389.721943 44.180716 \n",
"C 387.783542 46.119118 386.693397 48.750959 386.693397 51.492272 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linejoin:miter;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"patch_25\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 427.712925 107.283375 \n",
"L 457.256075 107.283375 \n",
"L 457.256075 77.740225 \n",
"L 427.712925 77.740225 \n",
"z\n",
"\"/>\n",
" </g>\n",
" <g id=\"patch_26\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 452.824602 96.943272 \n",
"C 452.824602 94.201959 451.734458 91.570118 449.796057 89.631716 \n",
"C 447.857655 87.693314 445.225814 86.60317 442.4845 86.60317 \n",
"C 439.743186 86.60317 437.111345 87.693314 435.172943 89.631716 \n",
"C 433.234542 91.570118 432.144397 94.201959 432.144397 96.943272 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linejoin:miter;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"patch_27\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 473.163925 198.185375 \n",
"L 502.707075 198.185375 \n",
"L 502.707075 168.642225 \n",
"L 473.163925 168.642225 \n",
"z\n",
"\"/>\n",
" </g>\n",
" <g id=\"patch_28\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 498.275602 187.845272 \n",
"C 498.275602 185.103959 497.185458 182.472118 495.247057 180.533716 \n",
"C 493.308655 178.595314 490.676814 177.50517 487.9355 177.50517 \n",
"C 485.194186 177.50517 482.562345 178.595314 480.623943 180.533716 \n",
"C 478.685542 182.472118 477.595397 185.103959 477.595397 187.845272 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linejoin:miter;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"patch_29\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 518.614925 243.636375 \n",
"L 548.158075 243.636375 \n",
"L 548.158075 214.093225 \n",
"L 518.614925 214.093225 \n",
"z\n",
"\"/>\n",
" </g>\n",
" <g id=\"patch_30\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 543.726602 233.296272 \n",
"C 543.726602 230.554959 542.636458 227.923118 540.698057 225.984716 \n",
"C 538.759655 224.046314 536.127814 222.95617 533.3865 222.95617 \n",
"C 530.645186 222.95617 528.013345 224.046314 526.074943 225.984716 \n",
"C 524.136542 227.923118 523.046397 230.554959 523.046397 233.296272 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linejoin:miter;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_18\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 397.0335 51.492272 \n",
"L 407.373602 41.15217 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_19\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 442.4845 96.943272 \n",
"L 452.824602 86.60317 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_20\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 487.9355 187.845272 \n",
"L 498.275602 177.50517 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_21\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 533.3865 233.296272 \n",
"L 543.726602 222.95617 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_22\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 169.7785 24.3353 \n",
"L 169.7785 69.7863 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_23\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 169.7785 69.7863 \n",
"L 169.7785 115.2373 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_24\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 169.7785 115.2373 \n",
"L 169.7785 160.6883 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_25\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 169.7785 160.6883 \n",
"L 169.7785 206.1393 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_26\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 169.7785 206.1393 \n",
"L 169.7785 251.5903 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_27\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 169.7785 251.5903 \n",
"L 169.7785 297.0413 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_28\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 260.6805 24.3353 \n",
"L 260.6805 69.7863 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_29\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 260.6805 69.7863 \n",
"L 260.6805 115.2373 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_30\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 260.6805 115.2373 \n",
"L 260.6805 160.6883 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_31\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 260.6805 160.6883 \n",
"L 260.6805 206.1393 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_32\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 260.6805 206.1393 \n",
"L 260.6805 251.5903 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_33\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 260.6805 251.5903 \n",
"L 260.6805 297.0413 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_34\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 351.5825 24.3353 \n",
"L 351.5825 69.7863 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_35\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 351.5825 69.7863 \n",
"L 351.5825 115.2373 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_36\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 351.5825 115.2373 \n",
"L 351.5825 160.6883 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_37\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 351.5825 160.6883 \n",
"L 351.5825 206.1393 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_38\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 351.5825 206.1393 \n",
"L 351.5825 251.5903 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_39\">\n",
" <path clip-path=\"url(#p969f842b42)\" d=\"M 351.5825 251.5903 \n",
"L 351.5825 297.0413 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $X$ -->\n",
" <defs>\n",
" <path d=\"M 13.71875 72.90625 \n",
"L 23.6875 72.90625 \n",
"L 36.1875 46.578125 \n",
"L 58.796875 72.90625 \n",
"L 70.3125 72.90625 \n",
"L 40.28125 38.09375 \n",
"L 58.40625 0 \n",
"L 48.484375 0 \n",
"L 33.796875 30.71875 \n",
"L 7.171875 0 \n",
"L -4.296875 0 \n",
"L 29.78125 39.203125 \n",
"z\n",
"\" id=\"DejaVuSans-Oblique-58\"/>\n",
" </defs>\n",
" <g transform=\"translate(119.8425 50.647987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-58\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $X$ -->\n",
" <g transform=\"translate(119.8425 187.000987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-58\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $H$ -->\n",
" <defs>\n",
" <path d=\"M 16.890625 72.90625 \n",
"L 26.8125 72.90625 \n",
"L 21 43.015625 \n",
"L 56.78125 43.015625 \n",
"L 62.59375 72.90625 \n",
"L 72.515625 72.90625 \n",
"L 58.296875 0 \n",
"L 48.390625 0 \n",
"L 55.171875 34.71875 \n",
"L 19.390625 34.71875 \n",
"L 12.59375 0 \n",
"L 2.6875 0 \n",
"z\n",
"\" id=\"DejaVuSans-Oblique-48\"/>\n",
" </defs>\n",
" <g transform=\"translate(210.2895 50.647987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $Z$ -->\n",
" <defs>\n",
" <path d=\"M 13.09375 72.90625 \n",
"L 70.3125 72.90625 \n",
"L 68.890625 65.375 \n",
"L 12.40625 8.296875 \n",
"L 58.890625 8.296875 \n",
"L 57.328125 0 \n",
"L -2.203125 0 \n",
"L -0.78125 7.515625 \n",
"L 55.71875 64.59375 \n",
"L 11.53125 64.59375 \n",
"z\n",
"\" id=\"DejaVuSans-Oblique-5a\"/>\n",
" </defs>\n",
" <g transform=\"translate(210.7445 96.098987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(210.7445 141.549987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(210.2895 187.000987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(210.7445 232.451987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(210.2895 277.902987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_9\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(301.1915 50.647987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_10\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(301.6465 96.098987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_11\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(301.1915 141.549987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_12\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(301.1915 187.000987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_13\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(301.6465 232.451987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_14\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(301.6465 277.902987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_15\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- 0 -->\n",
" <defs>\n",
" <path d=\"M 31.78125 66.40625 \n",
"Q 24.171875 66.40625 20.328125 58.90625 \n",
"Q 16.5 51.421875 16.5 36.375 \n",
"Q 16.5 21.390625 20.328125 13.890625 \n",
"Q 24.171875 6.390625 31.78125 6.390625 \n",
"Q 39.453125 6.390625 43.28125 13.890625 \n",
"Q 47.125 21.390625 47.125 36.375 \n",
"Q 47.125 51.421875 43.28125 58.90625 \n",
"Q 39.453125 66.40625 31.78125 66.40625 \n",
"M 31.78125 74.21875 \n",
"Q 44.046875 74.21875 50.515625 64.515625 \n",
"Q 56.984375 54.828125 56.984375 36.375 \n",
"Q 56.984375 17.96875 50.515625 8.265625 \n",
"Q 44.046875 -1.421875 31.78125 -1.421875 \n",
"Q 19.53125 -1.421875 13.0625 8.265625 \n",
"Q 6.59375 17.96875 6.59375 36.375 \n",
"Q 6.59375 54.828125 13.0625 64.515625 \n",
"Q 19.53125 74.21875 31.78125 74.21875 \n",
"\" id=\"DejaVuSans-30\"/>\n",
" </defs>\n",
" <g transform=\"translate(408.39625 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_16\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- 1 -->\n",
" <defs>\n",
" <path d=\"M 12.40625 8.296875 \n",
"L 28.515625 8.296875 \n",
"L 28.515625 63.921875 \n",
"L 10.984375 60.40625 \n",
"L 10.984375 69.390625 \n",
"L 28.421875 72.90625 \n",
"L 38.28125 72.90625 \n",
"L 38.28125 8.296875 \n",
"L 54.390625 8.296875 \n",
"L 54.390625 0 \n",
"L 12.40625 0 \n",
"z\n",
"\" id=\"DejaVuSans-31\"/>\n",
" </defs>\n",
" <g transform=\"translate(453.84725 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_17\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- 3 -->\n",
" <defs>\n",
" <path d=\"M 40.578125 39.3125 \n",
"Q 47.65625 37.796875 51.625 33 \n",
"Q 55.609375 28.21875 55.609375 21.1875 \n",
"Q 55.609375 10.40625 48.1875 4.484375 \n",
"Q 40.765625 -1.421875 27.09375 -1.421875 \n",
"Q 22.515625 -1.421875 17.65625 -0.515625 \n",
"Q 12.796875 0.390625 7.625 2.203125 \n",
"L 7.625 11.71875 \n",
"Q 11.71875 9.328125 16.59375 8.109375 \n",
"Q 21.484375 6.890625 26.8125 6.890625 \n",
"Q 36.078125 6.890625 40.9375 10.546875 \n",
"Q 45.796875 14.203125 45.796875 21.1875 \n",
"Q 45.796875 27.640625 41.28125 31.265625 \n",
"Q 36.765625 34.90625 28.71875 34.90625 \n",
"L 20.21875 34.90625 \n",
"L 20.21875 43.015625 \n",
"L 29.109375 43.015625 \n",
"Q 36.375 43.015625 40.234375 45.921875 \n",
"Q 44.09375 48.828125 44.09375 54.296875 \n",
"Q 44.09375 59.90625 40.109375 62.90625 \n",
"Q 36.140625 65.921875 28.71875 65.921875 \n",
"Q 24.65625 65.921875 20.015625 65.03125 \n",
"Q 15.375 64.15625 9.8125 62.3125 \n",
"L 9.8125 71.09375 \n",
"Q 15.4375 72.65625 20.34375 73.4375 \n",
"Q 25.25 74.21875 29.59375 74.21875 \n",
"Q 40.828125 74.21875 47.359375 69.109375 \n",
"Q 53.90625 64.015625 53.90625 55.328125 \n",
"Q 53.90625 49.265625 50.4375 45.09375 \n",
"Q 46.96875 40.921875 40.578125 39.3125 \n",
"\" id=\"DejaVuSans-33\"/>\n",
" </defs>\n",
" <g transform=\"translate(499.29825 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_18\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- 4 -->\n",
" <defs>\n",
" <path d=\"M 37.796875 64.3125 \n",
"L 12.890625 25.390625 \n",
"L 37.796875 25.390625 \n",
"z\n",
"M 35.203125 72.90625 \n",
"L 47.609375 72.90625 \n",
"L 47.609375 25.390625 \n",
"L 58.015625 25.390625 \n",
"L 58.015625 17.1875 \n",
"L 47.609375 17.1875 \n",
"L 47.609375 0 \n",
"L 37.796875 0 \n",
"L 37.796875 17.1875 \n",
"L 4.890625 17.1875 \n",
"L 4.890625 26.703125 \n",
"z\n",
"\" id=\"DejaVuSans-34\"/>\n",
" </defs>\n",
" <g transform=\"translate(544.74925 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_19\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $q_{0}$ -->\n",
" <defs>\n",
" <path d=\"M 41.703125 8.203125 \n",
"Q 38.09375 3.46875 33.171875 1.015625 \n",
"Q 28.265625 -1.421875 22.3125 -1.421875 \n",
"Q 14.015625 -1.421875 9.296875 4.171875 \n",
"Q 4.59375 9.765625 4.59375 19.578125 \n",
"Q 4.59375 27.484375 7.5 34.859375 \n",
"Q 10.40625 42.234375 15.828125 48.09375 \n",
"Q 19.34375 51.90625 23.90625 53.953125 \n",
"Q 28.46875 56 33.5 56 \n",
"Q 39.546875 56 43.453125 53.609375 \n",
"Q 47.359375 51.21875 49.125 46.390625 \n",
"L 50.6875 54.59375 \n",
"L 59.71875 54.59375 \n",
"L 45.125 -20.609375 \n",
"L 36.078125 -20.609375 \n",
"z\n",
"M 13.921875 20.90625 \n",
"Q 13.921875 13.671875 16.9375 9.890625 \n",
"Q 19.96875 6.109375 25.6875 6.109375 \n",
"Q 34.1875 6.109375 40.1875 14.234375 \n",
"Q 46.1875 22.359375 46.1875 33.984375 \n",
"Q 46.1875 41.015625 43.078125 44.75 \n",
"Q 39.984375 48.484375 34.1875 48.484375 \n",
"Q 29.9375 48.484375 26.3125 46.5 \n",
"Q 22.703125 44.53125 20.015625 40.71875 \n",
"Q 17.1875 36.71875 15.546875 31.34375 \n",
"Q 13.921875 25.984375 13.921875 20.90625 \n",
"\" id=\"DejaVuSans-Oblique-71\"/>\n",
" </defs>\n",
" <g transform=\"translate(60.839 51.511777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_20\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $q_{1}$ -->\n",
" <g transform=\"translate(60.839 96.962777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_21\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $q_{2}$ -->\n",
" <defs>\n",
" <path d=\"M 19.1875 8.296875 \n",
"L 53.609375 8.296875 \n",
"L 53.609375 0 \n",
"L 7.328125 0 \n",
"L 7.328125 8.296875 \n",
"Q 12.9375 14.109375 22.625 23.890625 \n",
"Q 32.328125 33.6875 34.8125 36.53125 \n",
"Q 39.546875 41.84375 41.421875 45.53125 \n",
"Q 43.3125 49.21875 43.3125 52.78125 \n",
"Q 43.3125 58.59375 39.234375 62.25 \n",
"Q 35.15625 65.921875 28.609375 65.921875 \n",
"Q 23.96875 65.921875 18.8125 64.3125 \n",
"Q 13.671875 62.703125 7.8125 59.421875 \n",
"L 7.8125 69.390625 \n",
"Q 13.765625 71.78125 18.9375 73 \n",
"Q 24.125 74.21875 28.421875 74.21875 \n",
"Q 39.75 74.21875 46.484375 68.546875 \n",
"Q 53.21875 62.890625 53.21875 53.421875 \n",
"Q 53.21875 48.921875 51.53125 44.890625 \n",
"Q 49.859375 40.875 45.40625 35.40625 \n",
"Q 44.1875 33.984375 37.640625 27.21875 \n",
"Q 31.109375 20.453125 19.1875 8.296875 \n",
"\" id=\"DejaVuSans-32\"/>\n",
" </defs>\n",
" <g transform=\"translate(60.839 142.413777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-32\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_22\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $q_{3}$ -->\n",
" <g transform=\"translate(60.839 187.864777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_23\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $q_{4}$ -->\n",
" <g transform=\"translate(60.839 233.315777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_24\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $q_{5}$ -->\n",
" <defs>\n",
" <path d=\"M 10.796875 72.90625 \n",
"L 49.515625 72.90625 \n",
"L 49.515625 64.59375 \n",
"L 19.828125 64.59375 \n",
"L 19.828125 46.734375 \n",
"Q 21.96875 47.46875 24.109375 47.828125 \n",
"Q 26.265625 48.1875 28.421875 48.1875 \n",
"Q 40.625 48.1875 47.75 41.5 \n",
"Q 54.890625 34.8125 54.890625 23.390625 \n",
"Q 54.890625 11.625 47.5625 5.09375 \n",
"Q 40.234375 -1.421875 26.90625 -1.421875 \n",
"Q 22.3125 -1.421875 17.546875 -0.640625 \n",
"Q 12.796875 0.140625 7.71875 1.703125 \n",
"L 7.71875 11.625 \n",
"Q 12.109375 9.234375 16.796875 8.0625 \n",
"Q 21.484375 6.890625 26.703125 6.890625 \n",
"Q 35.15625 6.890625 40.078125 11.328125 \n",
"Q 45.015625 15.765625 45.015625 23.390625 \n",
"Q 45.015625 31 40.078125 35.4375 \n",
"Q 35.15625 39.890625 26.703125 39.890625 \n",
"Q 22.75 39.890625 18.8125 39.015625 \n",
"Q 14.890625 38.140625 10.796875 36.28125 \n",
"z\n",
"\" id=\"DejaVuSans-35\"/>\n",
" </defs>\n",
" <g transform=\"translate(60.839 278.766777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-35\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_25\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- 6 -->\n",
" <defs>\n",
" <path d=\"M 33.015625 40.375 \n",
"Q 26.375 40.375 22.484375 35.828125 \n",
"Q 18.609375 31.296875 18.609375 23.390625 \n",
"Q 18.609375 15.53125 22.484375 10.953125 \n",
"Q 26.375 6.390625 33.015625 6.390625 \n",
"Q 39.65625 6.390625 43.53125 10.953125 \n",
"Q 47.40625 15.53125 47.40625 23.390625 \n",
"Q 47.40625 31.296875 43.53125 35.828125 \n",
"Q 39.65625 40.375 33.015625 40.375 \n",
"M 52.59375 71.296875 \n",
"L 52.59375 62.3125 \n",
"Q 48.875 64.0625 45.09375 64.984375 \n",
"Q 41.3125 65.921875 37.59375 65.921875 \n",
"Q 27.828125 65.921875 22.671875 59.328125 \n",
"Q 17.53125 52.734375 16.796875 39.40625 \n",
"Q 19.671875 43.65625 24.015625 45.921875 \n",
"Q 28.375 48.1875 33.59375 48.1875 \n",
"Q 44.578125 48.1875 50.953125 41.515625 \n",
"Q 57.328125 34.859375 57.328125 23.390625 \n",
"Q 57.328125 12.15625 50.6875 5.359375 \n",
"Q 44.046875 -1.421875 33.015625 -1.421875 \n",
"Q 20.359375 -1.421875 13.671875 8.265625 \n",
"Q 6.984375 17.96875 6.984375 36.375 \n",
"Q 6.984375 53.65625 15.1875 63.9375 \n",
"Q 23.390625 74.21875 37.203125 74.21875 \n",
"Q 40.921875 74.21875 44.703125 73.484375 \n",
"Q 48.484375 72.75 52.59375 71.296875 \n",
"\" id=\"DejaVuSans-36\"/>\n",
" </defs>\n",
" <g transform=\"translate(124.3275 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-36\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_26\">\n",
" <g clip-path=\"url(#p969f842b42)\">\n",
" <!-- $c$ -->\n",
" <defs>\n",
" <path d=\"M 53.609375 52.59375 \n",
"L 51.8125 43.703125 \n",
"Q 48.578125 46.046875 44.9375 47.21875 \n",
"Q 41.3125 48.390625 37.40625 48.390625 \n",
"Q 33.109375 48.390625 29.21875 46.875 \n",
"Q 25.34375 45.359375 22.703125 42.578125 \n",
"Q 18.5 38.328125 16.203125 32.609375 \n",
"Q 13.921875 26.90625 13.921875 20.796875 \n",
"Q 13.921875 13.421875 17.609375 9.8125 \n",
"Q 21.296875 6.203125 28.8125 6.203125 \n",
"Q 32.515625 6.203125 36.6875 7.328125 \n",
"Q 40.875 8.453125 45.40625 10.6875 \n",
"L 43.703125 1.8125 \n",
"Q 39.796875 0.203125 35.671875 -0.609375 \n",
"Q 31.546875 -1.421875 27.203125 -1.421875 \n",
"Q 16.3125 -1.421875 10.453125 4.015625 \n",
"Q 4.59375 9.46875 4.59375 19.578125 \n",
"Q 4.59375 28.078125 7.640625 35.234375 \n",
"Q 10.6875 42.390625 16.703125 48.09375 \n",
"Q 20.796875 52 26.3125 54 \n",
"Q 31.84375 56 38.375 56 \n",
"Q 42.1875 56 45.9375 55.140625 \n",
"Q 49.703125 54.296875 53.609375 52.59375 \n",
"\" id=\"DejaVuSans-Oblique-63\"/>\n",
" </defs>\n",
" <g transform=\"translate(68.1515 325.147581)scale(0.195 -0.195)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-63\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"p969f842b42\">\n",
" <rect height=\"336.3374\" width=\"572.6826\" x=\"10.7\" y=\"10.7\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<matplotlib.figure.Figure at 0x12aad4e10>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from qiskit import *\n",
"from qiskit.visualization import plot_histogram\n",
"%config InlineBackend.figure_format = 'svg'\n",
"\n",
"qc_ab = QuantumCircuit(6,6) #Create a quantum circuit with 6 qubits and 6 classical bits\n",
"\n",
"\n",
"##ENCODE BIT STRING\n",
"#The random bit sequence Alice needs to encode is: 100100, so the first and fourth qubits are flipped from |0> -> |1>\n",
"qc_ab.x(0) #The first qubit is indexed at 0, following Python being zero-indexed. From now on it'll be referred to as qubit 0 and so on.\n",
"qc_ab.x(3) \n",
"qc_ab.barrier()\n",
"\n",
"\n",
"##ALICE CHOOSES\n",
"#Alice randomly chooses to apply an X or an H. \n",
"#Note that since the state is already either a |0> or |1>, a Z essentially leaves the qubit state unchanged. But let's write it anyway, shall we? \n",
"\n",
"qc_ab.h(0) # or qc.z(0) # switch these based on your own choice\n",
"qc_ab.z(1) # or qc.h(1)\n",
"qc_ab.z(2) # or qc.h(2)\n",
"qc_ab.h(3) # or qc.z(3)\n",
"qc_ab.z(4) # or qc.h(4)\n",
"qc_ab.h(5) # or qc.z(5)\n",
"qc_ab.barrier()\n",
"\n",
"\n",
"##BOB CHOOSES\n",
"#Alice sends the qubit sequence to Bob, and Bob randomly chooses measurements\n",
"qc_ab.h(0) # or qc.z(0) # switch these based on your own choice\n",
"qc_ab.z(1) # or qc.h(1)\n",
"qc_ab.h(2) # or qc.z(2)\n",
"qc_ab.h(3) # or qc.z(3)\n",
"qc_ab.z(4) # or qc.h(4)\n",
"qc_ab.z(5) # or qc.h(5)\n",
"qc_ab.barrier()\n",
"\n",
"\n",
"##PUBLICIZE CHOICES\n",
"#Alice and Bob publicize their choices and only retain those for which their choices match. In this case: qubits 0,1,3,4. \n",
"#Note: technically Bob performs the measurement BEFORE publicizing, but we're combining the two here since no one is actually communicating.\n",
"\n",
"qc_ab.measure(0,0)\n",
"qc_ab.measure(1,1)\n",
"qc_ab.measure(3,3)\n",
"qc_ab.measure(4,4)\n",
"\n",
"\n",
"#qc_ab.measure(2,2) #come back to uncomment these to see what happens to the results after you've run this once\n",
"#qc_ab.measure(5,5)\n",
"\n",
"\n",
"qc_ab.draw(output='mpl') #let's see what this circuit looks like!\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Created with matplotlib (http://matplotlib.org/) -->\n",
"<svg height=\"351pt\" version=\"1.1\" viewBox=\"0 0 464 351\" width=\"464pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
" <defs>\n",
" <style type=\"text/css\">\n",
"*{stroke-linecap:butt;stroke-linejoin:round;}\n",
" </style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 351.556031 \n",
"L 464.22125 351.556031 \n",
"L 464.22125 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill:none;\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path d=\"M 62.92125 282.5 \n",
"L 453.52125 282.5 \n",
"L 453.52125 10.7 \n",
"L 62.92125 10.7 \n",
"z\n",
"\" style=\"fill:#eeeeee;\"/>\n",
" </g>\n",
" <g id=\"matplotlib.axis_1\">\n",
" <g id=\"xtick_1\">\n",
" <g id=\"line2d_1\">\n",
" <defs>\n",
" <path d=\"M 0 0 \n",
"L 0 3.5 \n",
"\" id=\"mc84aa14327\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n",
" </defs>\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"258.22125\" xlink:href=\"#mc84aa14327\" y=\"282.5\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <!-- 001001 -->\n",
" <defs>\n",
" <path d=\"M 31.78125 66.40625 \n",
"Q 24.171875 66.40625 20.328125 58.90625 \n",
"Q 16.5 51.421875 16.5 36.375 \n",
"Q 16.5 21.390625 20.328125 13.890625 \n",
"Q 24.171875 6.390625 31.78125 6.390625 \n",
"Q 39.453125 6.390625 43.28125 13.890625 \n",
"Q 47.125 21.390625 47.125 36.375 \n",
"Q 47.125 51.421875 43.28125 58.90625 \n",
"Q 39.453125 66.40625 31.78125 66.40625 \n",
"M 31.78125 74.21875 \n",
"Q 44.046875 74.21875 50.515625 64.515625 \n",
"Q 56.984375 54.828125 56.984375 36.375 \n",
"Q 56.984375 17.96875 50.515625 8.265625 \n",
"Q 44.046875 -1.421875 31.78125 -1.421875 \n",
"Q 19.53125 -1.421875 13.0625 8.265625 \n",
"Q 6.59375 17.96875 6.59375 36.375 \n",
"Q 6.59375 54.828125 13.0625 64.515625 \n",
"Q 19.53125 74.21875 31.78125 74.21875 \n",
"\" id=\"DejaVuSans-30\"/>\n",
" <path d=\"M 12.40625 8.296875 \n",
"L 28.515625 8.296875 \n",
"L 28.515625 63.921875 \n",
"L 10.984375 60.40625 \n",
"L 10.984375 69.390625 \n",
"L 28.421875 72.90625 \n",
"L 38.28125 72.90625 \n",
"L 38.28125 8.296875 \n",
"L 54.390625 8.296875 \n",
"L 54.390625 0 \n",
"L 12.40625 0 \n",
"z\n",
"\" id=\"DejaVuSans-31\"/>\n",
" </defs>\n",
" <g transform=\"translate(252.711767 343.360218)rotate(-70)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"127.246094\" xlink:href=\"#DejaVuSans-31\"/>\n",
" <use x=\"190.869141\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"254.492188\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"318.115234\" xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_2\">\n",
" <g id=\"ytick_1\">\n",
" <g id=\"line2d_2\">\n",
" <path clip-path=\"url(#p12c305987d)\" d=\"M 62.92125 282.5 \n",
"L 453.52125 282.5 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_3\">\n",
" <defs>\n",
" <path d=\"M 0 0 \n",
"L -3.5 0 \n",
"\" id=\"mc994a0d911\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n",
" </defs>\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#mc994a0d911\" y=\"282.5\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <!-- 0.00 -->\n",
" <defs>\n",
" <path d=\"M 10.6875 12.40625 \n",
"L 21 12.40625 \n",
"L 21 0 \n",
"L 10.6875 0 \n",
"z\n",
"\" id=\"DejaVuSans-2e\"/>\n",
" </defs>\n",
" <g transform=\"translate(24.749375 287.818906)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_2\">\n",
" <g id=\"line2d_4\">\n",
" <path clip-path=\"url(#p12c305987d)\" d=\"M 62.92125 225.875 \n",
"L 453.52125 225.875 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_5\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#mc994a0d911\" y=\"225.875\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <!-- 0.25 -->\n",
" <defs>\n",
" <path d=\"M 19.1875 8.296875 \n",
"L 53.609375 8.296875 \n",
"L 53.609375 0 \n",
"L 7.328125 0 \n",
"L 7.328125 8.296875 \n",
"Q 12.9375 14.109375 22.625 23.890625 \n",
"Q 32.328125 33.6875 34.8125 36.53125 \n",
"Q 39.546875 41.84375 41.421875 45.53125 \n",
"Q 43.3125 49.21875 43.3125 52.78125 \n",
"Q 43.3125 58.59375 39.234375 62.25 \n",
"Q 35.15625 65.921875 28.609375 65.921875 \n",
"Q 23.96875 65.921875 18.8125 64.3125 \n",
"Q 13.671875 62.703125 7.8125 59.421875 \n",
"L 7.8125 69.390625 \n",
"Q 13.765625 71.78125 18.9375 73 \n",
"Q 24.125 74.21875 28.421875 74.21875 \n",
"Q 39.75 74.21875 46.484375 68.546875 \n",
"Q 53.21875 62.890625 53.21875 53.421875 \n",
"Q 53.21875 48.921875 51.53125 44.890625 \n",
"Q 49.859375 40.875 45.40625 35.40625 \n",
"Q 44.1875 33.984375 37.640625 27.21875 \n",
"Q 31.109375 20.453125 19.1875 8.296875 \n",
"\" id=\"DejaVuSans-32\"/>\n",
" <path d=\"M 10.796875 72.90625 \n",
"L 49.515625 72.90625 \n",
"L 49.515625 64.59375 \n",
"L 19.828125 64.59375 \n",
"L 19.828125 46.734375 \n",
"Q 21.96875 47.46875 24.109375 47.828125 \n",
"Q 26.265625 48.1875 28.421875 48.1875 \n",
"Q 40.625 48.1875 47.75 41.5 \n",
"Q 54.890625 34.8125 54.890625 23.390625 \n",
"Q 54.890625 11.625 47.5625 5.09375 \n",
"Q 40.234375 -1.421875 26.90625 -1.421875 \n",
"Q 22.3125 -1.421875 17.546875 -0.640625 \n",
"Q 12.796875 0.140625 7.71875 1.703125 \n",
"L 7.71875 11.625 \n",
"Q 12.109375 9.234375 16.796875 8.0625 \n",
"Q 21.484375 6.890625 26.703125 6.890625 \n",
"Q 35.15625 6.890625 40.078125 11.328125 \n",
"Q 45.015625 15.765625 45.015625 23.390625 \n",
"Q 45.015625 31 40.078125 35.4375 \n",
"Q 35.15625 39.890625 26.703125 39.890625 \n",
"Q 22.75 39.890625 18.8125 39.015625 \n",
"Q 14.890625 38.140625 10.796875 36.28125 \n",
"z\n",
"\" id=\"DejaVuSans-35\"/>\n",
" </defs>\n",
" <g transform=\"translate(24.749375 231.193906)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-32\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-35\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_3\">\n",
" <g id=\"line2d_6\">\n",
" <path clip-path=\"url(#p12c305987d)\" d=\"M 62.92125 169.25 \n",
"L 453.52125 169.25 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_7\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#mc994a0d911\" y=\"169.25\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <!-- 0.50 -->\n",
" <g transform=\"translate(24.749375 174.568906)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-35\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_4\">\n",
" <g id=\"line2d_8\">\n",
" <path clip-path=\"url(#p12c305987d)\" d=\"M 62.92125 112.625 \n",
"L 453.52125 112.625 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_9\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#mc994a0d911\" y=\"112.625\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <!-- 0.75 -->\n",
" <defs>\n",
" <path d=\"M 8.203125 72.90625 \n",
"L 55.078125 72.90625 \n",
"L 55.078125 68.703125 \n",
"L 28.609375 0 \n",
"L 18.3125 0 \n",
"L 43.21875 64.59375 \n",
"L 8.203125 64.59375 \n",
"z\n",
"\" id=\"DejaVuSans-37\"/>\n",
" </defs>\n",
" <g transform=\"translate(24.749375 117.943906)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-37\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-35\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_5\">\n",
" <g id=\"line2d_10\">\n",
" <path clip-path=\"url(#p12c305987d)\" d=\"M 62.92125 56 \n",
"L 453.52125 56 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_11\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#mc994a0d911\" y=\"56\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <!-- 1.00 -->\n",
" <g transform=\"translate(24.749375 61.318906)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <!-- Probabilities -->\n",
" <defs>\n",
" <path d=\"M 19.671875 64.796875 \n",
"L 19.671875 37.40625 \n",
"L 32.078125 37.40625 \n",
"Q 38.96875 37.40625 42.71875 40.96875 \n",
"Q 46.484375 44.53125 46.484375 51.125 \n",
"Q 46.484375 57.671875 42.71875 61.234375 \n",
"Q 38.96875 64.796875 32.078125 64.796875 \n",
"z\n",
"M 9.8125 72.90625 \n",
"L 32.078125 72.90625 \n",
"Q 44.34375 72.90625 50.609375 67.359375 \n",
"Q 56.890625 61.8125 56.890625 51.125 \n",
"Q 56.890625 40.328125 50.609375 34.8125 \n",
"Q 44.34375 29.296875 32.078125 29.296875 \n",
"L 19.671875 29.296875 \n",
"L 19.671875 0 \n",
"L 9.8125 0 \n",
"z\n",
"\" id=\"DejaVuSans-50\"/>\n",
" <path d=\"M 41.109375 46.296875 \n",
"Q 39.59375 47.171875 37.8125 47.578125 \n",
"Q 36.03125 48 33.890625 48 \n",
"Q 26.265625 48 22.1875 43.046875 \n",
"Q 18.109375 38.09375 18.109375 28.8125 \n",
"L 18.109375 0 \n",
"L 9.078125 0 \n",
"L 9.078125 54.6875 \n",
"L 18.109375 54.6875 \n",
"L 18.109375 46.1875 \n",
"Q 20.953125 51.171875 25.484375 53.578125 \n",
"Q 30.03125 56 36.53125 56 \n",
"Q 37.453125 56 38.578125 55.875 \n",
"Q 39.703125 55.765625 41.0625 55.515625 \n",
"z\n",
"\" id=\"DejaVuSans-72\"/>\n",
" <path d=\"M 30.609375 48.390625 \n",
"Q 23.390625 48.390625 19.1875 42.75 \n",
"Q 14.984375 37.109375 14.984375 27.296875 \n",
"Q 14.984375 17.484375 19.15625 11.84375 \n",
"Q 23.34375 6.203125 30.609375 6.203125 \n",
"Q 37.796875 6.203125 41.984375 11.859375 \n",
"Q 46.1875 17.53125 46.1875 27.296875 \n",
"Q 46.1875 37.015625 41.984375 42.703125 \n",
"Q 37.796875 48.390625 30.609375 48.390625 \n",
"M 30.609375 56 \n",
"Q 42.328125 56 49.015625 48.375 \n",
"Q 55.71875 40.765625 55.71875 27.296875 \n",
"Q 55.71875 13.875 49.015625 6.21875 \n",
"Q 42.328125 -1.421875 30.609375 -1.421875 \n",
"Q 18.84375 -1.421875 12.171875 6.21875 \n",
"Q 5.515625 13.875 5.515625 27.296875 \n",
"Q 5.515625 40.765625 12.171875 48.375 \n",
"Q 18.84375 56 30.609375 56 \n",
"\" id=\"DejaVuSans-6f\"/>\n",
" <path d=\"M 48.6875 27.296875 \n",
"Q 48.6875 37.203125 44.609375 42.84375 \n",
"Q 40.53125 48.484375 33.40625 48.484375 \n",
"Q 26.265625 48.484375 22.1875 42.84375 \n",
"Q 18.109375 37.203125 18.109375 27.296875 \n",
"Q 18.109375 17.390625 22.1875 11.75 \n",
"Q 26.265625 6.109375 33.40625 6.109375 \n",
"Q 40.53125 6.109375 44.609375 11.75 \n",
"Q 48.6875 17.390625 48.6875 27.296875 \n",
"M 18.109375 46.390625 \n",
"Q 20.953125 51.265625 25.265625 53.625 \n",
"Q 29.59375 56 35.59375 56 \n",
"Q 45.5625 56 51.78125 48.09375 \n",
"Q 58.015625 40.1875 58.015625 27.296875 \n",
"Q 58.015625 14.40625 51.78125 6.484375 \n",
"Q 45.5625 -1.421875 35.59375 -1.421875 \n",
"Q 29.59375 -1.421875 25.265625 0.953125 \n",
"Q 20.953125 3.328125 18.109375 8.203125 \n",
"L 18.109375 0 \n",
"L 9.078125 0 \n",
"L 9.078125 75.984375 \n",
"L 18.109375 75.984375 \n",
"z\n",
"\" id=\"DejaVuSans-62\"/>\n",
" <path d=\"M 34.28125 27.484375 \n",
"Q 23.390625 27.484375 19.1875 25 \n",
"Q 14.984375 22.515625 14.984375 16.5 \n",
"Q 14.984375 11.71875 18.140625 8.90625 \n",
"Q 21.296875 6.109375 26.703125 6.109375 \n",
"Q 34.1875 6.109375 38.703125 11.40625 \n",
"Q 43.21875 16.703125 43.21875 25.484375 \n",
"L 43.21875 27.484375 \n",
"z\n",
"M 52.203125 31.203125 \n",
"L 52.203125 0 \n",
"L 43.21875 0 \n",
"L 43.21875 8.296875 \n",
"Q 40.140625 3.328125 35.546875 0.953125 \n",
"Q 30.953125 -1.421875 24.3125 -1.421875 \n",
"Q 15.921875 -1.421875 10.953125 3.296875 \n",
"Q 6 8.015625 6 15.921875 \n",
"Q 6 25.140625 12.171875 29.828125 \n",
"Q 18.359375 34.515625 30.609375 34.515625 \n",
"L 43.21875 34.515625 \n",
"L 43.21875 35.40625 \n",
"Q 43.21875 41.609375 39.140625 45 \n",
"Q 35.0625 48.390625 27.6875 48.390625 \n",
"Q 23 48.390625 18.546875 47.265625 \n",
"Q 14.109375 46.140625 10.015625 43.890625 \n",
"L 10.015625 52.203125 \n",
"Q 14.9375 54.109375 19.578125 55.046875 \n",
"Q 24.21875 56 28.609375 56 \n",
"Q 40.484375 56 46.34375 49.84375 \n",
"Q 52.203125 43.703125 52.203125 31.203125 \n",
"\" id=\"DejaVuSans-61\"/>\n",
" <path d=\"M 9.421875 54.6875 \n",
"L 18.40625 54.6875 \n",
"L 18.40625 0 \n",
"L 9.421875 0 \n",
"z\n",
"M 9.421875 75.984375 \n",
"L 18.40625 75.984375 \n",
"L 18.40625 64.59375 \n",
"L 9.421875 64.59375 \n",
"z\n",
"\" id=\"DejaVuSans-69\"/>\n",
" <path d=\"M 9.421875 75.984375 \n",
"L 18.40625 75.984375 \n",
"L 18.40625 0 \n",
"L 9.421875 0 \n",
"z\n",
"\" id=\"DejaVuSans-6c\"/>\n",
" <path d=\"M 18.3125 70.21875 \n",
"L 18.3125 54.6875 \n",
"L 36.8125 54.6875 \n",
"L 36.8125 47.703125 \n",
"L 18.3125 47.703125 \n",
"L 18.3125 18.015625 \n",
"Q 18.3125 11.328125 20.140625 9.421875 \n",
"Q 21.96875 7.515625 27.59375 7.515625 \n",
"L 36.8125 7.515625 \n",
"L 36.8125 0 \n",
"L 27.59375 0 \n",
"Q 17.1875 0 13.234375 3.875 \n",
"Q 9.28125 7.765625 9.28125 18.015625 \n",
"L 9.28125 47.703125 \n",
"L 2.6875 47.703125 \n",
"L 2.6875 54.6875 \n",
"L 9.28125 54.6875 \n",
"L 9.28125 70.21875 \n",
"z\n",
"\" id=\"DejaVuSans-74\"/>\n",
" <path d=\"M 56.203125 29.59375 \n",
"L 56.203125 25.203125 \n",
"L 14.890625 25.203125 \n",
"Q 15.484375 15.921875 20.484375 11.0625 \n",
"Q 25.484375 6.203125 34.421875 6.203125 \n",
"Q 39.59375 6.203125 44.453125 7.46875 \n",
"Q 49.3125 8.734375 54.109375 11.28125 \n",
"L 54.109375 2.78125 \n",
"Q 49.265625 0.734375 44.1875 -0.34375 \n",
"Q 39.109375 -1.421875 33.890625 -1.421875 \n",
"Q 20.796875 -1.421875 13.15625 6.1875 \n",
"Q 5.515625 13.8125 5.515625 26.8125 \n",
"Q 5.515625 40.234375 12.765625 48.109375 \n",
"Q 20.015625 56 32.328125 56 \n",
"Q 43.359375 56 49.78125 48.890625 \n",
"Q 56.203125 41.796875 56.203125 29.59375 \n",
"M 47.21875 32.234375 \n",
"Q 47.125 39.59375 43.09375 43.984375 \n",
"Q 39.0625 48.390625 32.421875 48.390625 \n",
"Q 24.90625 48.390625 20.390625 44.140625 \n",
"Q 15.875 39.890625 15.1875 32.171875 \n",
"z\n",
"\" id=\"DejaVuSans-65\"/>\n",
" <path d=\"M 44.28125 53.078125 \n",
"L 44.28125 44.578125 \n",
"Q 40.484375 46.53125 36.375 47.5 \n",
"Q 32.28125 48.484375 27.875 48.484375 \n",
"Q 21.1875 48.484375 17.84375 46.4375 \n",
"Q 14.5 44.390625 14.5 40.28125 \n",
"Q 14.5 37.15625 16.890625 35.375 \n",
"Q 19.28125 33.59375 26.515625 31.984375 \n",
"L 29.59375 31.296875 \n",
"Q 39.15625 29.25 43.1875 25.515625 \n",
"Q 47.21875 21.78125 47.21875 15.09375 \n",
"Q 47.21875 7.46875 41.1875 3.015625 \n",
"Q 35.15625 -1.421875 24.609375 -1.421875 \n",
"Q 20.21875 -1.421875 15.453125 -0.5625 \n",
"Q 10.6875 0.296875 5.421875 2 \n",
"L 5.421875 11.28125 \n",
"Q 10.40625 8.6875 15.234375 7.390625 \n",
"Q 20.0625 6.109375 24.8125 6.109375 \n",
"Q 31.15625 6.109375 34.5625 8.28125 \n",
"Q 37.984375 10.453125 37.984375 14.40625 \n",
"Q 37.984375 18.0625 35.515625 20.015625 \n",
"Q 33.0625 21.96875 24.703125 23.78125 \n",
"L 21.578125 24.515625 \n",
"Q 13.234375 26.265625 9.515625 29.90625 \n",
"Q 5.8125 33.546875 5.8125 39.890625 \n",
"Q 5.8125 47.609375 11.28125 51.796875 \n",
"Q 16.75 56 26.8125 56 \n",
"Q 31.78125 56 36.171875 55.265625 \n",
"Q 40.578125 54.546875 44.28125 53.078125 \n",
"\" id=\"DejaVuSans-73\"/>\n",
" </defs>\n",
" <g transform=\"translate(17.837813 189.6325)rotate(-90)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-50\"/>\n",
" <use x=\"60.287109\" xlink:href=\"#DejaVuSans-72\"/>\n",
" <use x=\"101.369141\" xlink:href=\"#DejaVuSans-6f\"/>\n",
" <use x=\"162.550781\" xlink:href=\"#DejaVuSans-62\"/>\n",
" <use x=\"226.027344\" xlink:href=\"#DejaVuSans-61\"/>\n",
" <use x=\"287.306641\" xlink:href=\"#DejaVuSans-62\"/>\n",
" <use x=\"350.783203\" xlink:href=\"#DejaVuSans-69\"/>\n",
" <use x=\"378.566406\" xlink:href=\"#DejaVuSans-6c\"/>\n",
" <use x=\"406.349609\" xlink:href=\"#DejaVuSans-69\"/>\n",
" <use x=\"434.132812\" xlink:href=\"#DejaVuSans-74\"/>\n",
" <use x=\"473.341797\" xlink:href=\"#DejaVuSans-69\"/>\n",
" <use x=\"501.125\" xlink:href=\"#DejaVuSans-65\"/>\n",
" <use x=\"562.648438\" xlink:href=\"#DejaVuSans-73\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path clip-path=\"url(#p12c305987d)\" d=\"M 80.675795 282.5 \n",
"L 435.766705 282.5 \n",
"L 435.766705 56 \n",
"L 80.675795 56 \n",
"z\n",
"\" style=\"fill:#648fff;\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path d=\"M 62.92125 282.5 \n",
"L 62.92125 10.7 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path d=\"M 453.52125 282.5 \n",
"L 453.52125 10.7 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path d=\"M 62.92125 282.5 \n",
"L 453.52125 282.5 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"patch_7\">\n",
" <path d=\"M 62.92125 10.7 \n",
"L 453.52125 10.7 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <!-- 1.000 -->\n",
" <g transform=\"translate(243.907187 42.595312)scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"222.65625\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"p12c305987d\">\n",
" <rect height=\"271.8\" width=\"390.6\" x=\"62.92125\" y=\"10.7\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<matplotlib.figure.Figure at 0x12ad77668>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"##EXECUTE\n",
"result = execute(qc_ab, Aer.get_backend('qasm_simulator')).result().get_counts() #We're only making use of the simulator. Refer to [2] to see how you can run this on a real quantum computer.\n",
"plot_histogram(result)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Notice that the only state with non-zero probability is the one corresponding to qubits 0,1,3,4 being 1,0,1,0. (The qubits read from right to left.)\n",
"\n",
"If you uncommented the measurements for 2 and 5, you will still see states in which qubits 0,1,3,4 are 1,0,1,0, but now we have qubits 2 and 5 in the mix. They take all four possible combinations. This is because Alice and Bob chose different measurements for these two qubits! But the 1010 that they share remains the same.\n",
"\n",
"If the first two are used as an eavesdropping check, Alice and Bob now share the raw key 10. Since this was run on the simulator, it shows the ideal scenario. In reality, noise and other factors could lead to a slight mismatch. This is where classical post-processing between the two comes in handy, to make sure Alice and Bob share the same key.\n",
"\n",
"Now let's invite Eve to the party. We'll repeat what we did above, but with a sneaky extra set of measurements. Eve will intercept the quantum channel and make her own measurement choices, hoping she'll match with Alice and Bob. Since their communication is public, she can listen in to their measurement choices and see if her outcomes were correct."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Created with matplotlib (http://matplotlib.org/) -->\n",
"<svg height=\"357pt\" version=\"1.1\" viewBox=\"0 0 684 357\" width=\"684pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
" <defs>\n",
" <style type=\"text/css\">\n",
"*{stroke-linecap:butt;stroke-linejoin:round;}\n",
" </style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 357.7374 \n",
"L 684.9846 357.7374 \n",
"L 684.9846 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill:#ffffff;\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 482.02687 309.426697 \n",
"L 493.84413 309.426697 \n",
"L 487.9355 319.7668 \n",
"z\n",
"\" style=\"fill:#778899;\"/>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 527.47787 309.426697 \n",
"L 539.29513 309.426697 \n",
"L 533.3865 319.7668 \n",
"z\n",
"\" style=\"fill:#778899;\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 572.92887 309.426697 \n",
"L 584.74613 309.426697 \n",
"L 578.8375 319.7668 \n",
"z\n",
"\" style=\"fill:#778899;\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 618.37987 309.426697 \n",
"L 630.19713 309.426697 \n",
"L 624.2885 319.7668 \n",
"z\n",
"\" style=\"fill:#778899;\"/>\n",
" </g>\n",
" <g id=\"line2d_1\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 101.602 47.0608 \n",
"L 669.7395 47.0608 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_2\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 101.602 92.5118 \n",
"L 669.7395 92.5118 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_3\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 101.602 137.9628 \n",
"L 669.7395 137.9628 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_4\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 101.602 183.4138 \n",
"L 669.7395 183.4138 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_5\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 101.602 228.8648 \n",
"L 669.7395 228.8648 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_6\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 101.602 274.3158 \n",
"L 669.7395 274.3158 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_7\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 101.602 318.289642 \n",
"L 669.7395 318.289642 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_8\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 101.602 321.243957 \n",
"L 669.7395 321.243957 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 160.915555 297.0413 \n",
"L 178.641445 297.0413 \n",
"L 178.641445 24.3353 \n",
"L 160.915555 24.3353 \n",
"z\n",
"\" style=\"fill:#bdbdbd;opacity:0.6;\"/>\n",
" </g>\n",
" <g id=\"patch_7\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 251.817555 297.0413 \n",
"L 269.543445 297.0413 \n",
"L 269.543445 24.3353 \n",
"L 251.817555 24.3353 \n",
"z\n",
"\" style=\"fill:#bdbdbd;opacity:0.6;\"/>\n",
" </g>\n",
" <g id=\"patch_8\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 342.719555 297.0413 \n",
"L 360.445445 297.0413 \n",
"L 360.445445 24.3353 \n",
"L 342.719555 24.3353 \n",
"z\n",
"\" style=\"fill:#bdbdbd;opacity:0.6;\"/>\n",
" </g>\n",
" <g id=\"patch_9\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 433.621555 297.0413 \n",
"L 451.347445 297.0413 \n",
"L 451.347445 24.3353 \n",
"L 433.621555 24.3353 \n",
"z\n",
"\" style=\"fill:#bdbdbd;opacity:0.6;\"/>\n",
" </g>\n",
" <g id=\"line2d_9\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 489.412657 47.0608 \n",
"L 489.412657 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_10\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 486.458342 47.0608 \n",
"L 486.458342 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_11\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 534.863657 92.5118 \n",
"L 534.863657 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_12\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 531.909342 92.5118 \n",
"L 531.909342 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_13\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 580.314657 183.4138 \n",
"L 580.314657 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_14\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 577.360342 183.4138 \n",
"L 577.360342 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_15\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 625.765657 228.8648 \n",
"L 625.765657 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_16\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 622.811342 228.8648 \n",
"L 622.811342 309.426697 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_17\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 128.8726 324.3119 \n",
"L 133.4177 315.2217 \n",
"\" style=\"fill:none;stroke:#778899;stroke-linecap:square;stroke-width:1.5;\"/>\n",
" </g>\n",
" <g id=\"patch_10\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 109.555925 61.832375 \n",
"L 139.099075 61.832375 \n",
"L 139.099075 32.289225 \n",
"L 109.555925 32.289225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_11\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 109.555925 198.185375 \n",
"L 139.099075 198.185375 \n",
"L 139.099075 168.642225 \n",
"L 109.555925 168.642225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_12\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 200.457925 61.832375 \n",
"L 230.001075 61.832375 \n",
"L 230.001075 32.289225 \n",
"L 200.457925 32.289225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_13\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 200.457925 107.283375 \n",
"L 230.001075 107.283375 \n",
"L 230.001075 77.740225 \n",
"L 200.457925 77.740225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_14\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 200.457925 152.734375 \n",
"L 230.001075 152.734375 \n",
"L 230.001075 123.191225 \n",
"L 200.457925 123.191225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_15\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 200.457925 198.185375 \n",
"L 230.001075 198.185375 \n",
"L 230.001075 168.642225 \n",
"L 200.457925 168.642225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_16\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 200.457925 243.636375 \n",
"L 230.001075 243.636375 \n",
"L 230.001075 214.093225 \n",
"L 200.457925 214.093225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_17\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 200.457925 289.087375 \n",
"L 230.001075 289.087375 \n",
"L 230.001075 259.544225 \n",
"L 200.457925 259.544225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_18\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 291.359925 61.832375 \n",
"L 320.903075 61.832375 \n",
"L 320.903075 32.289225 \n",
"L 291.359925 32.289225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_19\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 291.359925 107.283375 \n",
"L 320.903075 107.283375 \n",
"L 320.903075 77.740225 \n",
"L 291.359925 77.740225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_20\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 291.359925 152.734375 \n",
"L 320.903075 152.734375 \n",
"L 320.903075 123.191225 \n",
"L 291.359925 123.191225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_21\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 291.359925 198.185375 \n",
"L 320.903075 198.185375 \n",
"L 320.903075 168.642225 \n",
"L 291.359925 168.642225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_22\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 291.359925 243.636375 \n",
"L 320.903075 243.636375 \n",
"L 320.903075 214.093225 \n",
"L 291.359925 214.093225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_23\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 291.359925 289.087375 \n",
"L 320.903075 289.087375 \n",
"L 320.903075 259.544225 \n",
"L 291.359925 259.544225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_24\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 382.261925 61.832375 \n",
"L 411.805075 61.832375 \n",
"L 411.805075 32.289225 \n",
"L 382.261925 32.289225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_25\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 382.261925 107.283375 \n",
"L 411.805075 107.283375 \n",
"L 411.805075 77.740225 \n",
"L 382.261925 77.740225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_26\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 382.261925 152.734375 \n",
"L 411.805075 152.734375 \n",
"L 411.805075 123.191225 \n",
"L 382.261925 123.191225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_27\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 382.261925 198.185375 \n",
"L 411.805075 198.185375 \n",
"L 411.805075 168.642225 \n",
"L 382.261925 168.642225 \n",
"z\n",
"\" style=\"fill:#6fa4ff;\"/>\n",
" </g>\n",
" <g id=\"patch_28\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 382.261925 243.636375 \n",
"L 411.805075 243.636375 \n",
"L 411.805075 214.093225 \n",
"L 382.261925 214.093225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_29\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 382.261925 289.087375 \n",
"L 411.805075 289.087375 \n",
"L 411.805075 259.544225 \n",
"L 382.261925 259.544225 \n",
"z\n",
"\" style=\"fill:#05bab6;\"/>\n",
" </g>\n",
" <g id=\"patch_30\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 473.163925 61.832375 \n",
"L 502.707075 61.832375 \n",
"L 502.707075 32.289225 \n",
"L 473.163925 32.289225 \n",
"z\n",
"\"/>\n",
" </g>\n",
" <g id=\"patch_31\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 498.275602 51.492272 \n",
"C 498.275602 48.750959 497.185458 46.119118 495.247057 44.180716 \n",
"C 493.308655 42.242314 490.676814 41.15217 487.9355 41.15217 \n",
"C 485.194186 41.15217 482.562345 42.242314 480.623943 44.180716 \n",
"C 478.685542 46.119118 477.595397 48.750959 477.595397 51.492272 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linejoin:miter;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"patch_32\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 518.614925 107.283375 \n",
"L 548.158075 107.283375 \n",
"L 548.158075 77.740225 \n",
"L 518.614925 77.740225 \n",
"z\n",
"\"/>\n",
" </g>\n",
" <g id=\"patch_33\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 543.726602 96.943272 \n",
"C 543.726602 94.201959 542.636458 91.570118 540.698057 89.631716 \n",
"C 538.759655 87.693314 536.127814 86.60317 533.3865 86.60317 \n",
"C 530.645186 86.60317 528.013345 87.693314 526.074943 89.631716 \n",
"C 524.136542 91.570118 523.046397 94.201959 523.046397 96.943272 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linejoin:miter;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"patch_34\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 564.065925 198.185375 \n",
"L 593.609075 198.185375 \n",
"L 593.609075 168.642225 \n",
"L 564.065925 168.642225 \n",
"z\n",
"\"/>\n",
" </g>\n",
" <g id=\"patch_35\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 589.177602 187.845272 \n",
"C 589.177602 185.103959 588.087458 182.472118 586.149057 180.533716 \n",
"C 584.210655 178.595314 581.578814 177.50517 578.8375 177.50517 \n",
"C 576.096186 177.50517 573.464345 178.595314 571.525943 180.533716 \n",
"C 569.587542 182.472118 568.497397 185.103959 568.497397 187.845272 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linejoin:miter;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"patch_36\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 609.516925 243.636375 \n",
"L 639.060075 243.636375 \n",
"L 639.060075 214.093225 \n",
"L 609.516925 214.093225 \n",
"z\n",
"\"/>\n",
" </g>\n",
" <g id=\"patch_37\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 634.628602 233.296272 \n",
"C 634.628602 230.554959 633.538458 227.923118 631.600057 225.984716 \n",
"C 629.661655 224.046314 627.029814 222.95617 624.2885 222.95617 \n",
"C 621.547186 222.95617 618.915345 224.046314 616.976943 225.984716 \n",
"C 615.038542 227.923118 613.948397 230.554959 613.948397 233.296272 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linejoin:miter;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_18\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 487.9355 51.492272 \n",
"L 498.275602 41.15217 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_19\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 533.3865 96.943272 \n",
"L 543.726602 86.60317 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_20\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 578.8375 187.845272 \n",
"L 589.177602 177.50517 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_21\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 624.2885 233.296272 \n",
"L 634.628602 222.95617 \n",
"\" style=\"fill:none;stroke:#ffffff;stroke-linecap:square;stroke-width:2;\"/>\n",
" </g>\n",
" <g id=\"line2d_22\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 169.7785 24.3353 \n",
"L 169.7785 69.7863 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_23\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 169.7785 69.7863 \n",
"L 169.7785 115.2373 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_24\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 169.7785 115.2373 \n",
"L 169.7785 160.6883 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_25\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 169.7785 160.6883 \n",
"L 169.7785 206.1393 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_26\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 169.7785 206.1393 \n",
"L 169.7785 251.5903 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_27\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 169.7785 251.5903 \n",
"L 169.7785 297.0413 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_28\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 260.6805 24.3353 \n",
"L 260.6805 69.7863 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_29\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 260.6805 69.7863 \n",
"L 260.6805 115.2373 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_30\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 260.6805 115.2373 \n",
"L 260.6805 160.6883 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_31\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 260.6805 160.6883 \n",
"L 260.6805 206.1393 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_32\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 260.6805 206.1393 \n",
"L 260.6805 251.5903 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_33\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 260.6805 251.5903 \n",
"L 260.6805 297.0413 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_34\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 351.5825 24.3353 \n",
"L 351.5825 69.7863 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_35\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 351.5825 69.7863 \n",
"L 351.5825 115.2373 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_36\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 351.5825 115.2373 \n",
"L 351.5825 160.6883 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_37\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 351.5825 160.6883 \n",
"L 351.5825 206.1393 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_38\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 351.5825 206.1393 \n",
"L 351.5825 251.5903 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_39\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 351.5825 251.5903 \n",
"L 351.5825 297.0413 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_40\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 442.4845 24.3353 \n",
"L 442.4845 69.7863 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_41\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 442.4845 69.7863 \n",
"L 442.4845 115.2373 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_42\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 442.4845 115.2373 \n",
"L 442.4845 160.6883 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_43\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 442.4845 160.6883 \n",
"L 442.4845 206.1393 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_44\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 442.4845 206.1393 \n",
"L 442.4845 251.5903 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"line2d_45\">\n",
" <path clip-path=\"url(#p9f1254440a)\" d=\"M 442.4845 251.5903 \n",
"L 442.4845 297.0413 \n",
"\" style=\"fill:none;stroke:#000000;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;\"/>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $X$ -->\n",
" <defs>\n",
" <path d=\"M 13.71875 72.90625 \n",
"L 23.6875 72.90625 \n",
"L 36.1875 46.578125 \n",
"L 58.796875 72.90625 \n",
"L 70.3125 72.90625 \n",
"L 40.28125 38.09375 \n",
"L 58.40625 0 \n",
"L 48.484375 0 \n",
"L 33.796875 30.71875 \n",
"L 7.171875 0 \n",
"L -4.296875 0 \n",
"L 29.78125 39.203125 \n",
"z\n",
"\" id=\"DejaVuSans-Oblique-58\"/>\n",
" </defs>\n",
" <g transform=\"translate(119.8425 50.647987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-58\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $X$ -->\n",
" <g transform=\"translate(119.8425 187.000987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-58\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <defs>\n",
" <path d=\"M 16.890625 72.90625 \n",
"L 26.8125 72.90625 \n",
"L 21 43.015625 \n",
"L 56.78125 43.015625 \n",
"L 62.59375 72.90625 \n",
"L 72.515625 72.90625 \n",
"L 58.296875 0 \n",
"L 48.390625 0 \n",
"L 55.171875 34.71875 \n",
"L 19.390625 34.71875 \n",
"L 12.59375 0 \n",
"L 2.6875 0 \n",
"z\n",
"\" id=\"DejaVuSans-Oblique-48\"/>\n",
" </defs>\n",
" <g transform=\"translate(210.2895 50.647987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <defs>\n",
" <path d=\"M 13.09375 72.90625 \n",
"L 70.3125 72.90625 \n",
"L 68.890625 65.375 \n",
"L 12.40625 8.296875 \n",
"L 58.890625 8.296875 \n",
"L 57.328125 0 \n",
"L -2.203125 0 \n",
"L -0.78125 7.515625 \n",
"L 55.71875 64.59375 \n",
"L 11.53125 64.59375 \n",
"z\n",
"\" id=\"DejaVuSans-Oblique-5a\"/>\n",
" </defs>\n",
" <g transform=\"translate(210.7445 96.098987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(210.7445 141.549987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(210.2895 187.000987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(210.7445 232.451987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(210.2895 277.902987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_9\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(301.1915 50.647987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_10\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(301.6465 96.098987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_11\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(301.1915 141.549987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_12\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(301.1915 187.000987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_13\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(301.6465 232.451987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_14\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(301.6465 277.902987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_15\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(392.0935 50.647987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_16\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(392.5485 96.098987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_17\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(392.0935 141.549987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_18\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $H$ -->\n",
" <g transform=\"translate(392.0935 187.000987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-48\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_19\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(392.5485 232.451987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_20\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $Z$ -->\n",
" <g transform=\"translate(392.5485 277.902987)scale(0.13 -0.13)\">\n",
" <use transform=\"translate(0 0.09375)\" xlink:href=\"#DejaVuSans-Oblique-5a\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_21\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- 0 -->\n",
" <defs>\n",
" <path d=\"M 31.78125 66.40625 \n",
"Q 24.171875 66.40625 20.328125 58.90625 \n",
"Q 16.5 51.421875 16.5 36.375 \n",
"Q 16.5 21.390625 20.328125 13.890625 \n",
"Q 24.171875 6.390625 31.78125 6.390625 \n",
"Q 39.453125 6.390625 43.28125 13.890625 \n",
"Q 47.125 21.390625 47.125 36.375 \n",
"Q 47.125 51.421875 43.28125 58.90625 \n",
"Q 39.453125 66.40625 31.78125 66.40625 \n",
"M 31.78125 74.21875 \n",
"Q 44.046875 74.21875 50.515625 64.515625 \n",
"Q 56.984375 54.828125 56.984375 36.375 \n",
"Q 56.984375 17.96875 50.515625 8.265625 \n",
"Q 44.046875 -1.421875 31.78125 -1.421875 \n",
"Q 19.53125 -1.421875 13.0625 8.265625 \n",
"Q 6.59375 17.96875 6.59375 36.375 \n",
"Q 6.59375 54.828125 13.0625 64.515625 \n",
"Q 19.53125 74.21875 31.78125 74.21875 \n",
"\" id=\"DejaVuSans-30\"/>\n",
" </defs>\n",
" <g transform=\"translate(499.29825 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_22\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- 1 -->\n",
" <defs>\n",
" <path d=\"M 12.40625 8.296875 \n",
"L 28.515625 8.296875 \n",
"L 28.515625 63.921875 \n",
"L 10.984375 60.40625 \n",
"L 10.984375 69.390625 \n",
"L 28.421875 72.90625 \n",
"L 38.28125 72.90625 \n",
"L 38.28125 8.296875 \n",
"L 54.390625 8.296875 \n",
"L 54.390625 0 \n",
"L 12.40625 0 \n",
"z\n",
"\" id=\"DejaVuSans-31\"/>\n",
" </defs>\n",
" <g transform=\"translate(544.74925 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_23\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- 3 -->\n",
" <defs>\n",
" <path d=\"M 40.578125 39.3125 \n",
"Q 47.65625 37.796875 51.625 33 \n",
"Q 55.609375 28.21875 55.609375 21.1875 \n",
"Q 55.609375 10.40625 48.1875 4.484375 \n",
"Q 40.765625 -1.421875 27.09375 -1.421875 \n",
"Q 22.515625 -1.421875 17.65625 -0.515625 \n",
"Q 12.796875 0.390625 7.625 2.203125 \n",
"L 7.625 11.71875 \n",
"Q 11.71875 9.328125 16.59375 8.109375 \n",
"Q 21.484375 6.890625 26.8125 6.890625 \n",
"Q 36.078125 6.890625 40.9375 10.546875 \n",
"Q 45.796875 14.203125 45.796875 21.1875 \n",
"Q 45.796875 27.640625 41.28125 31.265625 \n",
"Q 36.765625 34.90625 28.71875 34.90625 \n",
"L 20.21875 34.90625 \n",
"L 20.21875 43.015625 \n",
"L 29.109375 43.015625 \n",
"Q 36.375 43.015625 40.234375 45.921875 \n",
"Q 44.09375 48.828125 44.09375 54.296875 \n",
"Q 44.09375 59.90625 40.109375 62.90625 \n",
"Q 36.140625 65.921875 28.71875 65.921875 \n",
"Q 24.65625 65.921875 20.015625 65.03125 \n",
"Q 15.375 64.15625 9.8125 62.3125 \n",
"L 9.8125 71.09375 \n",
"Q 15.4375 72.65625 20.34375 73.4375 \n",
"Q 25.25 74.21875 29.59375 74.21875 \n",
"Q 40.828125 74.21875 47.359375 69.109375 \n",
"Q 53.90625 64.015625 53.90625 55.328125 \n",
"Q 53.90625 49.265625 50.4375 45.09375 \n",
"Q 46.96875 40.921875 40.578125 39.3125 \n",
"\" id=\"DejaVuSans-33\"/>\n",
" </defs>\n",
" <g transform=\"translate(590.20025 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_24\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- 4 -->\n",
" <defs>\n",
" <path d=\"M 37.796875 64.3125 \n",
"L 12.890625 25.390625 \n",
"L 37.796875 25.390625 \n",
"z\n",
"M 35.203125 72.90625 \n",
"L 47.609375 72.90625 \n",
"L 47.609375 25.390625 \n",
"L 58.015625 25.390625 \n",
"L 58.015625 17.1875 \n",
"L 47.609375 17.1875 \n",
"L 47.609375 0 \n",
"L 37.796875 0 \n",
"L 37.796875 17.1875 \n",
"L 4.890625 17.1875 \n",
"L 4.890625 26.703125 \n",
"z\n",
"\" id=\"DejaVuSans-34\"/>\n",
" </defs>\n",
" <g transform=\"translate(635.65125 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_25\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $q_{0}$ -->\n",
" <defs>\n",
" <path d=\"M 41.703125 8.203125 \n",
"Q 38.09375 3.46875 33.171875 1.015625 \n",
"Q 28.265625 -1.421875 22.3125 -1.421875 \n",
"Q 14.015625 -1.421875 9.296875 4.171875 \n",
"Q 4.59375 9.765625 4.59375 19.578125 \n",
"Q 4.59375 27.484375 7.5 34.859375 \n",
"Q 10.40625 42.234375 15.828125 48.09375 \n",
"Q 19.34375 51.90625 23.90625 53.953125 \n",
"Q 28.46875 56 33.5 56 \n",
"Q 39.546875 56 43.453125 53.609375 \n",
"Q 47.359375 51.21875 49.125 46.390625 \n",
"L 50.6875 54.59375 \n",
"L 59.71875 54.59375 \n",
"L 45.125 -20.609375 \n",
"L 36.078125 -20.609375 \n",
"z\n",
"M 13.921875 20.90625 \n",
"Q 13.921875 13.671875 16.9375 9.890625 \n",
"Q 19.96875 6.109375 25.6875 6.109375 \n",
"Q 34.1875 6.109375 40.1875 14.234375 \n",
"Q 46.1875 22.359375 46.1875 33.984375 \n",
"Q 46.1875 41.015625 43.078125 44.75 \n",
"Q 39.984375 48.484375 34.1875 48.484375 \n",
"Q 29.9375 48.484375 26.3125 46.5 \n",
"Q 22.703125 44.53125 20.015625 40.71875 \n",
"Q 17.1875 36.71875 15.546875 31.34375 \n",
"Q 13.921875 25.984375 13.921875 20.90625 \n",
"\" id=\"DejaVuSans-Oblique-71\"/>\n",
" </defs>\n",
" <g transform=\"translate(60.839 51.511777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_26\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $q_{1}$ -->\n",
" <g transform=\"translate(60.839 96.962777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_27\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $q_{2}$ -->\n",
" <defs>\n",
" <path d=\"M 19.1875 8.296875 \n",
"L 53.609375 8.296875 \n",
"L 53.609375 0 \n",
"L 7.328125 0 \n",
"L 7.328125 8.296875 \n",
"Q 12.9375 14.109375 22.625 23.890625 \n",
"Q 32.328125 33.6875 34.8125 36.53125 \n",
"Q 39.546875 41.84375 41.421875 45.53125 \n",
"Q 43.3125 49.21875 43.3125 52.78125 \n",
"Q 43.3125 58.59375 39.234375 62.25 \n",
"Q 35.15625 65.921875 28.609375 65.921875 \n",
"Q 23.96875 65.921875 18.8125 64.3125 \n",
"Q 13.671875 62.703125 7.8125 59.421875 \n",
"L 7.8125 69.390625 \n",
"Q 13.765625 71.78125 18.9375 73 \n",
"Q 24.125 74.21875 28.421875 74.21875 \n",
"Q 39.75 74.21875 46.484375 68.546875 \n",
"Q 53.21875 62.890625 53.21875 53.421875 \n",
"Q 53.21875 48.921875 51.53125 44.890625 \n",
"Q 49.859375 40.875 45.40625 35.40625 \n",
"Q 44.1875 33.984375 37.640625 27.21875 \n",
"Q 31.109375 20.453125 19.1875 8.296875 \n",
"\" id=\"DejaVuSans-32\"/>\n",
" </defs>\n",
" <g transform=\"translate(60.839 142.413777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-32\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_28\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $q_{3}$ -->\n",
" <g transform=\"translate(60.839 187.864777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_29\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $q_{4}$ -->\n",
" <g transform=\"translate(60.839 233.315777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_30\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $q_{5}$ -->\n",
" <defs>\n",
" <path d=\"M 10.796875 72.90625 \n",
"L 49.515625 72.90625 \n",
"L 49.515625 64.59375 \n",
"L 19.828125 64.59375 \n",
"L 19.828125 46.734375 \n",
"Q 21.96875 47.46875 24.109375 47.828125 \n",
"Q 26.265625 48.1875 28.421875 48.1875 \n",
"Q 40.625 48.1875 47.75 41.5 \n",
"Q 54.890625 34.8125 54.890625 23.390625 \n",
"Q 54.890625 11.625 47.5625 5.09375 \n",
"Q 40.234375 -1.421875 26.90625 -1.421875 \n",
"Q 22.3125 -1.421875 17.546875 -0.640625 \n",
"Q 12.796875 0.140625 7.71875 1.703125 \n",
"L 7.71875 11.625 \n",
"Q 12.109375 9.234375 16.796875 8.0625 \n",
"Q 21.484375 6.890625 26.703125 6.890625 \n",
"Q 35.15625 6.890625 40.078125 11.328125 \n",
"Q 45.015625 15.765625 45.015625 23.390625 \n",
"Q 45.015625 31 40.078125 35.4375 \n",
"Q 35.15625 39.890625 26.703125 39.890625 \n",
"Q 22.75 39.890625 18.8125 39.015625 \n",
"Q 14.890625 38.140625 10.796875 36.28125 \n",
"z\n",
"\" id=\"DejaVuSans-35\"/>\n",
" </defs>\n",
" <g transform=\"translate(60.839 278.766777)scale(0.1625 -0.1625)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-71\"/>\n",
" <use transform=\"translate(63.476562 -16.40625)scale(0.7)\" xlink:href=\"#DejaVuSans-35\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_31\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- 6 -->\n",
" <defs>\n",
" <path d=\"M 33.015625 40.375 \n",
"Q 26.375 40.375 22.484375 35.828125 \n",
"Q 18.609375 31.296875 18.609375 23.390625 \n",
"Q 18.609375 15.53125 22.484375 10.953125 \n",
"Q 26.375 6.390625 33.015625 6.390625 \n",
"Q 39.65625 6.390625 43.53125 10.953125 \n",
"Q 47.40625 15.53125 47.40625 23.390625 \n",
"Q 47.40625 31.296875 43.53125 35.828125 \n",
"Q 39.65625 40.375 33.015625 40.375 \n",
"M 52.59375 71.296875 \n",
"L 52.59375 62.3125 \n",
"Q 48.875 64.0625 45.09375 64.984375 \n",
"Q 41.3125 65.921875 37.59375 65.921875 \n",
"Q 27.828125 65.921875 22.671875 59.328125 \n",
"Q 17.53125 52.734375 16.796875 39.40625 \n",
"Q 19.671875 43.65625 24.015625 45.921875 \n",
"Q 28.375 48.1875 33.59375 48.1875 \n",
"Q 44.578125 48.1875 50.953125 41.515625 \n",
"Q 57.328125 34.859375 57.328125 23.390625 \n",
"Q 57.328125 12.15625 50.6875 5.359375 \n",
"Q 44.046875 -1.421875 33.015625 -1.421875 \n",
"Q 20.359375 -1.421875 13.671875 8.265625 \n",
"Q 6.984375 17.96875 6.984375 36.375 \n",
"Q 6.984375 53.65625 15.1875 63.9375 \n",
"Q 23.390625 74.21875 37.203125 74.21875 \n",
"Q 40.921875 74.21875 44.703125 73.484375 \n",
"Q 48.484375 72.75 52.59375 71.296875 \n",
"\" id=\"DejaVuSans-36\"/>\n",
" </defs>\n",
" <g transform=\"translate(124.3275 313.058825)scale(0.104 -0.104)\">\n",
" <use xlink:href=\"#DejaVuSans-36\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_32\">\n",
" <g clip-path=\"url(#p9f1254440a)\">\n",
" <!-- $c$ -->\n",
" <defs>\n",
" <path d=\"M 53.609375 52.59375 \n",
"L 51.8125 43.703125 \n",
"Q 48.578125 46.046875 44.9375 47.21875 \n",
"Q 41.3125 48.390625 37.40625 48.390625 \n",
"Q 33.109375 48.390625 29.21875 46.875 \n",
"Q 25.34375 45.359375 22.703125 42.578125 \n",
"Q 18.5 38.328125 16.203125 32.609375 \n",
"Q 13.921875 26.90625 13.921875 20.796875 \n",
"Q 13.921875 13.421875 17.609375 9.8125 \n",
"Q 21.296875 6.203125 28.8125 6.203125 \n",
"Q 32.515625 6.203125 36.6875 7.328125 \n",
"Q 40.875 8.453125 45.40625 10.6875 \n",
"L 43.703125 1.8125 \n",
"Q 39.796875 0.203125 35.671875 -0.609375 \n",
"Q 31.546875 -1.421875 27.203125 -1.421875 \n",
"Q 16.3125 -1.421875 10.453125 4.015625 \n",
"Q 4.59375 9.46875 4.59375 19.578125 \n",
"Q 4.59375 28.078125 7.640625 35.234375 \n",
"Q 10.6875 42.390625 16.703125 48.09375 \n",
"Q 20.796875 52 26.3125 54 \n",
"Q 31.84375 56 38.375 56 \n",
"Q 42.1875 56 45.9375 55.140625 \n",
"Q 49.703125 54.296875 53.609375 52.59375 \n",
"\" id=\"DejaVuSans-Oblique-63\"/>\n",
" </defs>\n",
" <g transform=\"translate(68.1515 325.147581)scale(0.195 -0.195)\">\n",
" <use xlink:href=\"#DejaVuSans-Oblique-63\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"p9f1254440a\">\n",
" <rect height=\"336.3374\" width=\"663.5846\" x=\"10.7\" y=\"10.7\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<matplotlib.figure.Figure at 0x12ae21f98>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Same situation but now with sneaky Eve \n",
"\n",
"qc_aeb = QuantumCircuit(6,6) #Create a quantum circuit with 6 qubits and 6 classical bits\n",
"\n",
"##ENCODE BIT STRING\n",
"qc_aeb.x(0) \n",
"qc_aeb.x(3) \n",
"qc_aeb.barrier()\n",
"\n",
"##ALICE CHOOSES\n",
"qc_aeb.h(0) \n",
"qc_aeb.z(1) \n",
"qc_aeb.z(2) \n",
"qc_aeb.h(3) \n",
"qc_aeb.z(4) \n",
"qc_aeb.h(5) \n",
"qc_aeb.barrier()\n",
"\n",
"##EVE CHOOSES\n",
"qc_aeb.h(0) #play around with these to see how many states with non-zero probabilities show up at the end for a fixed set of Alice's and Bob's choices\n",
"qc_aeb.z(1) \n",
"qc_aeb.h(2) \n",
"qc_aeb.h(3) \n",
"qc_aeb.z(4) \n",
"qc_aeb.z(5) \n",
"qc_aeb.barrier()\n",
"\n",
"##BOB CHOOSES\n",
"qc_aeb.h(0) \n",
"qc_aeb.z(1) \n",
"qc_aeb.h(2) \n",
"qc_aeb.h(3) \n",
"qc_aeb.z(4) \n",
"qc_aeb.z(5) \n",
"qc_aeb.barrier()\n",
"\n",
"\n",
"##PUBLICIZE CHOICES\n",
"\n",
"qc_aeb.measure(0,0)\n",
"qc_aeb.measure(1,1)\n",
"qc_aeb.measure(3,3)\n",
"qc_aeb.measure(4,4)\n",
"\n",
"#qc_aeb.measure(2,2) #come back to uncomment these to see what happens to the results after you've run this once\n",
"#qc_aeb.measure(5,5)\n",
"\n",
"qc_aeb.draw(output='mpl') #let's see what this circuit looks like!"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Created with matplotlib (http://matplotlib.org/) -->\n",
"<svg height=\"351pt\" version=\"1.1\" viewBox=\"0 0 464 351\" width=\"464pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
" <defs>\n",
" <style type=\"text/css\">\n",
"*{stroke-linecap:butt;stroke-linejoin:round;}\n",
" </style>\n",
" </defs>\n",
" <g id=\"figure_1\">\n",
" <g id=\"patch_1\">\n",
" <path d=\"M 0 351.556031 \n",
"L 464.22125 351.556031 \n",
"L 464.22125 0 \n",
"L 0 0 \n",
"z\n",
"\" style=\"fill:none;\"/>\n",
" </g>\n",
" <g id=\"axes_1\">\n",
" <g id=\"patch_2\">\n",
" <path d=\"M 62.92125 282.5 \n",
"L 453.52125 282.5 \n",
"L 453.52125 10.7 \n",
"L 62.92125 10.7 \n",
"z\n",
"\" style=\"fill:#eeeeee;\"/>\n",
" </g>\n",
" <g id=\"matplotlib.axis_1\">\n",
" <g id=\"xtick_1\">\n",
" <g id=\"line2d_1\">\n",
" <defs>\n",
" <path d=\"M 0 0 \n",
"L 0 3.5 \n",
"\" id=\"m539d22d955\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n",
" </defs>\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"106.039432\" xlink:href=\"#m539d22d955\" y=\"282.5\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_1\">\n",
" <!-- 000000 -->\n",
" <defs>\n",
" <path d=\"M 31.78125 66.40625 \n",
"Q 24.171875 66.40625 20.328125 58.90625 \n",
"Q 16.5 51.421875 16.5 36.375 \n",
"Q 16.5 21.390625 20.328125 13.890625 \n",
"Q 24.171875 6.390625 31.78125 6.390625 \n",
"Q 39.453125 6.390625 43.28125 13.890625 \n",
"Q 47.125 21.390625 47.125 36.375 \n",
"Q 47.125 51.421875 43.28125 58.90625 \n",
"Q 39.453125 66.40625 31.78125 66.40625 \n",
"M 31.78125 74.21875 \n",
"Q 44.046875 74.21875 50.515625 64.515625 \n",
"Q 56.984375 54.828125 56.984375 36.375 \n",
"Q 56.984375 17.96875 50.515625 8.265625 \n",
"Q 44.046875 -1.421875 31.78125 -1.421875 \n",
"Q 19.53125 -1.421875 13.0625 8.265625 \n",
"Q 6.59375 17.96875 6.59375 36.375 \n",
"Q 6.59375 54.828125 13.0625 64.515625 \n",
"Q 19.53125 74.21875 31.78125 74.21875 \n",
"\" id=\"DejaVuSans-30\"/>\n",
" </defs>\n",
" <g transform=\"translate(100.529949 343.360218)rotate(-70)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"127.246094\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"190.869141\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"254.492188\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"318.115234\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_2\">\n",
" <g id=\"line2d_2\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"207.493977\" xlink:href=\"#m539d22d955\" y=\"282.5\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_2\">\n",
" <!-- 000001 -->\n",
" <defs>\n",
" <path d=\"M 12.40625 8.296875 \n",
"L 28.515625 8.296875 \n",
"L 28.515625 63.921875 \n",
"L 10.984375 60.40625 \n",
"L 10.984375 69.390625 \n",
"L 28.421875 72.90625 \n",
"L 38.28125 72.90625 \n",
"L 38.28125 8.296875 \n",
"L 54.390625 8.296875 \n",
"L 54.390625 0 \n",
"L 12.40625 0 \n",
"z\n",
"\" id=\"DejaVuSans-31\"/>\n",
" </defs>\n",
" <g transform=\"translate(201.984494 343.360218)rotate(-70)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"127.246094\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"190.869141\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"254.492188\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"318.115234\" xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_3\">\n",
" <g id=\"line2d_3\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"308.948523\" xlink:href=\"#m539d22d955\" y=\"282.5\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_3\">\n",
" <!-- 001000 -->\n",
" <g transform=\"translate(303.43904 343.360218)rotate(-70)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"127.246094\" xlink:href=\"#DejaVuSans-31\"/>\n",
" <use x=\"190.869141\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"254.492188\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"318.115234\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"xtick_4\">\n",
" <g id=\"line2d_4\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"410.403068\" xlink:href=\"#m539d22d955\" y=\"282.5\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_4\">\n",
" <!-- 001001 -->\n",
" <g transform=\"translate(404.893585 343.360218)rotate(-70)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"127.246094\" xlink:href=\"#DejaVuSans-31\"/>\n",
" <use x=\"190.869141\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"254.492188\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"318.115234\" xlink:href=\"#DejaVuSans-31\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"matplotlib.axis_2\">\n",
" <g id=\"ytick_1\">\n",
" <g id=\"line2d_5\">\n",
" <path clip-path=\"url(#pd8cf8c448b)\" d=\"M 62.92125 282.5 \n",
"L 453.52125 282.5 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_6\">\n",
" <defs>\n",
" <path d=\"M 0 0 \n",
"L -3.5 0 \n",
"\" id=\"m138c3f5d8f\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n",
" </defs>\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#m138c3f5d8f\" y=\"282.5\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_5\">\n",
" <!-- 0.00 -->\n",
" <defs>\n",
" <path d=\"M 10.6875 12.40625 \n",
"L 21 12.40625 \n",
"L 21 0 \n",
"L 10.6875 0 \n",
"z\n",
"\" id=\"DejaVuSans-2e\"/>\n",
" </defs>\n",
" <g transform=\"translate(24.749375 287.818906)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-30\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_2\">\n",
" <g id=\"line2d_7\">\n",
" <path clip-path=\"url(#pd8cf8c448b)\" d=\"M 62.92125 213.265373 \n",
"L 453.52125 213.265373 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_8\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#m138c3f5d8f\" y=\"213.265373\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_6\">\n",
" <!-- 0.08 -->\n",
" <defs>\n",
" <path d=\"M 31.78125 34.625 \n",
"Q 24.75 34.625 20.71875 30.859375 \n",
"Q 16.703125 27.09375 16.703125 20.515625 \n",
"Q 16.703125 13.921875 20.71875 10.15625 \n",
"Q 24.75 6.390625 31.78125 6.390625 \n",
"Q 38.8125 6.390625 42.859375 10.171875 \n",
"Q 46.921875 13.96875 46.921875 20.515625 \n",
"Q 46.921875 27.09375 42.890625 30.859375 \n",
"Q 38.875 34.625 31.78125 34.625 \n",
"M 21.921875 38.8125 \n",
"Q 15.578125 40.375 12.03125 44.71875 \n",
"Q 8.5 49.078125 8.5 55.328125 \n",
"Q 8.5 64.0625 14.71875 69.140625 \n",
"Q 20.953125 74.21875 31.78125 74.21875 \n",
"Q 42.671875 74.21875 48.875 69.140625 \n",
"Q 55.078125 64.0625 55.078125 55.328125 \n",
"Q 55.078125 49.078125 51.53125 44.71875 \n",
"Q 48 40.375 41.703125 38.8125 \n",
"Q 48.828125 37.15625 52.796875 32.3125 \n",
"Q 56.78125 27.484375 56.78125 20.515625 \n",
"Q 56.78125 9.90625 50.3125 4.234375 \n",
"Q 43.84375 -1.421875 31.78125 -1.421875 \n",
"Q 19.734375 -1.421875 13.25 4.234375 \n",
"Q 6.78125 9.90625 6.78125 20.515625 \n",
"Q 6.78125 27.484375 10.78125 32.3125 \n",
"Q 14.796875 37.15625 21.921875 38.8125 \n",
"M 18.3125 54.390625 \n",
"Q 18.3125 48.734375 21.84375 45.5625 \n",
"Q 25.390625 42.390625 31.78125 42.390625 \n",
"Q 38.140625 42.390625 41.71875 45.5625 \n",
"Q 45.3125 48.734375 45.3125 54.390625 \n",
"Q 45.3125 60.0625 41.71875 63.234375 \n",
"Q 38.140625 66.40625 31.78125 66.40625 \n",
"Q 25.390625 66.40625 21.84375 63.234375 \n",
"Q 18.3125 60.0625 18.3125 54.390625 \n",
"\" id=\"DejaVuSans-38\"/>\n",
" </defs>\n",
" <g transform=\"translate(24.749375 218.584279)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-38\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_3\">\n",
" <g id=\"line2d_9\">\n",
" <path clip-path=\"url(#pd8cf8c448b)\" d=\"M 62.92125 144.030746 \n",
"L 453.52125 144.030746 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_10\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#m138c3f5d8f\" y=\"144.030746\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_7\">\n",
" <!-- 0.16 -->\n",
" <defs>\n",
" <path d=\"M 33.015625 40.375 \n",
"Q 26.375 40.375 22.484375 35.828125 \n",
"Q 18.609375 31.296875 18.609375 23.390625 \n",
"Q 18.609375 15.53125 22.484375 10.953125 \n",
"Q 26.375 6.390625 33.015625 6.390625 \n",
"Q 39.65625 6.390625 43.53125 10.953125 \n",
"Q 47.40625 15.53125 47.40625 23.390625 \n",
"Q 47.40625 31.296875 43.53125 35.828125 \n",
"Q 39.65625 40.375 33.015625 40.375 \n",
"M 52.59375 71.296875 \n",
"L 52.59375 62.3125 \n",
"Q 48.875 64.0625 45.09375 64.984375 \n",
"Q 41.3125 65.921875 37.59375 65.921875 \n",
"Q 27.828125 65.921875 22.671875 59.328125 \n",
"Q 17.53125 52.734375 16.796875 39.40625 \n",
"Q 19.671875 43.65625 24.015625 45.921875 \n",
"Q 28.375 48.1875 33.59375 48.1875 \n",
"Q 44.578125 48.1875 50.953125 41.515625 \n",
"Q 57.328125 34.859375 57.328125 23.390625 \n",
"Q 57.328125 12.15625 50.6875 5.359375 \n",
"Q 44.046875 -1.421875 33.015625 -1.421875 \n",
"Q 20.359375 -1.421875 13.671875 8.265625 \n",
"Q 6.984375 17.96875 6.984375 36.375 \n",
"Q 6.984375 53.65625 15.1875 63.9375 \n",
"Q 23.390625 74.21875 37.203125 74.21875 \n",
"Q 40.921875 74.21875 44.703125 73.484375 \n",
"Q 48.484375 72.75 52.59375 71.296875 \n",
"\" id=\"DejaVuSans-36\"/>\n",
" </defs>\n",
" <g transform=\"translate(24.749375 149.349653)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-31\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-36\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"ytick_4\">\n",
" <g id=\"line2d_11\">\n",
" <path clip-path=\"url(#pd8cf8c448b)\" d=\"M 62.92125 74.796119 \n",
"L 453.52125 74.796119 \n",
"\" style=\"fill:none;stroke:#b0b0b0;stroke-dasharray:5.6,2.4;stroke-dashoffset:0;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"line2d_12\">\n",
" <g>\n",
" <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"62.92125\" xlink:href=\"#m138c3f5d8f\" y=\"74.796119\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_8\">\n",
" <!-- 0.24 -->\n",
" <defs>\n",
" <path d=\"M 19.1875 8.296875 \n",
"L 53.609375 8.296875 \n",
"L 53.609375 0 \n",
"L 7.328125 0 \n",
"L 7.328125 8.296875 \n",
"Q 12.9375 14.109375 22.625 23.890625 \n",
"Q 32.328125 33.6875 34.8125 36.53125 \n",
"Q 39.546875 41.84375 41.421875 45.53125 \n",
"Q 43.3125 49.21875 43.3125 52.78125 \n",
"Q 43.3125 58.59375 39.234375 62.25 \n",
"Q 35.15625 65.921875 28.609375 65.921875 \n",
"Q 23.96875 65.921875 18.8125 64.3125 \n",
"Q 13.671875 62.703125 7.8125 59.421875 \n",
"L 7.8125 69.390625 \n",
"Q 13.765625 71.78125 18.9375 73 \n",
"Q 24.125 74.21875 28.421875 74.21875 \n",
"Q 39.75 74.21875 46.484375 68.546875 \n",
"Q 53.21875 62.890625 53.21875 53.421875 \n",
"Q 53.21875 48.921875 51.53125 44.890625 \n",
"Q 49.859375 40.875 45.40625 35.40625 \n",
"Q 44.1875 33.984375 37.640625 27.21875 \n",
"Q 31.109375 20.453125 19.1875 8.296875 \n",
"\" id=\"DejaVuSans-32\"/>\n",
" <path d=\"M 37.796875 64.3125 \n",
"L 12.890625 25.390625 \n",
"L 37.796875 25.390625 \n",
"z\n",
"M 35.203125 72.90625 \n",
"L 47.609375 72.90625 \n",
"L 47.609375 25.390625 \n",
"L 58.015625 25.390625 \n",
"L 58.015625 17.1875 \n",
"L 47.609375 17.1875 \n",
"L 47.609375 0 \n",
"L 37.796875 0 \n",
"L 37.796875 17.1875 \n",
"L 4.890625 17.1875 \n",
"L 4.890625 26.703125 \n",
"z\n",
"\" id=\"DejaVuSans-34\"/>\n",
" </defs>\n",
" <g transform=\"translate(24.749375 80.115026)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-32\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-34\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_9\">\n",
" <!-- Probabilities -->\n",
" <defs>\n",
" <path d=\"M 19.671875 64.796875 \n",
"L 19.671875 37.40625 \n",
"L 32.078125 37.40625 \n",
"Q 38.96875 37.40625 42.71875 40.96875 \n",
"Q 46.484375 44.53125 46.484375 51.125 \n",
"Q 46.484375 57.671875 42.71875 61.234375 \n",
"Q 38.96875 64.796875 32.078125 64.796875 \n",
"z\n",
"M 9.8125 72.90625 \n",
"L 32.078125 72.90625 \n",
"Q 44.34375 72.90625 50.609375 67.359375 \n",
"Q 56.890625 61.8125 56.890625 51.125 \n",
"Q 56.890625 40.328125 50.609375 34.8125 \n",
"Q 44.34375 29.296875 32.078125 29.296875 \n",
"L 19.671875 29.296875 \n",
"L 19.671875 0 \n",
"L 9.8125 0 \n",
"z\n",
"\" id=\"DejaVuSans-50\"/>\n",
" <path d=\"M 41.109375 46.296875 \n",
"Q 39.59375 47.171875 37.8125 47.578125 \n",
"Q 36.03125 48 33.890625 48 \n",
"Q 26.265625 48 22.1875 43.046875 \n",
"Q 18.109375 38.09375 18.109375 28.8125 \n",
"L 18.109375 0 \n",
"L 9.078125 0 \n",
"L 9.078125 54.6875 \n",
"L 18.109375 54.6875 \n",
"L 18.109375 46.1875 \n",
"Q 20.953125 51.171875 25.484375 53.578125 \n",
"Q 30.03125 56 36.53125 56 \n",
"Q 37.453125 56 38.578125 55.875 \n",
"Q 39.703125 55.765625 41.0625 55.515625 \n",
"z\n",
"\" id=\"DejaVuSans-72\"/>\n",
" <path d=\"M 30.609375 48.390625 \n",
"Q 23.390625 48.390625 19.1875 42.75 \n",
"Q 14.984375 37.109375 14.984375 27.296875 \n",
"Q 14.984375 17.484375 19.15625 11.84375 \n",
"Q 23.34375 6.203125 30.609375 6.203125 \n",
"Q 37.796875 6.203125 41.984375 11.859375 \n",
"Q 46.1875 17.53125 46.1875 27.296875 \n",
"Q 46.1875 37.015625 41.984375 42.703125 \n",
"Q 37.796875 48.390625 30.609375 48.390625 \n",
"M 30.609375 56 \n",
"Q 42.328125 56 49.015625 48.375 \n",
"Q 55.71875 40.765625 55.71875 27.296875 \n",
"Q 55.71875 13.875 49.015625 6.21875 \n",
"Q 42.328125 -1.421875 30.609375 -1.421875 \n",
"Q 18.84375 -1.421875 12.171875 6.21875 \n",
"Q 5.515625 13.875 5.515625 27.296875 \n",
"Q 5.515625 40.765625 12.171875 48.375 \n",
"Q 18.84375 56 30.609375 56 \n",
"\" id=\"DejaVuSans-6f\"/>\n",
" <path d=\"M 48.6875 27.296875 \n",
"Q 48.6875 37.203125 44.609375 42.84375 \n",
"Q 40.53125 48.484375 33.40625 48.484375 \n",
"Q 26.265625 48.484375 22.1875 42.84375 \n",
"Q 18.109375 37.203125 18.109375 27.296875 \n",
"Q 18.109375 17.390625 22.1875 11.75 \n",
"Q 26.265625 6.109375 33.40625 6.109375 \n",
"Q 40.53125 6.109375 44.609375 11.75 \n",
"Q 48.6875 17.390625 48.6875 27.296875 \n",
"M 18.109375 46.390625 \n",
"Q 20.953125 51.265625 25.265625 53.625 \n",
"Q 29.59375 56 35.59375 56 \n",
"Q 45.5625 56 51.78125 48.09375 \n",
"Q 58.015625 40.1875 58.015625 27.296875 \n",
"Q 58.015625 14.40625 51.78125 6.484375 \n",
"Q 45.5625 -1.421875 35.59375 -1.421875 \n",
"Q 29.59375 -1.421875 25.265625 0.953125 \n",
"Q 20.953125 3.328125 18.109375 8.203125 \n",
"L 18.109375 0 \n",
"L 9.078125 0 \n",
"L 9.078125 75.984375 \n",
"L 18.109375 75.984375 \n",
"z\n",
"\" id=\"DejaVuSans-62\"/>\n",
" <path d=\"M 34.28125 27.484375 \n",
"Q 23.390625 27.484375 19.1875 25 \n",
"Q 14.984375 22.515625 14.984375 16.5 \n",
"Q 14.984375 11.71875 18.140625 8.90625 \n",
"Q 21.296875 6.109375 26.703125 6.109375 \n",
"Q 34.1875 6.109375 38.703125 11.40625 \n",
"Q 43.21875 16.703125 43.21875 25.484375 \n",
"L 43.21875 27.484375 \n",
"z\n",
"M 52.203125 31.203125 \n",
"L 52.203125 0 \n",
"L 43.21875 0 \n",
"L 43.21875 8.296875 \n",
"Q 40.140625 3.328125 35.546875 0.953125 \n",
"Q 30.953125 -1.421875 24.3125 -1.421875 \n",
"Q 15.921875 -1.421875 10.953125 3.296875 \n",
"Q 6 8.015625 6 15.921875 \n",
"Q 6 25.140625 12.171875 29.828125 \n",
"Q 18.359375 34.515625 30.609375 34.515625 \n",
"L 43.21875 34.515625 \n",
"L 43.21875 35.40625 \n",
"Q 43.21875 41.609375 39.140625 45 \n",
"Q 35.0625 48.390625 27.6875 48.390625 \n",
"Q 23 48.390625 18.546875 47.265625 \n",
"Q 14.109375 46.140625 10.015625 43.890625 \n",
"L 10.015625 52.203125 \n",
"Q 14.9375 54.109375 19.578125 55.046875 \n",
"Q 24.21875 56 28.609375 56 \n",
"Q 40.484375 56 46.34375 49.84375 \n",
"Q 52.203125 43.703125 52.203125 31.203125 \n",
"\" id=\"DejaVuSans-61\"/>\n",
" <path d=\"M 9.421875 54.6875 \n",
"L 18.40625 54.6875 \n",
"L 18.40625 0 \n",
"L 9.421875 0 \n",
"z\n",
"M 9.421875 75.984375 \n",
"L 18.40625 75.984375 \n",
"L 18.40625 64.59375 \n",
"L 9.421875 64.59375 \n",
"z\n",
"\" id=\"DejaVuSans-69\"/>\n",
" <path d=\"M 9.421875 75.984375 \n",
"L 18.40625 75.984375 \n",
"L 18.40625 0 \n",
"L 9.421875 0 \n",
"z\n",
"\" id=\"DejaVuSans-6c\"/>\n",
" <path d=\"M 18.3125 70.21875 \n",
"L 18.3125 54.6875 \n",
"L 36.8125 54.6875 \n",
"L 36.8125 47.703125 \n",
"L 18.3125 47.703125 \n",
"L 18.3125 18.015625 \n",
"Q 18.3125 11.328125 20.140625 9.421875 \n",
"Q 21.96875 7.515625 27.59375 7.515625 \n",
"L 36.8125 7.515625 \n",
"L 36.8125 0 \n",
"L 27.59375 0 \n",
"Q 17.1875 0 13.234375 3.875 \n",
"Q 9.28125 7.765625 9.28125 18.015625 \n",
"L 9.28125 47.703125 \n",
"L 2.6875 47.703125 \n",
"L 2.6875 54.6875 \n",
"L 9.28125 54.6875 \n",
"L 9.28125 70.21875 \n",
"z\n",
"\" id=\"DejaVuSans-74\"/>\n",
" <path d=\"M 56.203125 29.59375 \n",
"L 56.203125 25.203125 \n",
"L 14.890625 25.203125 \n",
"Q 15.484375 15.921875 20.484375 11.0625 \n",
"Q 25.484375 6.203125 34.421875 6.203125 \n",
"Q 39.59375 6.203125 44.453125 7.46875 \n",
"Q 49.3125 8.734375 54.109375 11.28125 \n",
"L 54.109375 2.78125 \n",
"Q 49.265625 0.734375 44.1875 -0.34375 \n",
"Q 39.109375 -1.421875 33.890625 -1.421875 \n",
"Q 20.796875 -1.421875 13.15625 6.1875 \n",
"Q 5.515625 13.8125 5.515625 26.8125 \n",
"Q 5.515625 40.234375 12.765625 48.109375 \n",
"Q 20.015625 56 32.328125 56 \n",
"Q 43.359375 56 49.78125 48.890625 \n",
"Q 56.203125 41.796875 56.203125 29.59375 \n",
"M 47.21875 32.234375 \n",
"Q 47.125 39.59375 43.09375 43.984375 \n",
"Q 39.0625 48.390625 32.421875 48.390625 \n",
"Q 24.90625 48.390625 20.390625 44.140625 \n",
"Q 15.875 39.890625 15.1875 32.171875 \n",
"z\n",
"\" id=\"DejaVuSans-65\"/>\n",
" <path d=\"M 44.28125 53.078125 \n",
"L 44.28125 44.578125 \n",
"Q 40.484375 46.53125 36.375 47.5 \n",
"Q 32.28125 48.484375 27.875 48.484375 \n",
"Q 21.1875 48.484375 17.84375 46.4375 \n",
"Q 14.5 44.390625 14.5 40.28125 \n",
"Q 14.5 37.15625 16.890625 35.375 \n",
"Q 19.28125 33.59375 26.515625 31.984375 \n",
"L 29.59375 31.296875 \n",
"Q 39.15625 29.25 43.1875 25.515625 \n",
"Q 47.21875 21.78125 47.21875 15.09375 \n",
"Q 47.21875 7.46875 41.1875 3.015625 \n",
"Q 35.15625 -1.421875 24.609375 -1.421875 \n",
"Q 20.21875 -1.421875 15.453125 -0.5625 \n",
"Q 10.6875 0.296875 5.421875 2 \n",
"L 5.421875 11.28125 \n",
"Q 10.40625 8.6875 15.234375 7.390625 \n",
"Q 20.0625 6.109375 24.8125 6.109375 \n",
"Q 31.15625 6.109375 34.5625 8.28125 \n",
"Q 37.984375 10.453125 37.984375 14.40625 \n",
"Q 37.984375 18.0625 35.515625 20.015625 \n",
"Q 33.0625 21.96875 24.703125 23.78125 \n",
"L 21.578125 24.515625 \n",
"Q 13.234375 26.265625 9.515625 29.90625 \n",
"Q 5.8125 33.546875 5.8125 39.890625 \n",
"Q 5.8125 47.609375 11.28125 51.796875 \n",
"Q 16.75 56 26.8125 56 \n",
"Q 31.78125 56 36.171875 55.265625 \n",
"Q 40.578125 54.546875 44.28125 53.078125 \n",
"\" id=\"DejaVuSans-73\"/>\n",
" </defs>\n",
" <g transform=\"translate(17.837813 189.6325)rotate(-90)scale(0.14 -0.14)\">\n",
" <use xlink:href=\"#DejaVuSans-50\"/>\n",
" <use x=\"60.287109\" xlink:href=\"#DejaVuSans-72\"/>\n",
" <use x=\"101.369141\" xlink:href=\"#DejaVuSans-6f\"/>\n",
" <use x=\"162.550781\" xlink:href=\"#DejaVuSans-62\"/>\n",
" <use x=\"226.027344\" xlink:href=\"#DejaVuSans-61\"/>\n",
" <use x=\"287.306641\" xlink:href=\"#DejaVuSans-62\"/>\n",
" <use x=\"350.783203\" xlink:href=\"#DejaVuSans-69\"/>\n",
" <use x=\"378.566406\" xlink:href=\"#DejaVuSans-6c\"/>\n",
" <use x=\"406.349609\" xlink:href=\"#DejaVuSans-69\"/>\n",
" <use x=\"434.132812\" xlink:href=\"#DejaVuSans-74\"/>\n",
" <use x=\"473.341797\" xlink:href=\"#DejaVuSans-69\"/>\n",
" <use x=\"501.125\" xlink:href=\"#DejaVuSans-65\"/>\n",
" <use x=\"562.648438\" xlink:href=\"#DejaVuSans-73\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <g id=\"patch_3\">\n",
" <path clip-path=\"url(#pd8cf8c448b)\" d=\"M 80.675795 282.5 \n",
"L 131.403068 282.5 \n",
"L 131.403068 89.80597 \n",
"L 80.675795 89.80597 \n",
"z\n",
"\" style=\"fill:#648fff;\"/>\n",
" </g>\n",
" <g id=\"patch_4\">\n",
" <path clip-path=\"url(#pd8cf8c448b)\" d=\"M 182.130341 282.5 \n",
"L 232.857614 282.5 \n",
"L 232.857614 59.380597 \n",
"L 182.130341 59.380597 \n",
"z\n",
"\" style=\"fill:#648fff;\"/>\n",
" </g>\n",
" <g id=\"patch_5\">\n",
" <path clip-path=\"url(#pd8cf8c448b)\" d=\"M 283.584886 282.5 \n",
"L 334.312159 282.5 \n",
"L 334.312159 59.380597 \n",
"L 283.584886 59.380597 \n",
"z\n",
"\" style=\"fill:#648fff;\"/>\n",
" </g>\n",
" <g id=\"patch_6\">\n",
" <path clip-path=\"url(#pd8cf8c448b)\" d=\"M 385.039432 282.5 \n",
"L 435.766705 282.5 \n",
"L 435.766705 56 \n",
"L 385.039432 56 \n",
"z\n",
"\" style=\"fill:#648fff;\"/>\n",
" </g>\n",
" <g id=\"patch_7\">\n",
" <path d=\"M 62.92125 282.5 \n",
"L 62.92125 10.7 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"patch_8\">\n",
" <path d=\"M 453.52125 282.5 \n",
"L 453.52125 10.7 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"patch_9\">\n",
" <path d=\"M 62.92125 282.5 \n",
"L 453.52125 282.5 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"patch_10\">\n",
" <path d=\"M 62.92125 10.7 \n",
"L 453.52125 10.7 \n",
"\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
" </g>\n",
" <g id=\"text_10\">\n",
" <!-- 0.223 -->\n",
" <defs>\n",
" <path d=\"M 40.578125 39.3125 \n",
"Q 47.65625 37.796875 51.625 33 \n",
"Q 55.609375 28.21875 55.609375 21.1875 \n",
"Q 55.609375 10.40625 48.1875 4.484375 \n",
"Q 40.765625 -1.421875 27.09375 -1.421875 \n",
"Q 22.515625 -1.421875 17.65625 -0.515625 \n",
"Q 12.796875 0.390625 7.625 2.203125 \n",
"L 7.625 11.71875 \n",
"Q 11.71875 9.328125 16.59375 8.109375 \n",
"Q 21.484375 6.890625 26.8125 6.890625 \n",
"Q 36.078125 6.890625 40.9375 10.546875 \n",
"Q 45.796875 14.203125 45.796875 21.1875 \n",
"Q 45.796875 27.640625 41.28125 31.265625 \n",
"Q 36.765625 34.90625 28.71875 34.90625 \n",
"L 20.21875 34.90625 \n",
"L 20.21875 43.015625 \n",
"L 29.109375 43.015625 \n",
"Q 36.375 43.015625 40.234375 45.921875 \n",
"Q 44.09375 48.828125 44.09375 54.296875 \n",
"Q 44.09375 59.90625 40.109375 62.90625 \n",
"Q 36.140625 65.921875 28.71875 65.921875 \n",
"Q 24.65625 65.921875 20.015625 65.03125 \n",
"Q 15.375 64.15625 9.8125 62.3125 \n",
"L 9.8125 71.09375 \n",
"Q 15.4375 72.65625 20.34375 73.4375 \n",
"Q 25.25 74.21875 29.59375 74.21875 \n",
"Q 40.828125 74.21875 47.359375 69.109375 \n",
"Q 53.90625 64.015625 53.90625 55.328125 \n",
"Q 53.90625 49.265625 50.4375 45.09375 \n",
"Q 46.96875 40.921875 40.578125 39.3125 \n",
"\" id=\"DejaVuSans-33\"/>\n",
" </defs>\n",
" <g transform=\"translate(91.725369 78.091581)scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-32\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-32\"/>\n",
" <use x=\"222.65625\" xlink:href=\"#DejaVuSans-33\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_11\">\n",
" <!-- 0.258 -->\n",
" <defs>\n",
" <path d=\"M 10.796875 72.90625 \n",
"L 49.515625 72.90625 \n",
"L 49.515625 64.59375 \n",
"L 19.828125 64.59375 \n",
"L 19.828125 46.734375 \n",
"Q 21.96875 47.46875 24.109375 47.828125 \n",
"Q 26.265625 48.1875 28.421875 48.1875 \n",
"Q 40.625 48.1875 47.75 41.5 \n",
"Q 54.890625 34.8125 54.890625 23.390625 \n",
"Q 54.890625 11.625 47.5625 5.09375 \n",
"Q 40.234375 -1.421875 26.90625 -1.421875 \n",
"Q 22.3125 -1.421875 17.546875 -0.640625 \n",
"Q 12.796875 0.140625 7.71875 1.703125 \n",
"L 7.71875 11.625 \n",
"Q 12.109375 9.234375 16.796875 8.0625 \n",
"Q 21.484375 6.890625 26.703125 6.890625 \n",
"Q 35.15625 6.890625 40.078125 11.328125 \n",
"Q 45.015625 15.765625 45.015625 23.390625 \n",
"Q 45.015625 31 40.078125 35.4375 \n",
"Q 35.15625 39.890625 26.703125 39.890625 \n",
"Q 22.75 39.890625 18.8125 39.015625 \n",
"Q 14.890625 38.140625 10.796875 36.28125 \n",
"z\n",
"\" id=\"DejaVuSans-35\"/>\n",
" </defs>\n",
" <g transform=\"translate(193.179915 46.144939)scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-32\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-35\"/>\n",
" <use x=\"222.65625\" xlink:href=\"#DejaVuSans-38\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_12\">\n",
" <!-- 0.258 -->\n",
" <g transform=\"translate(294.63446 46.144939)scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-32\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-35\"/>\n",
" <use x=\"222.65625\" xlink:href=\"#DejaVuSans-38\"/>\n",
" </g>\n",
" </g>\n",
" <g id=\"text_13\">\n",
" <!-- 0.262 -->\n",
" <g transform=\"translate(396.089006 42.595312)scale(0.1 -0.1)\">\n",
" <use xlink:href=\"#DejaVuSans-30\"/>\n",
" <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n",
" <use x=\"95.410156\" xlink:href=\"#DejaVuSans-32\"/>\n",
" <use x=\"159.033203\" xlink:href=\"#DejaVuSans-36\"/>\n",
" <use x=\"222.65625\" xlink:href=\"#DejaVuSans-32\"/>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" </g>\n",
" <defs>\n",
" <clipPath id=\"pd8cf8c448b\">\n",
" <rect height=\"271.8\" width=\"390.6\" x=\"62.92125\" y=\"10.7\"/>\n",
" </clipPath>\n",
" </defs>\n",
"</svg>\n"
],
"text/plain": [
"<matplotlib.figure.Figure at 0x12aee80f0>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"##EXECUTE\n",
"result = execute(qc_aeb, Aer.get_backend('qasm_simulator')).result().get_counts()\n",
"plot_histogram(result)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can see that out of four possibilities, only one involves Alice and Bob sharing the correct 1010. All the probabilities are pretty much comparable, which means Alice and Bob would very likely be able to detect the presence of Eve during their eavesdrop check! Now, try encoding the original bit sequence following a convention like the one described at the beginning for polarized photons. Note the differences from this simplified scenario.\n",
"\n",
"(To see how to run this on a real quantum computer, check out [1, 6].)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"[1] Coding with Qiskit: https://www.youtube.com/watch?v=M4EkW4VwhcI\n",
"\n",
"[2] C.H. Bennett and G. Brassard. Quantum cryptography: public key distribution and coin tossing. Proc. IEEE Int. Conf. on Comp. Sys. Signal Process (ICCSSP), page 175, 1984.\n",
"\n",
"[3] Privacy amplification involves methods to have two parties share secret information over public channels or channels controlled by a computationally unbound eavesdropper.\n",
"\n",
"[4] Information reconciliation involves making sure the two parties share the same information.\n",
"\n",
"[5] Discardment also occurs due to some qubits failing to register when they're sent to Bob over the quantum channel.\n",
"\n",
"[6] Qiskit Textbook: https://qiskit.org/textbook/ch-gates/introduction.html\n",
"\n",
"[7] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information:\n",
"10th Anniversary Edition. 10th. New York, NY, USA: Cambridge University\n",
"Press, 2011. ISBN: 1107002176, 9781107002173.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment