bachelor_thesis/computations/lookup_table_2_qbits_CZ.ipynb

865 lines
177 KiB
Plaintext
Raw Normal View History

2019-11-11 13:36:11 +00:00
{
"cells": [
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 1,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAADFcAAAA/CAYAAACfdcacAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4Ae2djdXURrKGgeMAvL4Z4AzAG8FCBrAbgXEG5jgCDs4AHMFeyMBsBDZkYDJYXzLwrZpPGvVILan/u7rq1Tn6PqnVP1VPvd0tzUij+/fu3XtC66+0rpfPf/3117frxPv370flX5fHfhkCFIePVNMjT23PKW7vPelIAgGTBDBmjRd2ieMbdCRbRxI1I5uYHevQd/vEWmKfhBb6aMFtVaIuXPuw3Z4A+mV75jEtSuuz0EtM9NrnlaYXJgDNtNdBbosSdZTrE8qDQA0CGN9qUI2vE2NWPLNRSqCPjRKpWzvRJ295YA8EQAAELBHA3K072pjjdccX3oEACJQngHmxPNMRapQ2X0KHI6hGr42x/eEo/1cOpqfONm/+udpf78bmX5fHfh6B76n4N6sqfA/JrLJgFwTMEsCYNU7oJY9v0JFMHUnWjExi9qxC320bc8l9ElpoqwW3Ncm6cO3EdnsC6JftmYe0KLXPQi8h0WufR6pemAQ0014PqS1K1lGqTygHAjUJYHyrSfe8boxZ54xGz4E+NlYE0SfHihesBQEQAIEaBDB316Dav07M8f1jAAtAAATGJIB5ccy4pVotdb6EDlMjinI5BGL7w27+68MV9LaDDzEWxeYPqZueAvnrLB+1e/8sj8Tj5Ns7suvZmW2h/lG+T+u6qI0v6zTsgwAI3BGoMWbNbEv377le6f9rjdmSx7fSOtKunVb+SdaM9H5sxb7SfXfNrZXW1+3W2C8xtkvuk6W1oCn2KXqK8V+yLlJ8R5lyBEr3S9eyGI265TRux7KQ2mdr6CWWjTZ9kP/Zn8VJ1QvHqoZmZg1Y187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\\frac{\\sqrt{2}}{2} & - \\frac{\\sqrt{2}}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}1 & 0\\\\0 & i\\end{matrix}\\right], \\ \\left[\\begin{matrix}1 & 0\\\\0 & 1\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2}}{2}\\\\\\frac{\\sqrt{2} i}{2} & - \\frac{\\sqrt{2} i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2} i}{2}\\\\\\frac{\\sqrt{2}}{2} & - \\frac{\\sqrt{2} i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}1 & 0\\\\0 & -1\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2} i}{2}\\\\\\frac{\\sqrt{2} i}{2} & \\frac{\\sqrt{2}}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & - \\frac{\\sqrt{2}}{2}\\\\\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2}}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}1 & 0\\\\0 & - i\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & - \\frac{\\sqrt{2}}{2}\\\\\\frac{\\sqrt{2} i}{2} & \\frac{\\sqrt{2} i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & - \\frac{\\sqrt{2} i}{2}\\\\\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2} i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & - \\frac{\\sqrt{2} i}{2}\\\\\\frac{\\sqrt{2} i}{2} & - \\frac{\\sqrt{2}}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{1}{2} + \\frac{i}{2} & \\frac{1}{2} - \\frac{i}{2}\\\\\\frac{1}{2} - \\frac{i}{2} & \\frac{1}{2} + \\frac{i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2}}{2}\\\\- \\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2}}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}0 & 1\\\\1 & 0\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2}}{2}\\\\- \\frac{\\sqrt{2} i}{2} & \\frac{\\sqrt{2} i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}0 & 1\\\\i & 0\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{1}{2} - \\frac{i}{2} & \\frac{1}{2} + \\frac{i}{2}\\\\- \\frac{1}{2} + \\frac{i}{2} & \\frac{1}{2} + \\frac{i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}0 & i\\\\1 & 0\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2} i}{2}\\\\- \\frac{\\sqrt{2} i}{2} & - \\frac{\\sqrt{2}}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{1}{2} - \\frac{i}{2} & - \\frac{1}{2} + \\frac{i}{2}\\\\- \\frac{1}{2} + \\frac{i}{2} & - \\frac{1}{2} + \\frac{i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}0 & -1\\\\1 & 0\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2} & - \\frac{\\sqrt{2}}{2}\\\\- \\frac{\\sqrt{2} i}{2} & - \\frac{\\sqrt{2} i}{2}\\end{matrix}\\right], \\ \\left[\\begin{matrix}\\frac{1}{2} - \\frac{i}{2} & \\frac{i \\left(-1 + i\\right)}{2}\\\\- \\frac{1}{2} + \\frac{i}{2} & \\frac{i \\left(-1 + i\\right)}{2}\\end{matrix}\\right]\\right]$"
],
"text/plain": [
"⎡⎡√2 √2 ⎤ ⎡ √2 √2 ⎤ ⎡√2 √2⋅ ⎤ ⎡ √2 √2⋅\n",
"⎢⎢── ── ⎥ ⎢ ── ── ⎥ ⎢── ──── ⎥ ⎢ ── ───\n",
"⎢⎢2 2 ⎥ ⎡1 0⎤ ⎡1 0⎤ ⎢ 2 2 ⎥ ⎢2 2 ⎥ ⎡1 0 ⎤ ⎢ 2 2 \n",
"⎢⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ \n",
"⎢⎢√2 -√2 ⎥ ⎣0 ⅈ⎦ ⎣0 1⎦ ⎢√2⋅ -√2⋅ ⎥ ⎢√2 -√2⋅ ⎥ ⎣0 -1⎦ ⎢√2⋅ √2\n",
"⎢⎢── ────⎥ ⎢──── ──────⎥ ⎢── ──────⎥ ⎢──── ──\n",
"⎣⎣2 2 ⎦ ⎣ 2 2 ⎦ ⎣2 2 ⎦ ⎣ 2 2 \n",
"\n",
"ⅈ⎤ ⎡√2 -√2 ⎤ ⎡ √2 -√2 ⎤ ⎡√2 -√2⋅ ⎤ ⎡ √2 -√2⋅ ⎤ ⎡1 1\n",
"─⎥ ⎢── ────⎥ ⎢ ── ────⎥ ⎢── ──────⎥ ⎢ ── ──────⎥ ⎢─ + ─ ─\n",
" ⎥ ⎢2 2 ⎥ ⎡1 0 ⎤ ⎢ 2 2 ⎥ ⎢2 2 ⎥ ⎢ 2 2 ⎥ ⎢2 2 2\n",
" ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ \n",
" ⎥ ⎢√2 √2 ⎥ ⎣0 -ⅈ⎦ ⎢√2⋅ √2⋅⎥ ⎢√2 √2⋅ ⎥ ⎢√2⋅ -√2 ⎥ ⎢1 1\n",
" ⎥ ⎢── ── ⎥ ⎢──── ────⎥ ⎢── ──── ⎥ ⎢──── ──── ⎥ ⎢─ - ─ ─\n",
" ⎦ ⎣2 2 ⎦ ⎣ 2 2 ⎦ ⎣2 2 ⎦ ⎣ 2 2 ⎦ ⎣2 2 2\n",
"\n",
" ⅈ⎤ ⎡ √2 √2⎤ ⎡ √2 √2 ⎤ ⎡ 1 1 ⅈ⎤ ⎡\n",
" - ─⎥ ⎢ ── ──⎥ ⎢ ── ── ⎥ ⎢ ─ - ─ ─ + ─⎥ ⎢\n",
" 2⎥ ⎢ 2 2 ⎥ ⎡0 1⎤ ⎢ 2 2 ⎥ ⎡0 1⎤ ⎢ 2 2 2 2⎥ ⎡0 ⅈ⎤ ⎢\n",
" ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢\n",
" ⅈ⎥ ⎢-√2 √2⎥ ⎣1 0⎦ ⎢-√2⋅ √2⋅⎥ ⎣ⅈ 0⎦ ⎢ 1 1 ⅈ⎥ ⎣1 0⎦ ⎢\n",
" + ─⎥ ⎢──── ──⎥ ⎢────── ────⎥ ⎢- ─ + ─ ─ + ─⎥ ⎢\n",
" 2⎦ ⎣ 2 2 ⎦ ⎣ 2 2 ⎦ ⎣ 2 2 2 2⎦ ⎣\n",
"\n",
" √2 √2⋅⎤ ⎡ 1 1 ⅈ⎤ ⎡ √2 -√2 ⎤ ⎡ 1 ⅈ⋅(-1 \n",
" ── ────⎥ ⎢ ─ - ─ - ─ + ─⎥ ⎢ ── ──── ⎥ ⎢ ─ - ─ ──────\n",
" 2 2 ⎥ ⎢ 2 2 2 2⎥ ⎡0 -1⎤ ⎢ 2 2 ⎥ ⎢ 2 2 2 \n",
" ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ ⎥, ⎢ \n",
"-√2⋅ -√2 ⎥ ⎢ 1 1 ⅈ⎥ ⎣1 0 ⎦ ⎢-√2⋅ -√2⋅ ⎥ ⎢ 1 ⅈ⋅(-1 \n",
"────── ────⎥ ⎢- ─ + ─ - ─ + ─⎥ ⎢────── ──────⎥ ⎢- ─ + ─ ──────\n",
" 2 2 ⎦ ⎣ 2 2 2 2⎦ ⎣ 2 2 ⎦ ⎣ 2 2 2 \n",
"\n",
"+ )⎤⎤\n",
"────⎥⎥\n",
" ⎥⎥\n",
" ⎥⎥\n",
"+ )⎥⎥\n",
"────⎥⎥\n",
" ⎦⎦"
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 1,
2019-11-11 13:36:11 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import sympy\n",
2019-11-13 15:08:33 +00:00
"import numpy as np\n",
2019-11-11 13:36:11 +00:00
"\n",
"M = sympy.Matrix\n",
"simplify = sympy.simplify\n",
"sqrt = sympy.sqrt\n",
"i = sympy.I\n",
"_i = i\n",
"\n",
"from sympy.physics.quantum import Dagger\n",
"from sympy.physics.quantum import tensorproduct\n",
"\n",
"sympy.init_printing()\n",
"H = simplify(M([[1, 1], [1, -1]]) / sqrt(2))\n",
"S = M([[1, 0], [0, i]])\n",
"C_L = [H, S]\n",
"basis_vectors = [M([1, 0]), M([0, 1])]\n",
"\n",
"def getitem(m, i, j):\n",
" # Note that sympy uses an extremely weird way to store the matrices,\n",
" # in particular the internal representation is vastly different from what\n",
" # is printed. For instance the H matrix is stored as a Mul object\n",
" # (even after using simplify) instead of a matrix. \n",
" # Therefore m[i][j] will NOT work. This is a workaround.\n",
" return (Dagger(basis_vectors[i]) * m * basis_vectors[j])[0]\n",
"\n",
"def is_known(C_L, a):\n",
" for c in C_L:\n",
" test = c * Dagger(a)\n",
" if(simplify(getitem(test, 0, 1)) != 0):\n",
" continue\n",
" if(simplify(getitem(test, 0, 0) / getitem(test, 1, 1)) == 1):\n",
" return True\n",
" return False\n",
"for i in range(5):\n",
" for m in (H, S):\n",
" for c in C_L:\n",
" c = simplify(c*m)\n",
" if(is_known(C_L, c)):\n",
" continue\n",
" C_L.append(c)\n",
"C_L"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 2,
2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I3RwkSiGSs4a7h5FK61eEhH6NAHCOIZqqhPNGMFZxC2YGMUriU8rjI0GtxBd/WJZqzgLPBwqDoK11IeopCD6s0N4hahOtGMFZzBkQUbo3CtwUM0Qk8Nqk/QYgVngYdD1VG41uQhmbZLJj3ByB2dy25Rjt5O4sQxFxPRtMBYq40crrXaKj1PTPMSHqgbpu2kIUdJMhC022aB8NFEMhgNeBHvJzQniWjaoKzWiok+SWme6rNctUSGRqMmEs2kyI/CgzytcGmFUxRDp4zi5a5AbwXc0L17wNuvqoAbuqqcfrLeCrihe/eAt19VATd0VTn9ZL0VcEP37gFvv6oComm76WkOX/PjHK7aRDMphUbhQZ5WuLTC6YlmUu73cvUK4GLxRDPqe8kBXqWAx9BXyeaVtCqQHUNjWO+eaAYYihO0jMKDhtLAJcfYLXFmGxrP4rtnRQKG4gQto/CgkTRwyTF0S5wecuT0iB9jRoHsEZqMplu++kQzKfVH4WGpT1pqLnnBf4gELjDCEDxwK6enTXBZEyfOHV7wpyASQw+RwAWch+AxGdoElzU1x7mDoaUxdJVkIADQexmFB3W0wqUJTlEMjRHBRKKZ1NUyCg/ytMKlFU7pCB28giCfoYr6RDMB8IWNUXiQnhUua+K8ytAAtIN+6hPNXPBw2D0KDxKywmVtnKKQYykcbiGqE80E117YmIW1zsNSn7TSfJ7l4Lfl4/VXdHjIs4FyjsxvsbLOvDLxzNPlcdq3gXcIHtTZCpdaOHGeW6zHPn38TD34OJvvR7zEem65w0G/zwW4wpjA5SSPBY7p/lh8xpjzdxQe5GqFSy2cOA+n6M4u8OGb/wFmtDR28OD1wgAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}\\frac{1}{2} & \\frac{1}{2} & \\frac{1}{2} & \\frac{1}{2}\\\\\\frac{1}{2} & - \\frac{1}{2} & \\frac{1}{2} & - \\frac{1}{2}\\\\\\frac{1}{2} & \\frac{1}{2} & - \\frac{1}{2} & - \\frac{1}{2}\\\\\\frac{1}{2} & - \\frac{1}{2} & - \\frac{1}{2} & \\frac{1}{2}\\end{matrix}\\right]$"
],
"text/plain": [
"⎡1/2 1/2 1/2 1/2 ⎤\n",
"⎢ ⎥\n",
"⎢1/2 -1/2 1/2 -1/2⎥\n",
"⎢ ⎥\n",
"⎢1/2 1/2 -1/2 -1/2⎥\n",
"⎢ ⎥\n",
"⎣1/2 -1/2 -1/2 1/2 ⎦"
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 2,
2019-11-11 13:36:11 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H2 = tensorproduct.matrix_tensor_product(H, H)\n",
"H2"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 3,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [],
"source": [
"zero_state = M([1, 0, 0, 0])"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 4,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAB0AAABlCAYAAACx4uijAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAC/klEQVRoBe1ay03DQBB1EGeUEwWYDkgJhA4QHRBKQFSAQgdJAVxSApRAKAApKYADIArAvOfsrhxn7czYgIOYkSb78ey89dvfZJMky7JEo0mS9KEj6FzTrmi71+v1jqFZhc7gPAhtUSAggalRgd2iwl/GBvuFVrfILwplZpfFMnr7hPITHJ4V6yP5caTuFHV5uyLoBE7XQCINRVXwMy0boqOsykH3yg9/o2ygP8pyJ/QWZ+/Wt8MMTGF0CR1CU5QnSBeYrVxuYlGBuiV1JfZeYdgJvZ2AiunF+OX7ZgVjeTXoz7edOhs+E4NKHW4D5PPdppc9BMU8zq6Zh3D5UC7AwvsqK/sU0+vcjQHAdZqLW6dzFI5clSjR0jsC0LDgmecmNwke7mLRgvItH8XeKwxV9ILa8uHMTixRz4hCLNo3DY4dpYwEBqFSmGkECsAU/jmeA+3MZb9U9LKBBwQYAy2WOYneURbHV6o3dYA8zm4I5gA5rq9QsWjflGuSGwTTIHjLsHZDZU1GC3oCX0Pn7xJgqk3B90MFChBpsO39R1PVmEY9NKg00AakyZv8H3pVS8btSNwIuFYt2N46ozqZSBxTnhB30M+6LmI82wbbzw4nh+F5SIcp9lbV9Y7GHv55K4MmmQXbICIuFmzHeamoVW2DmHkWbFcQGa9W0UsX7qThLP57wfaBI8GncU5WtW2C7UPvmPR+uIJP/bNY2ibYfvEOVWOKcbRg2zMnSjuJHAxUNDZNjVRLxoJtLc2dzF7xmH5DsB0IEYNi3xVdlQfPNZndppcdB8V2s80vYWLRjim/+tvN9o/Rmzv2sS8KdrNdS7V4G3Re2gTboSNa0DbBdjNQC7YDb8KMdhsUuq03M9B6flo+Va1TC7a1bHcye8VjasG2djxpL6aXxhZsgwELtjkVNqTx5uAotb+RbFBaruDM429tMZ0hAgy/v8Emhd5D2cYr/1bSL9nxz8kxfzDLEt4j8Nv1OTQm/K/Rg3+AcXxDnvZrApu1+wjY8ce8qMB2+gXddflBWpRqZgAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}\\frac{1}{2}\\\\\\frac{1}{2}\\\\\\frac{1}{2}\\\\\\frac{1}{2}\\end{matrix}\\right]$"
],
"text/plain": [
"⎡1/2⎤\n",
"⎢ ⎥\n",
"⎢1/2⎥\n",
"⎢ ⎥\n",
"⎢1/2⎥\n",
"⎢ ⎥\n",
"⎣1/2⎦"
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 4,
2019-11-11 13:36:11 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"plus_state = H2 * zero_state\n",
"plus_state"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 5,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [],
"source": [
"I = M([[1, 0], [0, 1]])"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 6,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [],
"source": [
"C_L_0 = [tensorproduct.matrix_tensor_product(I, c) for c in C_L]"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 7,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [],
"source": [
"C_L_1 = [tensorproduct.matrix_tensor_product(c, I) for c in C_L]"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 8,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAIgAAABkCAYAAABdPHirAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAHJElEQVR4Ae1d7Y0cNwy9Dfw7MGIgBaw7OCcVxOnAlw6S1JASnA6cDoJcCUkFhq+DSwEBYizSwOXxMDQGa2oo3S5JrUQBws5QGpF8fKP50PBud3V1dY36AVUqtw8PDzdSQ8rGQGC3293Dk73kDWK/e7Zq+BXb1Hld/l7v5PaQCLwVvPoesjckXxPkHRiThBDQGlmEmP927B9mFRJ9RpDjfuI+DqZL0h+orzD4QexkIIReZvq/GP4l6lsvQkfq1qD0sI0C/oC6B+BXUkXbc1QixTtUul+h/s+lvhayRecbHpt0oz5eO1lm9RupW/PJyjaM+xMq1D9cfYENtaDjAfUG9Wd0/l094IwdcIaQsUTGWx6W7ME27RNhzUqkbs0pL9uqCKIZa9xOT1F3go73kL0GUDSbWJVI3ZpPLrZdAkFeA6mPAlo0i1ChdqsSqVvzycW2rglSOTt8pSH5lPZI3Zq9nrZ1TRAAxcHn2WKNHc8qVpeYSN1rP6VtN9t6J4gEzrHsxbHAcT9St+bmWWzrnSA8S0hg8FlE70UsSqRuzR8327omyPI4S2BJlxGWmbz9jdStscPTtq4JsgD1J373Amg8g1C7VYnUrfnkYtslEITe4H4joPUKsrvV2SR0OVkUqVsz3sW27gkCAtBi0kc82j0uHhFqy2PeD9j8kfatSqRuzScv255phnA7gkKMpes+n80fILvD/nsYS58KWBaaL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0hb5vlXMccnEqS34J23DSZGJU5PGvtntqnuQ5lHzgGEQSIIME0obR5IgNrgOM2oSZJhQ2jiSBLHBdZhRkyDDhNLGkSSIDa7DjJoEGSaUNo4kQWxwHWbUlrWYaROn8Oo5NGnrVLbB/muMQWtKT/pPXXRwJk4VkqiATUjSFlZrN5O6tHbYTQuMRIrmpC8ck4lTAEEty6JVSNKWapzSAQQ6y3/qqr0HcUnSKfg8q+4CHL7iWoK4JOkUXJ9VdwEOX7FKEEyz/GHylmX8dftWn+a2WXU3A2V4gEoQ6ObgHwQ7+PP7GhIJh6uiWXWrwHh1qCFIjS1nSdKpUST0mVW3AMX5RTXvQXiWkLTzGT5i4lSk3/TOiWblv1BbZucbPL3cSYF6qkwlCD0uwVgaXzKUZWaJUzPqJrAJd/zQR8mhpfYS45KkU0BiVt0FOHzFtQRxSdIpuD6r7gIcvuIqgmC6mzJxKtJvXxqUtan3IKtDzZN0VrqON2fVfYxD0z7u32j2pfvEJyd9ZeJUE+RzdAaxMnFqjlCf7mXVPcjpanKES0UgCXKpkXOyOwniBPSlqkmCXGrknOxeP+beL6+116pv8S6APtjJMigCiPk9XNuX3COC8H+ckvqYrLFIilIWhgB/kC0a8D9jejx3xeetigAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}1 & 0 & 0 & 0\\\\0 & 1 & 0 & 0\\\\0 & 0 & 1 & 0\\\\0 & 0 & 0 & -1\\end{matrix}\\right]$"
],
"text/plain": [
"⎡1 0 0 0 ⎤\n",
"⎢ ⎥\n",
"⎢0 1 0 0 ⎥\n",
"⎢ ⎥\n",
"⎢0 0 1 0 ⎥\n",
"⎢ ⎥\n",
"⎣0 0 0 -1⎦"
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 8,
2019-11-11 13:36:11 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"CZ = M([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, -1]])\n",
"CZ"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 9,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAC0AAABlCAYAAADZEWqbAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAD30lEQVR4Ae1cXW7UMBjcVDyj0gcOsEgcgB6B7Q2AB95pj4A4ASo3aA/Qlx4BuAHtAZC2B+ABVhyAZSZ8jtxgb7Lx2CjIllz/xPt5Mpn97HxNttlutwtlaprmEPZeIZ/B9rHStrN1gEmeIW8j+doNHFPSFsadIhM486QEO+sInpbhB57VD6ivvTard732ziaYvcWAW0z4YufA4YPngSEn6Gvt+qAvMOleIAOGJV3Acdk3BCLY1YI+6B+cQ7uCLnWVKtOlmPa9R/Kc+IYvYeQMeYW8RPsC5RregO5UlqSgzWW+laGLGKqajhAj75bJA/od3HlBPu2ylnoWMtAqQGNOaJaaljFNhiARbkffGVt0f0xvcBU2f6qav1LQgHQOgPTTbTI/fYPGE+uSFGp5nALoykPGfTEXGd4cyJIaNFn+IkMXMSSVB6TR37zzJO7QzzsaWVIz3QEzSfBOQ35zmwU0AC8Blno+VnsOsiKVBw06wADLG1G2+SXcoC27/5QybYC5HX1PsAaYuv6OLEtqpumTucCw7BJY7nx315lQUYN+Diwrw8MIk3RRcecpBQ2QqmCNwxcspZoOzpChs4LOQGrQZGU6SEuGzlkyLXV5tiJyIaGvrsEaX2WzlMcsQVPT3IFdIf/yL8G+deg5d7Dmq+FckOkj5NfISaxj39EMZcyRkp7iw8SZBjQFQcpn1S6vBmtiVyNJxwGjNVgTIKXtkmoa3qMGa2JMqzXdzmMbpxqs8VmXMm0MFwnWPLSzcKV/UvvWcwZrHjsw9B4/reFKd2xKmTNY880BUru8GqxxzPZL6RexbzxXu4LOxWzfbmW6z0iuttTl1WDNjstUNb2DHOkhmaYLBGu6E5eBZqCms5q5MktNy5gmuZBIDdbEVKaWRw3WxJiWaroGa2I0o1+t6XYq2zjVYI1PvJRpYzh7sIYnwGeM+E+eJb5Ii5QMGz/MFu112beJfi5AfOvoxu8fqttnMGyrffAKBh/BeDThSpCglQ0g+ElJ6vKGEOCkJMEcqaaHQKuOV9AqJofsVKaHGFIdnyXTRV2erZjJT94UBQ0/zSd7k1+TmqU8Zgl6lDygRe4TPiPvs194act26zRgQ/bkzSjQmHyDmZOe7YcNWTDn/5VHe30Ff0xmya9JjZKHAK8zIXlNqrQ8JMGc0qC5Gia/JlVUHvAgkidvSjPttO1e2pn0mtQ/AW0bp8nBnKLyIM0OMKSS9JqUi3t0cQrYdvVrGE+Khfifh90l8kdkzukygzuHvXH8cRSH4V7JcVxauZ/gb8yEEt8l/BQ6MKUPLDOY89f+BXPcW+IxjsGcYMLYy9/xqBy2/jxphQAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}\\frac{1}{2}\\\\\\frac{1}{2}\\\\\\frac{1}{2}\\\\- \\frac{1}{2}\\end{matrix}\\right]$"
],
"text/plain": [
"⎡1/2 ⎤\n",
"⎢ ⎥\n",
"⎢1/2 ⎥\n",
"⎢ ⎥\n",
"⎢1/2 ⎥\n",
"⎢ ⎥\n",
"⎣-1/2⎦"
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 9,
2019-11-11 13:36:11 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"CZ * plus_state"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 10,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABkCAYAAABNcPQyAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAGmklEQVR4Ae1c/83bNhC1i/5dBCnQAZwNnGaCphskK7QbFOgI6QbpBkW/EbJBkG+DdIAAaT90Afc9R2foU2nxKJI+UjoCsqTTUffjiZJ1fNB+t9sdsXzAEmp3p9PpdeiAy9rIwH6//whPDiF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AAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}1 & 0 & 0 & 0\\\\0 & 1 & 0 & 0\\\\0 & 0 & 1 & 0\\\\0 & 0 & 0 & 1\\end{matrix}\\right]$"
],
"text/plain": [
"⎡1 0 0 0⎤\n",
"⎢ ⎥\n",
"⎢0 1 0 0⎥\n",
"⎢ ⎥\n",
"⎢0 0 1 0⎥\n",
"⎢ ⎥\n",
"⎣0 0 0 1⎦"
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 10,
2019-11-11 13:36:11 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"I_4 = M([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]])\n",
"I_4"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 11,
2019-11-11 13:36:11 +00:00
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"from itertools import product\n",
"starting_states = [ c0 * c1 * ent * plus_state for ent, c0, c1 in product((I_4, CZ), C_L_0, C_L_1)]\n"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 12,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 12,
2019-11-11 13:36:11 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(starting_states) == 2 * 24**2"
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"resulting_states = [CZ * s for s in starting_states]"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"starting_states_np = [np.array(s).astype(np.cdouble)[:, 0] for s in starting_states]\n",
"resulting_states_np = [np.array(s).astype(np.cdouble)[:, 0] for s in resulting_states]"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"from collections import defaultdict"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"state_indices = defaultdict(list)\n",
"\n",
"for rs_np in resulting_states_np:\n",
" for j, ss_np in enumerate(starting_states_np):\n",
" c = ss_np.transpose().conjugate().dot(rs_np)\n",
" if(c * c.conjugate() == 1):\n",
" state_indices[tuple(rs_np)].append(i)\n"
]
},
{
"cell_type": "code",
"execution_count": 17,
2019-11-11 17:37:44 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-11-13 15:08:33 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAB0AAAAPCAYAAAAYjcSfAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAB2klEQVQ4EZ2UgU0CQRBFgVCA2oHQAWAFYgcYO4AOtARDCZRgsAPowEgH0oFCB/jeenO5W+6McZKf3f0zOzM3M3ud0+nUQUauVcBdgEFw7sFcPrj/rl0vdrvdg87ADijulTH6oxtsZixr9y1yxPayquPOsnpm/4LNrl+QX6xiBPbgFTxHQPbKDTAp9dpWZcrhKQiCWZUNWOBjKw9nwmIYQXco71X+IpZ1nOuLALbGREN0vo2ABWn1TLiT+siyxqDW0/yMzSznPOd3tQMqWnv/56AtAe1ZbQg5v4NDk31wUV5rniaTC8oQrDCyh41SlNWAZS8LQ+dih971AXwC/VnN1N/4UpteloO9g2CJppFdvqKzbzU9Z/vmPb92Xr3D2ReSWtTaRwxM5KN6MfbwKak4xwofQaHqM4JuBdLT7LFpEydtENOZGS04n5WeQOlNo/uZ0volv96kJj2cboBEm2iYixOav9WwMWAED666DvzSCWhyfKUl2de+iAS1tbxtjg3a5A86SarCMq+/Z8T6b3IdnH8fDZzus5kIfa7THqSnxJqyrjmAe9QAlBMdTuDi8Tcmqx3iEJZ69n55Ob19jPaUbAnMRLGs9usaXVMJLbf8G2gU7t01+LyFT636Br8XM4/ij6J4AAAAAElFTkSuQmCC\n",
2019-11-11 17:37:44 +00:00
"text/latex": [
2019-11-13 15:08:33 +00:00
"$\\displaystyle 576$"
2019-11-11 17:37:44 +00:00
],
"text/plain": [
2019-11-13 15:08:33 +00:00
"576"
2019-11-11 17:37:44 +00:00
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 17,
2019-11-11 17:37:44 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2019-11-13 15:08:33 +00:00
"missing = []\n",
"for rs, rs_np in zip(resulting_states, resulting_states_np):\n",
" if(not tuple(rs_np) in state_indices\n",
" or state_indices[tuple(rs_np)] == []):\n",
" missing.append(rs)\n",
"len(missing)"
2019-11-11 17:37:44 +00:00
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 18,
2019-11-11 17:37:44 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-11-13 15:08:33 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAACMAAAAOCAYAAACl66WxAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAB+ElEQVQ4EZWVjW3CMBCFk4oBEN0ANqDtBE03oOoGZQOYgW4AK9ANygYVbFA6AYUN0vdZPnRxHAQnnWy/e7bvx7mUdV0XZVkOi6KYS5FH6Z90LtsOoEu0byzbVLxpFyfFtWcRsYPGkXSh/Xvj4cgap0whSGtpZVhulP1H2tib4xkm7lY6cet+PGMIhqylfSPYKOyI2jodZZtJr3ZG3Hf4mXMI/Av8TpNKelT68NLLRot+LKHHKSvlOUVt2C4sXmXLlf1beMX9OMOle3nG4TlJnYTzJv4qR76AETRvMRW7t+rpUDzOCdHzjhrRKALKs8xt6MKIusvm8AGZaUksAw/bvrDAEQ52koPn19/anAcGEbYseJZlK5TJG2zOo17p0g8D4shnfGt5kiM6l/etzCh6SrDRpY3eIZyv4abyuGstegedp5a1Q8OZeCHvJHWE8vD531qecKP2WXlyb8ewfc/8kyMTzUfeEWE4gTA+aU35vPDIhxHni2y8MU/UnK/WzvMmy8wmdF1ZOJS2fO7CzCV8Oa2GaDzZaIxXdWDxKHOriQqj9FvOLDXB2y8pnnvB47FI/D+yoozgMe/rxQjCSDtO7oQ/GM4oGx2bf95nXMP9lT4LCy2E/wWH5jR4LGKasRCN20MwM+NpzqVLW9sojMtp/2QcpewEHM7/BytymT8mTB2JAAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle 24.0$"
],
2019-11-11 17:37:44 +00:00
"text/plain": [
2019-11-13 15:08:33 +00:00
"24.0"
2019-11-11 17:37:44 +00:00
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 18,
2019-11-11 17:37:44 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2019-11-13 15:08:33 +00:00
"len(missing) / 24 "
2019-11-11 17:37:44 +00:00
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAADEAAABoCAYAAABYHRgjAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAGtUlEQVR4Ae2bXY4cNRDHdxHPKFkkDjBIHGCTnIDJDRKQeN/lBkE5QRRusDkAL5sbBE4A7AGQkgMgEVYcgOH/67gsj6d72naXNzy0JY8/ulxVf1f5q9tzutvtTu4inJ6eXkvOkzlZ0ud0jiZ//kle0aMsAJfi+wYF52KLfJi2tKtqIxAAeFzVqIL40wraJlIBeKaGV9ZY5XvKPw/lTUgvBPLWaFrSczXCHGPxGkstieKLFSIPla/ysurepnV5nueKY/qJdHfCIALE74o/KkKchnci+jmtqMkHK8DjtbVTHco8Nr4qYw3kPlDdjdGlqWgYU3nAPZ+ozTARmCU2qog9tjQvAbjNnhXgqYBC94y/8oDgwbnVlaSih49IdyeLZid6caKXxH/w+5dk0iChrxRT//9ez7HWqBXStlP5ZhBSfiumKHClPL0eQyjTs0ddUXR4AWvHg9i4MbPInSST8fRSCkdXVJnZ6Kh76Dlu9EYxulbKYy6vdtGdlB8GNj7ZNCbUjp6k/aAMqeLBWEiV0nMAxJlPeTqySr7o/UCgnAKzy2ANpUetoOdmARS3SJs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8eNm5jOTMZeKdjEIei1aQ/lZK4iGHo/3A5XHIsOMqDS6EvVzAHiuEEE0rdhiwhtuFiTmdQIuNnmS08AFwLGvqbipvUT4VvnqUDWwrZckBWu43MAUHyzBWxIWyaL1SnTREsqXD2wDYKnaMkABUiTY2nmkkhlBLF0nPtoNTIGIYREI9ShjI34RilzvOFMMQoNzmBLuSj91UPHNzGIQNUzvCqjJaZpirfH/JS22RI3CYSNoawhrBOFC1rz9kPX97QJCKq63MWvt1GtMHD0/1Co5R9/FneT7fKNIA6AW/YMrZZbne1kiytEgZ2/GPmvxP7gi0yzTFUTYvbLDXW9jZh1/UOxiiWCBY+eHA0WWVHQZ2FKI4ytnBNIYNODX25ixN7JMF3fKZHQvriC6d3GhgF4De72NWWiASOY+JrRG8BZivY0Zu7gw424Jyd0qjt1As1Mdz12DKwi5Eqv0XDibI6h97gpCwk1B6/VUH7NOCdC03WzeG8SsQBF0uY1ZIriUxnp7jN6sxNdR1+BqieSVzJjLWF3VN+oStK4ggsD1NmZJz+c07pYIbzrW25h5T8+Vu+xiwwCf/IY3p1Tt8xTEW624efvXUqjpC3/OaElZevFZbTPFAxBMeVMHePfpcEqRmXreXU2G/wBnEHMCwSMhRgAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}\\frac{\\sqrt{2}}{2}\\\\0\\\\\\frac{\\sqrt{2} i}{2}\\\\0\\end{matrix}\\right]$"
],
"text/plain": [
"⎡ √2 ⎤\n",
"⎢ ── ⎥\n",
"⎢ 2 ⎥\n",
"⎢ ⎥\n",
"⎢ 0 ⎥\n",
"⎢ ⎥\n",
"⎢√2⋅⎥\n",
"⎢────⎥\n",
"⎢ 2 ⎥\n",
"⎢ ⎥\n",
"⎣ 0 ⎦"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"missing[0]"
]
},
{
"cell_type": "code",
"execution_count": 46,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [],
"source": [
2019-11-13 15:08:33 +00:00
"starting_matrices = [a * b * c for a, b, c in product(C_L_0, C_L_1, (I_4, CZ))]"
2019-11-11 13:36:11 +00:00
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 47,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [],
"source": [
2019-11-13 15:08:33 +00:00
"resulting_matrices = [CZ * c for c in starting_matrices]"
2019-11-11 13:36:11 +00:00
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 49,
2019-11-11 13:36:11 +00:00
"metadata": {},
"outputs": [
2019-11-11 17:37:44 +00:00
{
2019-11-13 15:08:33 +00:00
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAGoAAAAVCAYAAACuVXuDAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADtklEQVRoBe2ZjXEaMRCFjScFMEkHuAMSOsAdJKQDuwOnhqQDu4Q4HWCXQDqADmLTAXmfkDQSJ7jjLGlgxjuzSFrt7Vvt6u+OwWazuQhpMBiMJFuFsvd63QikcnAZuiCFO7XHoSx3XRgN+5INcS431hnbG9lc+CH4RKnjq6SftJr++N6gov6xeCkeBuJGtYPes3Q24oXlpYwsxC+hMfXh7L1ldOfiRpLDZ3LWwQI7p82UrRSOcvCErvrIyZbs1kfwF9RDlgz5oxiHCSb75DDUCZ5v1bO6JAbGFuVPcWRTbVbXY4hj9XhmGspL1YWDb5EPJbAO4aiPmJvYmMSoQSJuDjmifrbFZKLC59r01N86eHTEUfLAEL3CIV6JujAYa/FEteGo/0Z8zxjd1jdT40HCU6GpHHnV0t/dZtkSip5nbEXCWFtWUYa64NiczIjDpX4Iyqnd8kjISo4SsBTtJjCl01f2vdKk7YpDbmYf9PNNbA6vviM79jlNDpa0C/aV6izvv86O6viUInOZCHVTSn1l8ostr8YF4hgccnNNor7UcE4YjkjQbwXbrBYFh4sDt8lryfZOGPWTJHR/iLOT9WMtH4ruLj1wOCunnFEELroaZ49CYFCBICEmSYhtYEhQ20zmgvEg/V88V4BuZbvGOX0sDrkZkqiPYh+4AgHoYpJZzHsTK6ZBkpPEJwXyttGZQSD75naVwdRBEz1xTGxIVDWSo7y08m6wj1jdEdnBsfJKJYnJwatAjS2vD45ZSJxRONgIUBStfA3Ow9Q2izMkw18oaCtJvJlfhUmSzKy6jIHF3kR22VpDMmeilXMDfevZ2BeH3LyQKAJnBh96WajOGZMa8FR40UVCASJQk4Q+yYvOEukyU3tt33oO3AhbbSYJL9dst9ENtC/WsTj4YIlJvLrUD7N4YoWlC/PtLgTRwLmqQj4gkjFxzNcJ1d33PkpkHMY+KZIx43g5PrSlSuVowi7sqRBWA8cDbiufVcypMpuXGrz5nLRbqo/goMgMc9/nkN2Fump31SMJXA5gnqFkRXh8td13RfB2OfVNkissHNkJbXatywb+hPiM3Y9V9SxYbTjOX4s3MsGxjbHrPMdSY2BLfHOiuoy9FpZwmNRmEbH1QXzBLnKrMtbr/HCeretAmbOzBhbnObm5MInSADmc977HoHjKZM+OfzV8rIUlHFYT/7ZvL05uqUvIoTZ37XMq5ffBv2hyjqUWFrkQ+618wCAc2Szyx1x0/XX972WdCCgPfCnh1cC/hP8HWgYo7Ny1PQYAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle \\left( 1152, \\ 4, \\ 4\\right)$"
],
"text/plain": [
"(1152, 4, 4)"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"starting_matrices_np = np.array([np.array(m).astype(np.cdouble) for m in starting_matrices])\n",
"\n",
"starting_matrices_np.shape"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [
2019-11-11 13:36:11 +00:00
{
2019-11-13 15:08:33 +00:00
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAGoAAAAVCAYAAACuVXuDAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADtklEQVRoBe2ZjXEaMRCFjScFMEkHuAMSOsAdJKQDuwOnhqQDu4Q4HWCXQDqADmLT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zBhbnObm5MInSADmc977HoHjKZM+OfzV8rIUlHFYT/7ZvL05uqUvIoTZ37XMq5ffBv2hyjqUWFrkQ+618wCAc2Szyx1x0/XX972WdCCgPfCnh1cC/hP8HWgYo7Ny1PQYAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle \\left( 1152, \\ 4, \\ 4\\right)$"
],
"text/plain": [
"(1152, 4, 4)"
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
2019-11-11 13:36:11 +00:00
}
],
"source": [
2019-11-13 15:08:33 +00:00
"resulting_matrices_np = np.array([np.array(m).astype(np.cdouble) for m in resulting_matrices])\n",
"\n",
"resulting_matrices_np.shape"
2019-11-11 13:36:11 +00:00
]
2019-11-11 17:37:44 +00:00
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 51,
2019-11-11 17:37:44 +00:00
"metadata": {},
"outputs": [],
"source": [
2019-11-13 15:08:33 +00:00
"resulting_matrices_np_invers = np.array([m.transpose().conjugate() for m in resulting_matrices_np])"
2019-11-11 17:37:44 +00:00
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 52,
2019-11-11 17:37:44 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-11-13 15:08:33 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAACcAAAAPCAYAAABnXNZuAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABw0lEQVRIDcWWgVECMRBFOccCbigBOkDtADvQFrQDqUE7wBKkBOjAkQ6gBKADfC8kR+5A0BmQnVmS3fxsfjabHMV6vW6dWoqi6BF3msfFV2K38c9z/8G+5JIC7KEztEy+fe0xHONL1F1/RTXmTlx8HXQYVewYdWOBE/2WOxqhggQYdIecPvQozsBIIqNh/xWtxcSW2CgRifPEOacf7MbgSxysBcoxMchBXHPR5vwYw43urIPPrC/FXNG5lPRZeBlrMecwwSjxdy5JThJzMrTKmWX98jozTtpl508EtE6VLjqESHWD6T+Gkd0fL6UXYnoucpL6SFnxiLBntPf4zNheYVxiYgcBADh/Sg4WesIy8Ve4hLdFfCZmua/Zdxw1w4HTf9acj28nZpFuXfD7lE0g9pxGTk6ORcao7+VPkuqwGgdvfZqtipj2OWrulrgLgzekrQ2B6lJoQ+yBppsTw2fdneWde2chb2dTfNdqlwESXoA78JsLsJ0h4cU5MjdkUYu6OiJsL5BSPR8xO34lJuLD6ObHDPt9fSv4MbXhU4LTI7EmLF7T/ymINsgfcNvngH8iTPaYB8RabSKF47Quzdw+mYK9+QYkdqlSSVVlyAAAAABJRU5ErkJggg==\n",
2019-11-11 17:37:44 +00:00
"text/latex": [
2019-11-13 15:08:33 +00:00
"$\\displaystyle 1152$"
2019-11-11 17:37:44 +00:00
],
"text/plain": [
2019-11-13 15:08:33 +00:00
"1152"
2019-11-11 17:37:44 +00:00
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 52,
2019-11-11 17:37:44 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2019-11-13 15:08:33 +00:00
"indices = defaultdict(list)\n",
"\n",
"for rm_np, rm_np_i in zip(resulting_matrices_np, resulting_matrices_np_invers):\n",
" for i, sm_np in enumerate(starting_matrices_np):\n",
" test = sm_np.dot(rm_np_i)\n",
" check_indices_zero = [(1,2), (1,3), (1,4), (2,3), (2,4), (3,4)]\n",
" check_indices_zero += [(k,i) for i,k in check_indices_zero]\n",
" check_indices_zero = [(i - 1, k - 1) for i, k in check_indices_zero]\n",
" for check in check_indices_zero:\n",
" if(not np.allclose(test[check], 0)):\n",
" continue\n",
"\n",
" diag = np.diagonal(test)\n",
" phases = np.angle(diag)\n",
" phases = phases - phases[0]\n",
" if(not np.allclose(phases, np.zeros(4))):\n",
" continue\n",
" indices[tuple((tuple(r) for r in rm_np))].append(i)\n",
" \n",
"len(indices.keys())"
2019-11-11 17:37:44 +00:00
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 54,
2019-11-11 17:37:44 +00:00
"metadata": {},
"outputs": [
{
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tl0asrvC1b+FheuL1sfeLLD19Ka9WSXBIG/UOsDi56wXVavqhX7jKU0tc5lKuieLTsW7Ch21SPU2sbChDhTnwyxtrGw5/OPOKatbYpxkl7p9OFzRXmaz33WLg02ss3mOrnpYocfqv7TIB5bL/bEwvpL9qPb1ni4TvfwzNfUmk0xZ+OlUy95o+zVNb3cCDu6p6aBRrct9tI/7A/7iMa49O/MWuy4TtWhsjfnp9Ri9LjFn/wb7GRumj01+R3ZGpio50Figd/D/ErXPbYe7PCxdD2fx+3BL/7gJ1S/YTVl7XLNPPZbulv1bPnzYE4+WmMx7LAJnfPgoz5nZFqEWB/IHBnYqRjTvPdse+YZ91SfPbhOr996mNM9M9gz36ZnWbrPsrXwq6bmdQvum/KMncEOn0ueURb2NJ+4p5kPmc3UXjOLP8UqW4wRIW+ofABruH4DJgu7ua7zuWL2LTnDsqdxYd+sjWQ7srVwZUyntWjxN8It91rHgn2IZ6yFHcxSh1QuwzblzOn8yNijL1Z3C3vOhPum9Mk0hic/fC1d03uyZ3pMXxPLWCx74kpb3FfNB70+/Xsblh921PdmWXypbtOpl+8/08mRLcuexoB9kymzCdFvWHZw0z01+ezdMrrDhu4hjL9e1qP72PEMdkvWlRILy6S2dA+E3+o64kjHnnMYh2KCXapVug41hin/TfEUqyc/fFFr/zT26JZhh40pl2Gf5inhufd5cWxgD7Wu9GbX+aFiTBMyuvXUHr5M64go7OCmn2ejzOl+UndKT/gy1XVi6N16sicG+FzSa2Q8b37GX4pzdGsZi9E0s6Gfxb0xeLLD19Kcl5g9+UsN4bv6mbG0tx7PYIfPJTXryQ5fodZl4DE9ezLNp9er5FhLews/bJfWrCd
"text/latex": [
"$\\displaystyle \\left[ 3, \\ 5, \\ 11, \\ 14, \\ 17, \\ 18, \\ 40, \\ 44, \\ 49, \\ 62, \\ 66, \\ 88, \\ 92, \\ 97, \\ 110, \\ 114, \\ 125, \\ 136, \\ 140, \\ 158, \\ 162, \\ 184, \\ 188, \\ 206, \\ 210, \\ 213, \\ 215, \\ 217, \\ 232, \\ 236, \\ 239, \\ 241, \\ 251, \\ 254, \\ 258, \\ 280, \\ 284, \\ 302, \\ 306, \\ 309, \\ 311, \\ 313, \\ 328, \\ 332, \\ 335, \\ 336, \\ 338, \\ 340, \\ 342, \\ 344, \\ 346, \\ 348, \\ 350, \\ 352, \\ 354, \\ 356, \\ 358, \\ 360, \\ 362, \\ 364, \\ 365, \\ 366, \\ 368, \\ 369, \\ 370, \\ 372, \\ 374, \\ 376, \\ 378, \\ 380, \\ 382, \\ 385, \\ 398, \\ 402, \\ 424, \\ 428, \\ 432, \\ 434, \\ 436, \\ 438, \\ 440, \\ 442, \\ 444, \\ 446, \\ 448, \\ 450, \\ 452, \\ 454, \\ 456, \\ 458, \\ 460, \\ 462, \\ 464, \\ 466, \\ 468, \\ 470, \\ 472, \\ 474, \\ 476, \\ 478, \\ 489, \\ 493, \\ 494, \\ 498, \\ 515, \\ 519, \\ 520, \\ 524, \\ 537, \\ 541, \\ 542, \\ 546, \\ 563, \\ 567, \\ 568, \\ 572, \\ 585, \\ 589, \\ 590, \\ 594, \\ 611, \\ 615, \\ 616, \\ 620, \\ 638, \\ 642, \\ 653, \\ 661, \\ 664, \\ 667, \\ 668, \\ 677, \\ 686, \\ 687, \\ 690, \\ 699, \\ 712, \\ 716, \\ 734, \\ 738, \\ 760, \\ 764, \\ 782, \\ 783, \\ 786, \\ 808, \\ 812, \\ 830, \\ 834, \\ 837, \\ 839, \\ 841, \\ 856, \\ 860, \\ 863, \\ 878, \\ 882, \\ 891, \\ 904, \\ 908, \\ 926, \\ 930, \\ 933, \\ 935, \\ 937, \\ 952, \\ 956, \\ 959, \\ 960, \\ 962, \\ 964, \\ 966, \\ 968, \\ 970, \\ 972, \\ 974, \\ 976, \\ 978, \\ 980, \\ 982, \\ 984, \\ 986, \\ 988, \\ 990, \\ 992, \\ 994, \\ 996, \\ 998, \\ 1000, \\ 1002, \\ 1004, \\ 1006, \\ 1022, \\ 1026, \\ 1035, \\ 1048, \\ 1051, \\ 1052, \\ 1056, \\ 1058, \\ 1060, \\ 1062, \\ 1064, \\ 1066, \\ 1068, \\ 1070, \\ 1072, \\ 1074, \\ 1076, \\ 1078, \\ 1080, \\ 1082, \\ 1084, \\ 1086, \\ 1088, \\ 1090, \\ 1092, \\ 1094, \\ 1096, \\ 1098, \\ 1100, \\ 1102, \\ 1113, \\ 1117, \\ 1118, \\ 1122, \\ 1139, \\ 1143, \\ 1144, \\ 1148\\right]$"
],
2019-11-11 17:37:44 +00:00
"text/plain": [
2019-11-13 15:08:33 +00:00
"[3, 5, 11, 14, 17, 18, 40, 44, 49, 62, 66, 88, 92, 97, 110, 114, 125, 136, 140\n",
", 158, 162, 184, 188, 206, 210, 213, 215, 217, 232, 236, 239, 241, 251, 254, 2\n",
"58, 280, 284, 302, 306, 309, 311, 313, 328, 332, 335, 336, 338, 340, 342, 344,\n",
" 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 365, 366, 368, 369, 370, 37\n",
"2, 374, 376, 378, 380, 382, 385, 398, 402, 424, 428, 432, 434, 436, 438, 440, \n",
"442, 444, 446, 448, 450, 452, 454, 456, 458, 460, 462, 464, 466, 468, 470, 472\n",
", 474, 476, 478, 489, 493, 494, 498, 515, 519, 520, 524, 537, 541, 542, 546, 5\n",
"63, 567, 568, 572, 585, 589, 590, 594, 611, 615, 616, 620, 638, 642, 653, 661,\n",
" 664, 667, 668, 677, 686, 687, 690, 699, 712, 716, 734, 738, 760, 764, 782, 78\n",
"3, 786, 808, 812, 830, 834, 837, 839, 841, 856, 860, 863, 878, 882, 891, 904, \n",
"908, 926, 930, 933, 935, 937, 952, 956, 959, 960, 962, 964, 966, 968, 970, 972\n",
", 974, 976, 978, 980, 982, 984, 986, 988, 990, 992, 994, 996, 998, 1000, 1002,\n",
" 1004, 1006, 1022, 1026, 1035, 1048, 1051, 1052, 1056, 1058, 1060, 1062, 1064,\n",
" 1066, 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090,\n",
" 1092, 1094, 1096, 1098, 1100, 1102, 1113, 1117, 1118, 1122, 1139, 1143, 1144,\n",
" 1148]"
2019-11-11 17:37:44 +00:00
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 54,
2019-11-11 17:37:44 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2019-11-13 15:08:33 +00:00
"indices[tuple(((tuple(r) for r in resulting_matrices_np[0])))]"
2019-11-11 17:37:44 +00:00
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 56,
2019-11-11 17:37:44 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-11-13 15:08:33 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAK34AAAAVCAYAAAAlrVKCAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4Aey9i7XttpEtKnl0AGp1BM/OwO3OQJ2B/G4EbWdgj46gh24G6gzukzOQMuhrZWBnYPtkoDdrH2AJJPGZBRSK4NngGEskwULVrFkfYHFtSZ9/9tlnf8Dn9/jI8duffvrpx4+X+5+bgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZmAzsBnYDGwGNgObgc3AZuAeBj7//PM/wPLvg/Xf/gIX/yIDP/3006/w+TE82KfFGEDgfn2GhLEv8PnleXzf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8bJI2dr7NDnsrcRnxnskFHlAuRd1lcWv1JuuTU24Kc4BfexLjz6jRkm4G72JOHB8mDzlOWU1WfhA2MLMs0+AhlVbTtjp78jwY/pfV58V/DexM7Ex4LvVIcl/lSvXIcYTPsdfAZ26Iz9MrqT3UfEh71nEjvVA6H
"text/latex": [
"$\\displaystyle \\left[ 2, \\ 4, \\ 10, \\ 15, \\ 16, \\ 19, \\ 41, \\ 45, \\ 48, \\ 63, \\ 67, \\ 89, \\ 93, \\ 96, \\ 111, \\ 115, \\ 124, \\ 137, \\ 141, \\ 159, \\ 163, \\ 185, \\ 189, \\ 207, \\ 211, \\ 212, \\ 214, \\ 216, \\ 233, \\ 237, \\ 238, \\ 240, \\ 250, \\ 255, \\ 259, \\ 281, \\ 285, \\ 303, \\ 307, \\ 308, \\ 310, \\ 312, \\ 329, \\ 333, \\ 334, \\ 337, \\ 339, \\ 341, \\ 343, \\ 345, \\ 347, \\ 349, \\ 351, \\ 353, \\ 355, \\ 357, \\ 359, \\ 361, \\ 363, \\ 364, \\ 365, \\ 367, \\ 368, \\ 369, \\ 371, \\ 373, \\ 375, \\ 377, \\ 379, \\ 381, \\ 383, \\ 384, \\ 399, \\ 403, \\ 425, \\ 429, \\ 433, \\ 435, \\ 437, \\ 439, \\ 441, \\ 443, \\ 445, \\ 447, \\ 449, \\ 451, \\ 453, \\ 455, \\ 457, \\ 459, \\ 461, \\ 463, \\ 465, \\ 467, \\ 469, \\ 471, \\ 473, \\ 475, \\ 477, \\ 479, \\ 488, \\ 492, \\ 495, \\ 499, \\ 514, \\ 518, \\ 521, \\ 525, \\ 536, \\ 540, \\ 543, \\ 547, \\ 562, \\ 566, \\ 569, \\ 573, \\ 584, \\ 588, \\ 591, \\ 595, \\ 610, \\ 614, \\ 617, \\ 621, \\ 639, \\ 643, \\ 652, \\ 660, \\ 665, \\ 666, \\ 669, \\ 676, \\ 686, \\ 687, \\ 691, \\ 698, \\ 713, \\ 717, \\ 735, \\ 739, \\ 761, \\ 765, \\ 782, \\ 783, \\ 787, \\ 809, \\ 813, \\ 831, \\ 835, \\ 836, \\ 838, \\ 840, \\ 857, \\ 861, \\ 862, \\ 879, \\ 883, \\ 890, \\ 905, \\ 909, \\ 927, \\ 931, \\ 932, \\ 934, \\ 936, \\ 953, \\ 957, \\ 958, \\ 961, \\ 963, \\ 965, \\ 967, \\ 969, \\ 971, \\ 973, \\ 975, \\ 977, \\ 979, \\ 981, \\ 983, \\ 985, \\ 987, \\ 989, \\ 991, \\ 993, \\ 995, \\ 997, \\ 999, \\ 1001, \\ 1003, \\ 1005, \\ 1007, \\ 1023, \\ 1027, \\ 1034, \\ 1049, \\ 1050, \\ 1053, \\ 1057, \\ 1059, \\ 1061, \\ 1063, \\ 1065, \\ 1067, \\ 1069, \\ 1071, \\ 1073, \\ 1075, \\ 1077, \\ 1079, \\ 1081, \\ 1083, \\ 1085, \\ 1087, \\ 1089, \\ 1091, \\ 1093, \\ 1095, \\ 1097, \\ 1099, \\ 1101, \\ 1103, \\ 1112, \\ 1116, \\ 1119, \\ 1123, \\ 1138, \\ 1142, \\ 1145, \\ 1149\\right]$"
],
2019-11-11 17:37:44 +00:00
"text/plain": [
2019-11-13 15:08:33 +00:00
"[2, 4, 10, 15, 16, 19, 41, 45, 48, 63, 67, 89, 93, 96, 111, 115, 124, 137, 141\n",
", 159, 163, 185, 189, 207, 211, 212, 214, 216, 233, 237, 238, 240, 250, 255, 2\n",
"59, 281, 285, 303, 307, 308, 310, 312, 329, 333, 334, 337, 339, 341, 343, 345,\n",
" 347, 349, 351, 353, 355, 357, 359, 361, 363, 364, 365, 367, 368, 369, 371, 37\n",
"3, 375, 377, 379, 381, 383, 384, 399, 403, 425, 429, 433, 435, 437, 439, 441, \n",
"443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 469, 471, 473\n",
", 475, 477, 479, 488, 492, 495, 499, 514, 518, 521, 525, 536, 540, 543, 547, 5\n",
"62, 566, 569, 573, 584, 588, 591, 595, 610, 614, 617, 621, 639, 643, 652, 660,\n",
" 665, 666, 669, 676, 686, 687, 691, 698, 713, 717, 735, 739, 761, 765, 782, 78\n",
"3, 787, 809, 813, 831, 835, 836, 838, 840, 857, 861, 862, 879, 883, 890, 905, \n",
"909, 927, 931, 932, 934, 936, 953, 957, 958, 961, 963, 965, 967, 969, 971, 973\n",
", 975, 977, 979, 981, 983, 985, 987, 989, 991, 993, 995, 997, 999, 1001, 1003,\n",
" 1005, 1007, 1023, 1027, 1034, 1049, 1050, 1053, 1057, 1059, 1061, 1063, 1065,\n",
" 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091,\n",
" 1093, 1095, 1097, 1099, 1101, 1103, 1112, 1116, 1119, 1123, 1138, 1142, 1145,\n",
" 1149]"
2019-11-11 17:37:44 +00:00
]
},
2019-11-13 15:08:33 +00:00
"execution_count": 56,
2019-11-11 17:37:44 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2019-11-13 15:08:33 +00:00
"indices[tuple(((tuple(r) for r in resulting_matrices_np[1])))]"
2019-11-11 17:37:44 +00:00
]
},
{
"cell_type": "code",
2019-11-13 15:08:33 +00:00
"execution_count": 55,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAMQAAABlCAYAAAAS5kwgAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAIa0lEQVR4Ae1d7ZHjRBC1qQvgSMGXALWbAFUsGdxdBrAxUMV/6sjgLgD+QAZABtwFQNVuAPyALQLAvPZKLtuye0ZWS+puPVVpbaulmX6vuzUfGvWut9vtynJbr9cvUd5b7Pco+9ay7KnLyoKFOOo95wXIusHpHy9c8guc+s0FWedwU9ZdI5DACLtlwUIcxy4IPh5wZHN89PkXfH394kDwI77LyYfb4+GP0ncU+AnnfEKlr0vnepdnwUIcHU971zmyWn2NYzufPQyI9yCvVwCcKZiHyIBrBuDjH04VxA1cDu0C4rNTIX+TgSUzwIBYsvWJvcM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ibHEMVLUQVqw0TWSIRGaRdNXskwWHhlFkVjgnDQjobZZMqkSQgTySrhrcLDg0jCIzw2mWqAx9OTXRGZQOk8gskq4a71lwaBhFNgQnrh0tUZkopm0myaS0CgxlkXTVYGfBoWEUmQnOSbtMiOQwicwi6ap5ShYcGkaRWeGcbZYJg6Awicwi6ao5ThYcGkaRDcE5S0BA4Q30DpHILJKumqNkwaFhFNlQnJN2mQ4VRhPnPpFZS24EXTVHyYJDw2jpW+0skwzVT/ef4QzqzFEfOcqXluFX7FJnu0tis5d9ypniXOgURleNjyw4NIwiq8WJ8x6wn/r57reUI8sp2sRh+NrZHnHSb52jVx7AnaqYyOzKos0vi6SrBj4LDg2jyGpx4jyZYj27wdc//A8UdofKoG6y5wAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}\\frac{1}{2} & \\frac{1}{2} & \\frac{1}{2} & \\frac{1}{2}\\\\\\frac{1}{2} & - \\frac{1}{2} & \\frac{1}{2} & - \\frac{1}{2}\\\\\\frac{1}{2} & \\frac{1}{2} & - \\frac{1}{2} & - \\frac{1}{2}\\\\- \\frac{1}{2} & \\frac{1}{2} & \\frac{1}{2} & - \\frac{1}{2}\\end{matrix}\\right]$"
],
"text/plain": [
"⎡1/2 1/2 1/2 1/2 ⎤\n",
"⎢ ⎥\n",
"⎢1/2 -1/2 1/2 -1/2⎥\n",
"⎢ ⎥\n",
"⎢1/2 1/2 -1/2 -1/2⎥\n",
"⎢ ⎥\n",
"⎣-1/2 1/2 1/2 -1/2⎦"
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"resulting_matrices[0]"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAGAAAAAVCAYAAAC5d+tKAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADDElEQVRYCe2ZjVHjMBCFzxkKyNx1YDqAowPoAEIHXAdQAyV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, 24, 2)"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from collections import deque\n",
"lookup_edge_c0_c1_to_number = []\n",
"r = []\n",
"c = []\n",
"\n",
"i = 0\n",
"\n",
"for _ in C_L_0:\n",
" r = []\n",
" for _ in C_L_1:\n",
" c = []\n",
" for _ in (I_4, CZ):\n",
" c.append(i)\n",
" i += 1 \n",
" r.append(c)\n",
" lookup_edge_c0_c1_to_number.append(r)\n",
" \n",
"lookup_edge_c0_c1_to_number = np.array(lookup_edge_c0_c1_to_number, dtype=np.int)\n",
"lookup_edge_c0_c1_to_number.shape"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"indices_contracted = {k: contract_indices(v) for k,v in indices.items()}"
]
},
{
"cell_type": "code",
"execution_count": 64,
2019-11-11 17:37:44 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2019-11-13 15:08:33 +00:00
"{\n",
" , { {0, 1}, {2, 3}, {4, 5}, {6, 7}, {8, 9}, {10, 11}, {12, 13}, {14, 15}, {16, 17}, {18, 19}, {20, 21}, {22, 23}, {24, 25}, {26, 27}, {28, 29}, {30, 31}, {32, 33}, {34, 35}, {36, 37}, {38, 39}, {40, 41}, {42, 43}, {44, 45}, {46, 47} }\n",
" , { {48, 49}, {50, 51}, {52, 53}, {54, 55}, {56, 57}, {58, 59}, {60, 61}, {62, 63}, {64, 65}, {66, 67}, {68, 69}, {70, 71}, {72, 73}, {74, 75}, {76, 77}, {78, 79}, {80, 81}, {82, 83}, {84, 85}, {86, 87}, {88, 89}, {90, 91}, {92, 93}, {94, 95} }\n",
" , { {96, 97}, {98, 99}, {100, 101}, {102, 103}, {104, 105}, {106, 107}, {108, 109}, {110, 111}, {112, 113}, {114, 115}, {116, 117}, {118, 119}, {120, 121}, {122, 123}, {124, 125}, {126, 127}, {128, 129}, {130, 131}, {132, 133}, {134, 135}, {136, 137}, {138, 139}, {140, 141}, {142, 143} }\n",
" , { {144, 145}, {146, 147}, {148, 149}, {150, 151}, {152, 153}, {154, 155}, {156, 157}, {158, 159}, {160, 161}, {162, 163}, {164, 165}, {166, 167}, {168, 169}, {170, 171}, {172, 173}, {174, 175}, {176, 177}, {178, 179}, {180, 181}, {182, 183}, {184, 185}, {186, 187}, {188, 189}, {190, 191} }\n",
" , { {192, 193}, {194, 195}, {196, 197}, {198, 199}, {200, 201}, {202, 203}, {204, 205}, {206, 207}, {208, 209}, {210, 211}, {212, 213}, {214, 215}, {216, 217}, {218, 219}, {220, 221}, {222, 223}, {224, 225}, {226, 227}, {228, 229}, {230, 231}, {232, 233}, {234, 235}, {236, 237}, {238, 239} }\n",
" , { {240, 241}, {242, 243}, {244, 245}, {246, 247}, {248, 249}, {250, 251}, {252, 253}, {254, 255}, {256, 257}, {258, 259}, {260, 261}, {262, 263}, {264, 265}, {266, 267}, {268, 269}, {270, 271}, {272, 273}, {274, 275}, {276, 277}, {278, 279}, {280, 281}, {282, 283}, {284, 285}, {286, 287} }\n",
" , { {288, 289}, {290, 291}, {292, 293}, {294, 295}, {296, 297}, {298, 299}, {300, 301}, {302, 303}, {304, 305}, {306, 307}, {308, 309}, {310, 311}, {312, 313}, {314, 315}, {316, 317}, {318, 319}, {320, 321}, {322, 323}, {324, 325}, {326, 327}, {328, 329}, {330, 331}, {332, 333}, {334, 335} }\n",
" , { {336, 337}, {338, 339}, {340, 341}, {342, 343}, {344, 345}, {346, 347}, {348, 349}, {350, 351}, {352, 353}, {354, 355}, {356, 357}, {358, 359}, {360, 361}, {362, 363}, {364, 365}, {366, 367}, {368, 369}, {370, 371}, {372, 373}, {374, 375}, {376, 377}, {378, 379}, {380, 381}, {382, 383} }\n",
" , { {384, 385}, {386, 387}, {388, 389}, {390, 391}, {392, 393}, {394, 395}, {396, 397}, {398, 399}, {400, 401}, {402, 403}, {404, 405}, {406, 407}, {408, 409}, {410, 411}, {412, 413}, {414, 415}, {416, 417}, {418, 419}, {420, 421}, {422, 423}, {424, 425}, {426, 427}, {428, 429}, {430, 431} }\n",
" , { {432, 433}, {434, 435}, {436, 437}, {438, 439}, {440, 441}, {442, 443}, {444, 445}, {446, 447}, {448, 449}, {450, 451}, {452, 453}, {454, 455}, {456, 457}, {458, 459}, {460, 461}, {462, 463}, {464, 465}, {466, 467}, {468, 469}, {470, 471}, {472, 473}, {474, 475}, {476, 477}, {478, 479} }\n",
" , { {480, 481}, {482, 483}, {484, 485}, {486, 487}, {488, 489}, {490, 491}, {492, 493}, {494, 495}, {496, 497}, {498, 499}, {500, 501}, {502, 503}, {504, 505}, {506, 507}, {508, 509}, {510, 511}, {512, 513}, {514, 515}, {516, 517}, {518, 519}, {520, 521}, {522, 523}, {524, 525}, {526, 527} }\n",
" , { {528, 529}, {530, 531}, {532, 533}, {534, 535}, {536, 537}, {538, 539}, {540, 541}, {542, 543}, {544, 545}, {546, 547}, {548, 549}, {550, 551}, {552, 553}, {554, 555}, {556, 557}, {558, 559}, {560, 561}, {562, 563}, {564, 565}, {566, 567}, {568, 569}, {570, 571}, {572, 573}, {574, 575} }\n",
" , { {576, 577}, {578, 579}, {580, 581}, {582, 583}, {584, 585}, {586, 587}, {588, 589}, {590, 591}, {592, 593}, {594, 595}, {596, 597}, {598, 599}, {600, 601}, {602, 603}, {604, 605}, {606, 607}, {608, 609}, {610, 611}, {612, 613}, {614, 615}, {616, 617}, {618, 619}, {620, 621}, {622, 623} }\n",
" , { {624, 625}, {626, 627}, {628, 629}, {630, 631}, {632, 633}, {634, 635}, {636, 637}, {638, 639}, {640, 641}, {642, 643}, {644, 645}, {646, 647}, {648, 649}, {650, 651}, {652, 653}, {654, 655}, {656, 657}, {658, 659}, {660, 661}, {662, 663}, {664, 665}, {666, 667}, {668, 669}, {670, 671} }\n",
" , { {672, 673}, {674, 675}, {676, 677}, {678, 679}, {680, 681}, {682, 683}, {684, 685}, {686, 687}, {688, 689}, {690, 691}, {692, 693}, {694, 695}, {696, 697}, {698, 699}, {700, 701}, {702, 703}, {704, 705}, {706, 707}, {708, 709}, {710, 711}, {712, 713}, {714, 715}, {716, 717}, {718, 719} }\n",
" , { {720, 721}, {722, 723}, {724, 725}, {726, 727}, {728, 729}, {730, 731}, {732, 733}, {734, 735}, {736, 737}, {738, 739}, {740, 741}, {742, 743}, {744, 745}, {746, 747}, {748, 749}, {750, 751}, {752, 753}, {754, 755}, {756, 757}, {758, 759}, {760, 761}, {762, 763}, {764, 765}, {766, 767} }\n",
" , { {768, 769}, {770, 771}, {772, 773}, {774, 775}, {776, 777}, {778, 779}, {780, 781}, {782, 783}, {784, 785}, {786, 787}, {788, 789}, {790, 791}, {792, 793}, {794, 795}, {796, 797}, {798, 799}, {800, 801}, {802, 803}, {804, 805}, {806, 807}, {808, 809}, {810, 811}, {812, 813}, {814, 815} }\n",
" , { {816, 817}, {818, 819}, {820, 821}, {822, 823}, {824, 825}, {826, 827}, {828, 829}, {830, 831}, {832, 833}, {834, 835}, {836, 837}, {838, 839}, {840, 841}, {842, 843}, {844, 845}, {846, 847}, {848, 849}, {850, 851}, {852, 853}, {854, 855}, {856, 857}, {858, 859}, {860, 861}, {862, 863} }\n",
" , { {864, 865}, {866, 867}, {868, 869}, {870, 871}, {872, 873}, {874, 875}, {876, 877}, {878, 879}, {880, 881}, {882, 883}, {884, 885}, {886, 887}, {888, 889}, {890, 891}, {892, 893}, {894, 895}, {896, 897}, {898, 899}, {900, 901}, {902, 903}, {904, 905}, {906, 907}, {908, 909}, {910, 911} }\n",
" , { {912, 913}, {914, 915}, {916, 917}, {918, 919}, {920, 921}, {922, 923}, {924, 925}, {926, 927}, {928, 929}, {930, 931}, {932, 933}, {934, 935}, {936, 937}, {938, 939}, {940, 941}, {942, 943}, {944, 945}, {946, 947}, {948, 949}, {950, 951}, {952, 953}, {954, 955}, {956, 957}, {958, 959} }\n",
" , { {960, 961}, {962, 963}, {964, 965}, {966, 967}, {968, 969}, {970, 971}, {972, 973}, {974, 975}, {976, 977}, {978, 979}, {980, 981}, {982, 983}, {984, 985}, {986, 987}, {988, 989}, {990, 991}, {992, 993}, {994, 995}, {996, 997}, {998, 999}, {1000, 1001}, {1002, 1003}, {1004, 1005}, {1006, 1007} }\n",
" , { {1008, 1009}, {1010, 1011}, {1012, 1013}, {1014, 1015}, {1016, 1017}, {1018, 1019}, {1020, 1021}, {1022, 1023}, {1024, 1025}, {1026, 1027}, {1028, 1029}, {1030, 1031}, {1032, 1033}, {1034, 1035}, {1036, 1037}, {1038, 1039}, {1040, 1041}, {1042, 1043}, {1044, 1045}, {1046, 1047}, {1048, 1049}, {1050, 1051}, {1052, 1053}, {1054, 1055} }\n",
" , { {1056, 1057}, {1058, 1059}, {1060, 1061}, {1062, 1063}, {1064, 1065}, {1066, 1067}, {1068, 1069}, {1070, 1071}, {1072, 1073}, {1074, 1075}, {1076, 1077}, {1078, 1079}, {1080, 1081}, {1082, 1083}, {1084, 1085}, {1086, 1087}, {1088, 1089}, {1090, 1091}, {1092, 1093}, {1094, 1095}, {1096, 1097}, {1098, 1099}, {1100, 1101}, {1102, 1103} }\n",
" , { {1104, 1105}, {1106, 1107}, {1108, 1109}, {1110, 1111}, {1112, 1113}, {1114, 1115}, {1116, 1117}, {1118, 1119}, {1120, 1121}, {1122, 1123}, {1124, 1125}, {1126, 1127}, {1128, 1129}, {1130, 1131}, {1132, 1133}, {1134, 1135}, {1136, 1137}, {1138, 1139}, {1140, 1141}, {1142, 1143}, {1144, 1145}, {1146, 1147}, {1148, 1149}, {1150, 1151} }\n",
"}\n"
2019-11-11 17:37:44 +00:00
]
}
],
"source": [
2019-11-13 15:08:33 +00:00
"print(\"{\")\n",
"for r in lookup_edge_c0_c1_to_number:\n",
" print(\" , {\", \", \".join((\"{%d, %d}\" % (c[0], c[1]) for c in r)), \"}\")\n",
"print(\"}\") "
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,\n",
" 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,\n",
" 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,\n",
" 135, 136, 137, 138, 139, 140, 141, 142, 143])"
]
},
"execution_count": 68,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"I0_indices = lookup_edge_c0_c1_to_number[2, :, :].reshape(2*24)\n",
"I0_indices"
2019-11-11 17:37:44 +00:00
]
2019-11-13 15:08:33 +00:00
},
{
"cell_type": "code",
"execution_count": 69,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"array([ 4, 5, 52, 53, 100, 101, 148, 149, 196, 197, 244,\n",
" 245, 292, 293, 340, 341, 388, 389, 436, 437, 484, 485,\n",
" 532, 533, 580, 581, 628, 629, 676, 677, 724, 725, 772,\n",
" 773, 820, 821, 868, 869, 916, 917, 964, 965, 1012, 1013,\n",
" 1060, 1061, 1108, 1109])"
]
},
"execution_count": 69,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"I1_indices = lookup_edge_c0_c1_to_number[:, 2, :].reshape(2*24)\n",
"I1_indices"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
2019-11-11 13:36:11 +00:00
}
],
"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.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}