##// END OF EJS Templates
add '/' separator to keys in SSH engine dict...
add '/' separator to keys in SSH engine dict to prevent confusing with number-ending nodenames in log output.

File last commit:

r4637:d919e2ec
r5181:79a50b94
Show More
qerror.ipynb
269 lines | 60.8 KiB | text/plain | TextLexer
Brian E. Granger
Converting notebooks to JSON format.
r4634 {
"nbformat": 2,
Brian E. Granger
Implemented metadata for notebook format.
r4637 "metadata": {
"name": "qerror"
},
Brian E. Granger
Converting notebooks to JSON format.
r4634 "worksheets": [
{
"cells": [
{
"source": "<h1>Quantum Error Correction</h1>",
"cell_type": "markdown"
},
{
"cell_type": "code",
"language": "python",
"outputs": [],
"collapsed": true,
"prompt_number": 1,
"input": "%load_ext sympyprinting"
},
{
"cell_type": "code",
"language": "python",
"outputs": [],
"collapsed": true,
"prompt_number": 2,
"input": "from sympy import sqrt, symbols, Rational\nfrom sympy import expand, Eq, Symbol, simplify, exp, sin\nfrom sympy.physics.quantum import *\nfrom sympy.physics.quantum.qubit import *\nfrom sympy.physics.quantum.gate import *\nfrom sympy.physics.quantum.grover import *\nfrom sympy.physics.quantum.qft import QFT, IQFT, Fourier\nfrom sympy.physics.quantum.circuitplot import circuit_plot"
},
{
"source": "<h2>5 qubit code</h2>",
"cell_type": "markdown"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$Z_{1} X_{2} X_{3} Z_{4}$$",
"prompt_number": 3,
"png": "iVBORw0KGgoAAAANSUhEUgAAAFsAAAAYCAYAAACV+oFbAAAABHNCSVQICAgIfAhkiAAAA2NJREFU\naIHt2EmIHFUcx/FPktHQCS5oSGA0KoILIsaLmIOGOC4MMuA2CCYwGJfgwRUdRnBFFMlN9BAvBiFR\nBBcUPQREXHADMYgoKBIVnShCoqjEZZw4Hv41M9Xd1Rm76lWL0D8o6Fev6vte/+ot//+jr/9cKzGF\nGfyFL/AqdmbXvqzuin/BGsOu7PkZ/I6ncvUX46es7m98jnVd9LVufkovCrUJf+IWHNJSdykO4NEu\nmQ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
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$Z_{2} X_{3} X_{4} Z_{0}$$",
"prompt_number": 4,
"png": "iVBORw0KGgoAAAANSUhEUgAAAFoAAAAYCAYAAAB6OOplAAAABHNCSVQICAgIfAhkiAAAA4lJREFU\naIHt2FuoFWUUB/Df1pPHki5UWmk3eisiohfxIa0siLCyi1AZdqEMIqmQsqioSJEoeqgHiSCjG0EY\nlRKBGSFFNzpEFygqjLIi6B5k6dHTw5o5e/bec07umW/vXvYfBuabNfOfNf9Z37fWtxjgf8Us7MQY\nduELbMar2fFzZrtoL7iWYSS7fww78EzBfg5+zWx78Dnmd+Frr/lTatGBq/APbsQ+bbbF2I2Hu+Rc\nnTl0d4ntfuH87C45+8HfCy3GsQGLSq7PxV94CVO65DwKo/is7fp8rKvA1y/+XmgBpuGNkuvH4Ue8\nj/2qEGOjiLrTsvFJYpoPVeTrNX8vtXA0zmq7drCIlK9xWFViERljeA7H4gU1HO0Dfy+16MAwtoqE\nckJNrqn4Rqx5m3BITb5+86fUogUNPCuy7hmJOO8SUXdHIr5+8fdCi3GsFU4vS8Q3hKeEs18J51Oi\nl/yptRjHcuXl0r6q/9F1OBXPZ9xnV/auv/y90ALh4C48UWK7GhdU4FyD87PzhcLxF6s412f+XmgB\nTsYf2KKzQIc3MQPTcYtYE9djySScN+HawrghdmijmDPJc6eLqXo7HjXxhqMqP/FTbpjAtrda5DgX\nK4Um10z20iPxHT7FgSX2y0StCvdqfsQR+AUXljyzVHliWimi7p4JfJmFP3F8Nl6P1xPyw0H4BHeW\n2LrRgqjZtxbGG3Fe2UsPwEf4Ace02WbjNtEryP/UxyKic2zS2mMYFlvfD8telnHuwfbs3nY0RF08\nLRuvbuOqyw+r8IBOobvVgkjCtxbGy/Fy2UsfFxGwHe9kxwh+12zY7NQs0ueKgj7Hu3hQJIi38Xf2\nzG4hUhEXi3o35/1ebC4mwwcielPxL8aJ2bPtQnerBbFLXFoYL8K3//FNXWOemGZJd0oZzsRjWqOl\nLubgiuy8TOgq2KY1MS4U6zvqN3JgJu7DArH/T43XRKI7BQ8l4GvgcjyZgKuIbSLSc8wQeQv1hd5f\nZNhL8aXO9awOLsFbmpuOV0R1cWhN3nkiea8Sa+0CUXtfV5N3RCTwHIeL5as2pgtn86bNVOW94Kq4\nUmvtulasmSlmYRFPS7N0LBHNrBwbRADWRr77Kh4rUhBnGBb18wohxGaRvFLietGFe0/MoDpo4BHc\nLAJwjUILoE4vYKaI4iJ+E9VASkwRou9IzEtM7xyj+CkB55BmNTTAAAMMUAf/AiT2FBaVsAtVAAAA\nAElFTkSuQmCC\n",
"text": "Z \u22c5X \u22c5X \u22c5Z \n 2 3 4 0"
}
],
"collapsed": false,
"prompt_number": 4,
"input": "M1 = Z(2)*X(3)*X(4)*Z(0); M1\n"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$Z_{3} X_{4} X_{0} Z_{1}$$",
"prompt_number": 5,
"png": "iVBORw0KGgoAAAANSUhEUgAAAFoAAAAYCAYAAAB6OOplAAAABHNCSVQICAgIfAhkiAAAA3RJREFU\naIHt2VtoHHUUx/FPTTSY1rTEeiHeSlEExUv1QVQMoggiXlEqXihaVPLmFalIUagifREUtPiiglQK\noiiKKCposSgIQQTBKqKUWC14odZ6aVrjw5nNTiazJjvzn9WH/GBh5/+f/e6Z3575nzP/ZUH/qY7E\nPkxhEl/hHbyVvX7K5q6dB2sNxrPzp/AHNufmL8Mv2dzf2I7RLmJtmp/Si1m6FX/hThxcmLsaB/Bk\nl8xHsoAeKpnbKIIf6ZLZC34TXkzrZVxeMn4OfsdrOKhL5nHYjy8K46PYVIHXK34TXoBD8H7J+Ers\nwicYrALG6yLrLsyOTxe3eX9FXtP8Jr1wPC4pjA2LTPkWR1UFi8yYwhaswCtqBNoDfpNezNIAtoqC\nckpNVh92iDXvDRxek9drfkovZmgRXhRV96JEzPUi6x5MxOsVvwkvpvWYCHpNIl4/XhDBfi2CT6km\n+am9mNYdytulQ1X/RTfhAryUsS+tHF1v+U14gQhwEs+XzK3FNRWYj+Kq7P3FIvBXqwTXY34TXoAz\n8SveM7tBhw+xGEtxg2jon8HYvzDvwu2540XiCW0/jplnXJtFBqXgHyYeQMbwOM7owJ2vF3mtwlMd\neNM6Ft/hc2FkUTeKXhU2aGfMsLioK0s+c5PywnSvyLqH5wpK/KCTWJKIv1E7MZbjGwwVzunGi9b5\n6/GmeDTvqCF8hu9xQmFuBOvEXsFt2dgKnJ07Zw9uyR0PZBf0aYfvG8l4E9m5nbQSN+M3M42uyh/E\nXjMfx7dide64Wy/yGjOH0c+KDJjAx9lrHLu1N2z2KW/SR/Ellonb+yP8mX3mgNiHyOs60e+2uDvF\nw0VRfXgge98yui7/ZGFSviPZIrqKFF7MaXQVDYssfhcnpYaLjGldTDGjq+p8kdF5PYenE7DpYHTd\njZyfRTVeiw9EIUilVSKjdiVkEuvxVGFssbiWxlTH6Le1K/0O/IC7a0fU1mpR9deJYjeAe3BWTe5O\nUU/y3cLR4hr+l9qG87L3/aINur+h71ousjDF0kFsbba2PodEkpR1FlVUunT01QCO4wqciPvE0rFB\nFJqUOlX0vOeKH3QCP9ZkbhMxLxFt2hOiy6ijpeIOvx6niWK7V7b0pdgLGBR/HxXXvVQaNLPH3Z19\nXwoNiJ2+FOrDEYWxPWYX3gUtaEELmq/+AS2CEfeikOXjAAAAAElFTkSuQmCC\n",
"text": "Z \u22c5X \u22c5X \u22c5Z \n 3 4 0 1"
}
],
"collapsed": false,
"prompt_number": 5,
"input": "M2 = Z(3)*X(4)*X(0)*Z(1); M2\n"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$Z_{4} X_{0} X_{1} Z_{2}$$",
"prompt_number": 6,
"png": "iVBORw0KGgoAAAANSUhEUgAAAFoAAAAYCAYAAAB6OOplAAAABHNCSVQICAgIfAhkiAAAA2BJREFU\naIHt2F2oZlMYB/DfmDOOYTgiTMfHwZSLu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rhY4xRy3gJLEuSeT7MnB2Y1BU5HJhSbqK+F6kbHUxJDKuIn7Drw045zGP\nefy/8Q8KoQ22z/3wywAAAABJRU5ErkJggg==\n",
"text": "Z \u22c5X \u22c5X \u22c5Z \n 4 0 1 2"
}
],
"collapsed": false,
"prompt_number": 6,
"input": "M3 = Z(4)*X(0)*X(1)*Z(2); M3\n"
},
{
"source": "These operators should mutually commute.",
"cell_type": "markdown"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$0$$",
"prompt_number": 7,
"png": "iVBORw0KGgoAAAANSUhEUgAAAAwAAAASCAYAAABvqT8MAAAABHNCSVQICAgIfAhkiAAAAN1JREFU\nKJHN0i1LRFEQxvGf7i6LrGE3adCoUbAZBT+GzWATi9Vm22D3Q9gtZqNo8WXNgi9BUHBdUMO9F8bD\nlG1OOcwz8z9zeM4wZcwU+RKGeMQbOjjGawa3MMJu0I5whtkM2MYYvaCt4Ac7GXCJ80R/wGmTNKPa\nWMN9AoywWQILKgPeE+ADA3QjsBiKGQD9CIzr8zsBOrHWALf4SpqpXJvgJQIT3NRvLWMeTyp7/3zI\nFZaL5hbWcZ2NPlCtwFzQNuqbtzJggDvsBe0EF7GpXL5VHOKzznvYx3M24Z/EL9XoKBNI+V0xAAAA\nAElFTkSuQmCC\n",
"text": "0"
}
],
"collapsed": false,
"prompt_number": 7,
"input": "gate_simp(Commutator(M0,M1).doit())\n"
},
{
"source": "And square to the identity.",
"cell_type": "markdown"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "display_data",
"latex": "$$1$$",
"png": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAASCAYAAACNdSR1AAAABHNCSVQICAgIfAhkiAAAAGBJREFU\nKJHt0bENQGAQhuEnWp1CZQFbqExhOI1BtEbABgoj/AoKkcgfCZ23uUvuvcuXHC9QYI5JKWqMCNdh\ncupLdKiwPInRxi5H+eXX5eyo+d1ijh6T/XsBKwY0TxJ8zAZBcgy8TZqNTgAAAABJRU5ErkJggg==\n",
"text": "1"
},
{
"output_type": "display_data",
"latex": "$$1$$",
"png": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAASCAYAAACNdSR1AAAABHNCSVQICAgIfAhkiAAAAGBJREFU\nKJHt0bENQGAQhuEnWp1CZQFbqExhOI1BtEbABgoj/AoKkcgfCZ23uUvuvcuXHC9QYI5JKWqMCNdh\ncupLdKiwPInRxi5H+eXX5eyo+d1ijh6T/XsBKwY0TxJ8zAZBcgy8TZqNTgAAAABJRU5ErkJggg==\n",
"text": "1"
},
{
"output_type": "display_data",
"latex": "$$1$$",
"png": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAASCAYAAACNdSR1AAAABHNCSVQICAgIfAhkiAAAAGBJREFU\nKJHt0bENQGAQhuEnWp1CZQFbqExhOI1BtEbABgoj/AoKkcgfCZ23uUvuvcuXHC9QYI5JKWqMCNdh\ncupLdKiwPInRxi5H+eXX5eyo+d1ijh6T/XsBKwY0TxJ8zAZBcgy8TZqNTgAAAABJRU5ErkJggg==\n",
"text": "1"
},
{
"output_type": "display_data",
"latex": "$$1$$",
"png": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAASCAYAAACNdSR1AAAABHNCSVQICAgIfAhkiAAAAGBJREFU\nKJHt0bENQGAQhuEnWp1CZQFbqExhOI1BtEbABgoj/AoKkcgfCZ23uUvuvcuXHC9QYI5JKWqMCNdh\ncupLdKiwPInRxi5H+eXX5eyo+d1ijh6T/XsBKwY0TxJ8zAZBcgy8TZqNTgAAAABJRU5ErkJggg==\n",
"text": "1"
}
],
"collapsed": false,
"prompt_number": 8,
"input": "for o in [M0,M1,M2,M3]:\n display(gate_simp(o*o))\n"
},
{
"source": "<h2>Codewords</h2>",
"cell_type": "markdown"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$\\frac{1}{4} \\left(1 + Z_{1} X_{2} X_{3} Z_{4}\\right) \\left(1 + Z_{2} X_{3} X_{4} Z_{0}\\right) \\left(1 + Z_{3} X_{4} X_{0} Z_{1}\\right) \\left(1 + Z_{4} X_{0} X_{1} Z_{2}\\right) {\\left|0\\right\\rangle }$$",
"prompt_number": 9,
"png": "iVBORw0KGgoAAAANSUhEUgAAAj4AAAAiCAYAAABfudNlAAAABHNCSVQICAgIfAhkiAAACrlJREFU\neJztnXvMXEUZxn8fvdGW0gvFpo1WxFpaC6UQRNSKFbDSiIpGBSulH1qVWItEpBqi8VIRRUWNoiUB\nY7yLYooUpWgURRsFb39ooYKgTRGNiNVSL6DWP949+WbnXPZcZvb2Pb9k06+z57w7O8+zs+/OmZkD\nQgghhBAixWxgYq8rIYQQQggRkynAqcB9wFG9rYoQQgghRH0OKXHMOcAM4EmR6yKEEEII0TccRCM+\nQgghhBhgyoz4CCGEEEIMBUp8hBBCCDGMnJ1V2E+rtCYDVwCXdPl1XwaMdjjmH9hcp4Ml4o0A1wNT\nvfJPALe0/t4KPN557s/ABT2OnRC6PerSKz+APOEjT4Rtg9iayRPdQZ4YI7YfJgNnAN/0yo8F1gL/\nA3YDNwMPO8//HXgu8L0arwmEm+PzrIyyQ4EbgUcCxK/KdzFBNgMrgSOxhHAisAV736MVY04DVgGP\ntR4nYMZLOBI4ANyEiTKzT2JD8/ZYWfH1+s0PIE/4yBPhPRFbM3kiPvLEGCHaosgThwFv8cpWAXuB\nxa3/rwHuB47wjtvS4XVzGcEq3nRl11nAhc7/l2IZ3E7gAZoZeEKNc2YCfwCWZTy3HnvP72lQpxta\nMVZ75a8D3t4gbqzYIdrjAuC8kq8X0w8gT4SILU/E9URMP8SKL0/IEy6h2qLIE1mJz+3AR7yyncA2\nr2wjMK/E67exHvg08FPgy8DFVQO0WAFc55UdCkxq/f016ht4GXBljfPOAd6RUX468CjwuZr1SViN\niX6DU/YS4H0N48aKHao9dgCndTgmph9AnggVW56I64mYfogVX56QJ1xCtkWeJ/zEZyX2Hp7vHfdO\n4L/YhssJs4E3V6hDUG6leMSoiYFXAB+tcd77aW8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ob8ukWsxGcL\ntk17aJYDlzj/fyM2/Fi0QVQRm7B9Eja0HruBDzK2WuB4bIlo0YhiTD9Adz0RQ7fQmvl00rAKE7Ff\n2u6Ewh20LwceD54YJM18ymjYhKw+czx4YpA1cwn9nZfXZ5bxRFdYhC1Xg2aJz7GY6DG23+42MRKf\nC7GOMyE1IasBl2HbiCdsxoYOO62YyGM6NryYPPYAL8Yml00AfoJNiCtiWPwQS7fQmvkUaViHOxib\nZDkJ+Atjy3bHiycGTTOfIg2b4veZ48UTg6yZS8jvvLw+s6wnohN6mO508pd3DgojmAlC3rvpYqzD\n3NZ6bCd93bUJC7Hh3KXACdjkv9cHiDsFm0C3D/tVMw97L68pef6g+yGmbrE088nSsA5nY5M352K/\n5q50nhsvnhg0zXyKNGxCVp85XjyRMGiauYT8zivqM6t4ohGdtpHehGWsyWSnS7HZ8zdhk4/qcBLp\nVQqDwnps0uJy4F7gx4S5s+/5pH8Vfpv8icN1mIpt+jQLq/eeADHn0j5cmdT3zgoxBtkPsXWLoZlP\nloZV9HM5GtssbCftkwyfVjHmIHti0DTzydOwLnl95njyBAyWZi6hv/OK+syqnohG7GE6IYQQQoiu\nkbfDY8IBbLRnPza5OVmtMD1yvYQQQgghglP2jqkxh+mEEEIIIYQQQgghhBBCCCGEEEIIIYQQQggh\nhBCC/wPS77xfXVkDTQAAAABJRU5ErkJggg==\n",
"text": "\u239b1 + Z \u22c5X \u22c5X \u22c5Z \u239e\u22c5\u239b1 + Z \u22c5X \u22c5X \u22c5Z \u239e\u22c5\u239b1 + Z \u22c5X \u22c5X \u22c5Z \u239e\u22c5\u239b1 + Z \u22c5X \u22c5X \u22c5Z \u239e\u22c5\u27580\u27e9\n\u239d 1 2 3 4\u23a0 \u239d 2 3 4 0\u23a0 \u239d 3 4 0 1\u23a0 \u239d 4 0 1 2\u23a0 \n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n 4"
}
],
"collapsed": false,
"prompt_number": 9,
"input": "zero = Rational(1,4)*(1+M0)*(1+M1)*(1+M2)*(1+M3)*IntQubit(0, 5); zero\n"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$${\\left|0\\right\\rangle } + {\\left|3\\right\\rangle } - {\\left|5\\right\\rangle } + {\\left|6\\right\\rangle } - {\\left|9\\right\\rangle } - {\\left|10\\right\\rangle } + {\\left|12\\right\\rangle } - {\\left|15\\right\\rangle } + {\\left|17\\right\\rangle } - {\\left|18\\right\\rangle } - {\\left|20\\right\\rangle } - {\\left|23\\right\\rangle } + {\\left|24\\right\\rangle } - {\\left|27\\right\\rangle } - {\\left|29\\right\\rangle } - {\\left|30\\right\\rangle }$$",
"prompt_number": 10,
"png": "iVBORw0KGgoAAAANSUhEUgAAAqcAAAAVCAYAAAB7eEdTAAAABHNCSVQICAgIfAhkiAAACzRJREFU\neJztnXuwVVUdxz8gIAoBRiaa0C1Se2ijZBgKoynTOIJKj1HTtFtpLwetFClSSAcxMMsae1GTVEZT\nUqmZQlqTphmpjZi9RpQbTvRwkCAukwjaH7+1Ouusu/Y+a5979t6/Q+szc2bfs/a6+35/v/P77bXP\nel1IJBKJRCKRSCT2AD5et4AWaNKnSUsITfo0aYmlGzX7dKMN3ag5RDfakTRXQzdqDtGNdiTN5ZOp\nd5jz89nAPcBfgXHAdUA/8AwwElgOPOnU7wdeCvyzw2JDuNoA9gYuN39/HDAR+CrwzQr0+VqWAkcC\nK4E7gRmmTh9wSclaYvRZTgbONx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LkW7v\noUgAnUjzkFldvgJZRDIbCaB9zbk1NA/PVeErkEnzC5Hg7EGGU6ZTTVz5WqYiKyJ7gJeZsg3mdRlw\nH/pzIcaG7yMPdecErnW983OZNhTV3A15FWOH5RngT2TP8dMU89uRDb2vAH5ofn80cA9wLo2enCo0\nx8Zu3Xnajua627EQ7djhcgTwJRoLFm9AHkjmosv3Fg15WUSzhvazj7i4rTsn26boXJj/Z5Kv9mzS\n51sPye+JPZ0U44mupYzFDzFsR57EE61JvtqzSZ9vPSS/J/Z0UownEolEIpFIJBKJRCKRSCQSiUQi\nkUgkEolEIpFIJDrNfwGfohC3+6QZuAAAAABJRU5ErkJggg==\n",
"text": "\u27580\u27e9 + \u27583\u27e9 - \u27585\u27e9 + \u27586\u27e9 - \u27589\u27e9 - \u275810\u27e9 + \u275812\u27e9 - \u275815\u27e9 + \u275817\u27e9 - \u275818\u27e9 - \u275820\u27e9 - \u275823\u27e9 +\n \u275824\u27e9 - \u275827\u27e9 - \u275829\u27e9 - \u275830\u27e9"
}
],
"collapsed": false,
"prompt_number": 10,
"input": "qapply(4*zero)\n"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$\\frac{1}{4} \\left(1 + Z_{1} X_{2} X_{3} Z_{4}\\right) \\left(1 + Z_{2} X_{3} X_{4} Z_{0}\\right) \\left(1 + Z_{3} X_{4} X_{0} Z_{1}\\right) \\left(1 + Z_{4} X_{0} X_{1} Z_{2}\\right) {\\left|31\\right\\rangle }$$",
"prompt_number": 11,
"png": "iVBORw0KGgoAAAANSUhEUgAAAkgAAAAiCAYAAACk7ia6AAAABHNCSVQICAgIfAhkiAAACuxJREFU\neJztnWusXFUZhp/Tnp7SlkILhdqKFUqF1kopCohYUQEbjKhgVGq1tGBVIhYbEVS8i3hBQY2ikIAx\nSLygGJQitBpFVFJBFBMpAopK5GJELUIFKXr88c3O2bNm3/das+fyPsmkp3tmf7Nmve+s+fa6bRBC\nCCGEEJWZDYw2XQgh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tzbcQa1qtbj010jgvX\nYQHWjbwEOASblPYWD3GnYhMBt2NXSXOxz/LGguf3ux9C6hZKM5ckDatwAjYJdQ52dRhffjssnug3\nzVyyNKxDUps5LJ6I6DfN4vj8zctqM8t4oivkbf+9AcuAo0lbZ2Gzv6/BJlFV4VA6V2X0C2uxyZfL\nsPu+bMXPnaBPpvMq8wekT4CuwjTgBdjy2a3YlUxd5tDeTRqV95YSMfrZD6F1C6GZS5KGZfSLsxDb\nbO0m2lfKHFYyZj97ot80c0nTsCppbeYweQL6S7M4vn/zstrMsp5onNDdg0IIIYQQPUfaZkoRO7De\no0ewSdrR6owZgcslhBBCCNEYRe+wG7J7UAghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIQaG/wNQ\n49kSjUC+pQAAAABJRU5ErkJggg==\n",
"text": "\u239b1 + Z \u22c5X \u22c5X \u22c5Z \u239e\u22c5\u239b1 + Z \u22c5X \u22c5X \u22c5Z \u239e\u22c5\u239b1 + Z \u22c5X \u22c5X \u22c5Z \u239e\u22c5\u239b1 + Z \u22c5X \u22c5X \u22c5Z \u239e\u22c5\u275831\u27e9\n\u239d 1 2 3 4\u23a0 \u239d 2 3 4 0\u23a0 \u239d 3 4 0 1\u23a0 \u239d 4 0 1 2\u23a0 \n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n 4"
}
],
"collapsed": false,
"prompt_number": 11,
"input": "one = Rational(1,4)*(1+M0)*(1+M1)*(1+M2)*(1+M3)*IntQubit(2**5-1, 5); one\n"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$- {\\left|1\\right\\rangle } - {\\left|2\\right\\rangle } - {\\left|4\\right\\rangle } + {\\left|7\\right\\rangle } - {\\left|8\\right\\rangle } - {\\left|11\\right\\rangle } - {\\left|13\\right\\rangle } + {\\left|14\\right\\rangle } - {\\left|16\\right\\rangle } + {\\left|19\\right\\rangle } - {\\left|21\\right\\rangle } - {\\left|22\\right\\rangle } + {\\left|25\\right\\rangle } - {\\left|26\\right\\rangle } + {\\left|28\\right\\rangle } + {\\left|31\\right\\rangle }$$",
"prompt_number": 12,
"png": "iVBORw0KGgoAAAANSUhEUgAAArsAAAAVCAYAAABG6iY1AAAABHNCSVQICAgIfAhkiAAACpxJREFU\neJztnX+sHUUVxz+vrb6KLSi/KpjGAhVsaQtiVRBLRfkVKhEajKKotegTf9toiojIQwwgVOWHiKLE\nJ6igRSlKghqs10LxtyIFIdpIaBuiGFCwSBFf8Y+zmzs7d/fe2fvuzJwt80le9t3ZuXu/c3bOnN2Z\n2VlIJBKJRCKRSCR2UCZH/O1TgMeARyNqyEla3NGiT4uOOiTN8WhiOZqouYwmliNpjkMTy9BEzWWk\ncjiwssu+dwNfLEmfBpwRSMtbgbXA7cCtwAciarFZAywKoKUMW98JwGbgh8B3gGuAMePvdI/6TC3P\nBc4HLga+kv32bCt/jHNWVZdd82nT/Dzg84iNb0R85AQrT8z6aOJq+5xQfjVRzacAq4ErgM8Bxxv7\nmmL7VwKXApcjPvtRYJKxX1Nbb6PBV101x4pjNv2W4RdIW34MsHeWZz3weiOPRruDbj91KUfMmFqG\nXQ6XWGQT2ncBGC1Jm4UUaBz4csX3PgU8y7OWDwKXATtlnw8H/gtcRbFBDqHF5iTgaeAoK92HljJG\nrc9nZHrK/rYjjZQvfbmW5yAX2i8y9r0Y2AAcYH0n1DmbRe+67JpPi+bJwG3A/kbah5HzfKqVN1Z9\nBHfbm4T0q9G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hpt3Jcw2Biao6PctSJRa50lCP2NIYTge97/o1JyCvozqVYEfamOB/Et5YVwBuy\n38n/rsj2nZN9vjeQll7k83iqLnZ96duO3N0tKtl3YLbfXJsxtp36QYvmh5EhRHOoeVfk3D8E/NpI\n16K5jCb5Vc7fkCelX2qlH4AEV3PusRbNVVyNXBSYvAnpyTPX39XU1ruiSbOWOFaGi7YW4qfmEpaz\nkDbnFut4WuzeBD/tVY4mxNQ6sciVjnL4Xo1h12xbttbeNKRb+ynPGi5GusFHKL6NYx/aw/ShtNjs\nbG1jajHJ1+L7d8k+3/ouQJz3HuD3WdoLkGEY89WSoe3UrS675tOkOX/xQr4m6jDSA7oNeR1mPuSl\noT662j5Hg1/10nwaEiwvQnq2hpHel5XItAxohu0fpXhT/BHkZRPm24s0tfUmGnzVVbPmOOai7Urk\nbWkrkItIkPp+B7KsV442u2v3U5dyaI2pOa6xyCSa766wPi9H7ogeof0e7I3Az5H5OQBvRu7sfGpZ\nTPFd3PZfvsZfCC0mhwG3IyfzaSRYrEPuZCaqpVUjb5W+45GnT+eU7Athq/2RuTarkbXyVtN5Zxrq\nnLnUZdd82jTPBb6O2Hod8urXV1nHilkfXcuR49OvfGg+ErH9dciyaadZ+5tg+z2QnvSx7PfG6AxA\nmtp60OOrrppDxbGWY75+7b4PsvLCGLKiwXkUb0hBl91ztPppnXKEiKmtGnnt9sYlFkFc300ooxVb\nQCJh0Iot4BlMK7aARKNoxRbwDKUVW8CAaMUW0I3Yc3YTg8f1qfREIgSpPsYj2T5Rh1Rf4rCj2H1H\nKUcikUgkEolEIpFIJBKJRCKRSCQSiUQikUgkEomET/4Pd/OI37kkcqQAAAAASUVORK5CYII=\n",
"text": "-\u27581\u27e9 - \u27582\u27e9 - \u27584\u27e9 + \u27587\u27e9 - \u27588\u27e9 - \u275811\u27e9 - \u275813\u27e9 + \u275814\u27e9 - \u275816\u27e9 + \u275819\u27e9 - \u275821\u27e9 - \u275822\u27e9 \n+ \u275825\u27e9 - \u275826\u27e9 + \u275828\u27e9 + \u275831\u27e9"
}
],
"collapsed": false,
"prompt_number": 12,
"input": "qapply(4*one)\n"
},
{
"source": "<h2>The encoding circuit</h2>",
"cell_type": "markdown"
},
{
"cell_type": "code",
"language": "python",
"outputs": [],
"collapsed": true,
"prompt_number": 13,
"input": "encoding_circuit = H(3)*H(4)*CNOT(2,0)*CNOT(3,0)*CNOT(4,0)*H(1)*H(4)*\\\n CNOT(2,1)*CNOT(4,1)*H(2)*CNOT(3,2)*CNOT(4,2)*H(3)*\\\n H(4)*CNOT(4, 3)*Z(4)*H(4)*Z(4)\n"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"prompt_number": 14,
"text": "&lt;sympy.physics.quantum.circuitplot.CircuitPlot object at 0x38a6950&gt;"
},
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAhcAAAClCAYAAADvRN8fAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVNX6B/DvBtGE0BgF00RCTUG8pAneULCTqCiieMfj\ntQjFMtNuHqtTBwuPpzppBl5RpDDxGloaXsALRiAm5TG1J1PwgiAgoiAgs35/9OgvYwZmhj2zZ4bv\n53n4Q9as9a69Z+/F615r7y0JIQSIiIiIZGKjdAeIiIjIujC5ICIiIlkxuSAiIiJZMbkgIiIiWTG5\nICIiIlkxuSAiIiJZMbkgIiIiWTG5ICIiIlkpklyoVCpIkiTrj0qlMlmsuuKacvtMSYl9SWSueD6Q\nrhrisSIp8YROSZIgd1htbRojVl3tm3L7TEmJfUlkrng+kK4a4rHCaREiIiKSFZMLIiIikhWTCyIi\nIpKV2SUX+fn5aNy4MWxsbNC4cWN06tQJAQEBGD58OIYPH44WLVrAxsYGO3furFeckJAQeHp6PojT\ns2dPhIeHAwAuXbqEZ599Fm3btoWNjQ2aN28OHx8fREdHW8z2mZpS+5PI3PBcIH1Y7fEiFFBb2NjY\nWNGkSROxYsUKce/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YWycnJBserrq4W8+fPF56enmLnzp2iqqpKY7zLly+L\nRYsWidatW4uMjAyD41k7JhdERKSztLQ0ERwcLFQqlZg3b55ISEgQAMSXX34p5syZI5ycnMT48eNF\nZmamLPH27dsnhgwZIlxcXMSbb74pNm/eLACI+Ph4MW3aNPHYY4+J6dOnizNnzsgSLzExUfTv31+0\nbdtWvPfee2LLli0CgNi4caMYO3ascHJyEhEREeLixYuyxLNWXHNBRER6y8nJwfr163Hu3Dls2bIF\nkyZNgpeXF2bNmoU2bdrIHu/8+fOIjY3FhQsXsHXrVkyePBm9evXCzJkz0aJFC9njnTp1CnFxcbh8\n+TK2bduGKVOmoH///pg6dSocHR1lj2dtmFwQERGRrLigk4iIiGTF5IKIiIhkxeSCiIiIZMXkgoiI\niGTF5IKIiIhkxeSCiIiIZMXkgoiIiGTF5IKIiIhkxeSCiIiIZMXkgoiIiGTF5IKIiIhkxeSCiIiI\nZMXkgoiIiGTF5IKIiIhkxeSCiIiIZMXkgoiIiGTF5IKIiIhkxeSCiIiIZMXkgoiIiGTF5IKIiIhk\nxeSCiIiIZMXkgoiIiGTF5IKIiIhk9X8OQhhdOtBzlgAAAABJRU5ErkJggg==\n"
}
],
"collapsed": false,
"prompt_number": 14,
"input": "circuit_plot(encoding_circuit, nqubits=5, scale=0.5)"
},
{
"cell_type": "code",
"language": "python",
"outputs": [
{
"output_type": "pyout",
"latex": "$$\\left(\\begin{smallmatrix}1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0\\\\0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & 0 & -1 & 0 & -1 & 0 & -1 & 0 & -1\\\\0 & 1 & 0 & -1 & 0 & 1 & 0 & -1 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u23a5\n 0 -1 0 1 -1 0 1 0 -1 0 1 0 \u23a5\n \u23a5\n -1 0 1 0 0 -1 0 1 0 -1 0 1 \u23a5\n \u23a5\n1 0 1 0 1 -1 0 -1 0 1 0 1 0 \u23a5\n \u23a5\n 1 0 1 0 0 -1 0 -1 0 1 0 1 \u23a5\n \u23a5\n -1 0 1 0 0 1 0 -1 0 -1 0 1 \u23a5\n \u23a5\n1 0 -1 0 1 1 0 -1 0 -1 0 1 0 \u23a5\n \u23a5\n -1 0 -1 0 0 1 0 1 0 1 0 1 \u23a5\n \u23a5\n1 0 -1 0 -1 1 0 1 0 1 0 1 0 \u23a5\n \u23a5\n1 0 1 0 -1 -1 0 1 0 -1 0 1 0 \u23a5\n \u23a5\n 1 0 -1 0 0 -1 0 1 0 -1 0 1 \u23a5\n \u23a5\n1 0 1 0 1 1 0 1 0 -1 0 -1 0 \u23a5\n \u23a5\n 1 0 1 0 0 1 0 1 0 -1 0 -1\u23a5\n \u23a5\n 1 0 -1 0 0 1 0 -1 0 -1 0 1 \u23a5\n \u23a5\n 0 1 0 -1 1 0 -1 0 -1 0 1 0 \u23a5\n \u23a5\n 0 1 0 1 -1 0 -1 0 -1 0 -1 0 \u23a5\n \u23a5\n 1 0 1 0 0 -1 0 -1 0 -1 0 -1\u23a5\n \u23a5\n -1 0 1 0 0 1 0 -1 0 1 0 -1\u23a5\n \u23a5\n 0 -1 0 1 1 0 -1 0 1 0 -1 0 \u23a5\n \u23a5\n -1 0 -1 0 0 -1 0 -1 0 1 0 1 \u23a5\n \u23a5\n 0 -1 0 -1 -1 0 -1 0 1 0 1 0 \u23a5\n \u23a5\n1 0 -1 0 1 -1 0 1 0 1 0 -1 0 \u23a5\n \u23a5\n -1 0 1 0 0 -1 0 1 0 1 0 -1\u23a6"
}
],
"collapsed": false,
"prompt_number": 15,
"input": "represent(4*encoding_circuit, nqubits=5)"
}
]
}
]
}