# Installations

```python
!pip3 install gurobipy
!pip3 install qiskit[visualization]
!pip3 install olsq
!pip3 install anytree

!pip3 install pytket
!pip3 install pytket-qiskit
```

    Collecting gurobipy
      Downloading gurobipy-9.1.2-cp37-cp37m-manylinux1_x86_64.whl (11.1 MB)
         |████████████████████████████████| 11.1 MB 12.7 MB/s
    Installing collected packages: gurobipy
    Successfully installed gurobipy-9.1.2
    Collecting qiskit[visualization]
      Downloading qiskit-0.29.0.tar.gz (12 kB)
    Collecting qiskit-terra==0.18.1
      Downloading qiskit_terra-0.18.1-cp37-cp37m-manylinux2010_x86_64.whl (6.1 MB)
         |████████████████████████████████| 6.1 MB 10.4 MB/s
    Collecting qiskit-aer==0.8.2
      Downloading qiskit_aer-0.8.2-cp37-cp37m-manylinux2010_x86_64.whl (18.0 MB)
         |████████████████████████████████| 18.0 MB 90 kB/s
    Collecting qiskit-ibmq-provider==0.16.0
      Downloading qiskit_ibmq_provider-0.16.0-py3-none-any.whl (235 kB)
         |████████████████████████████████| 235 kB 49.6 MB/s
    Collecting qiskit-ignis==0.6.0
      Downloading qiskit_ignis-0.6.0-py3-none-any.whl (207 kB)
         |████████████████████████████████| 207 kB 57.5 MB/s
    Collecting qiskit-aqua==0.9.4
      Downloading qiskit_aqua-0.9.4-py3-none-any.whl (2.1 MB)
         |████████████████████████████████| 2.1 MB 51.0 MB/s
    Requirement already satisfied: matplotlib>=2.1 in /usr/local/lib/python3.7/dist-packages (from qiskit[visualization]) (3.2.2)
    Requirement already satisfied: ipywidgets>=7.3.0 in /usr/local/lib/python3.7/dist-packages (from qiskit[visualization]) (7.6.3)
    Requirement already satisfied: pydot in /usr/local/lib/python3.7/dist-packages (from qiskit[visualization]) (1.3.0)
    Requirement already satisfied: pillow>=4.2.1 in /usr/local/lib/python3.7/dist-packages (from qiskit[visualization]) (7.1.2)
    Collecting pylatexenc>=1.4
      Downloading pylatexenc-2.10.tar.gz (162 kB)
         |████████████████████████████████| 162 kB 55.8 MB/s
    Requirement already satisfied: seaborn>=0.9.0 in /usr/local/lib/python3.7/dist-packages (from qiskit[visualization]) (0.11.1)
    Requirement already satisfied: pygments>=2.4 in /usr/local/lib/python3.7/dist-packages (from qiskit[visualization]) (2.6.1)
    Collecting pybind11>=2.6
      Downloading pybind11-2.7.1-py2.py3-none-any.whl (200 kB)
         |████████████████████████████████| 200 kB 43.0 MB/s
    Requirement already satisfied: scipy>=1.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-aer==0.8.2->qiskit[visualization]) (1.4.1)
    Requirement already satisfied: numpy>=1.16.3 in /usr/local/lib/python3.7/dist-packages (from qiskit-aer==0.8.2->qiskit[visualization]) (1.19.5)
    Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit[visualization]) (1.1.5)
    Requirement already satisfied: scikit-learn>=0.20.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit[visualization]) (0.22.2.post1)
    Collecting yfinance<0.1.63
      Downloading yfinance-0.1.62.tar.gz (26 kB)
    Collecting dlx<=1.0.4
      Downloading dlx-1.0.4.tar.gz (5.5 kB)
    Collecting docplex>=2.21.207
      Downloading docplex-2.21.207.tar.gz (635 kB)
         |████████████████████████████████| 635 kB 50.7 MB/s
    Collecting retworkx>=0.8.0
      Downloading retworkx-0.10.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.4 MB)
         |████████████████████████████████| 1.4 MB 48.1 MB/s
    Requirement already satisfied: h5py<3.3.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit[visualization]) (3.1.0)
    Requirement already satisfied: psutil>=5 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit[visualization]) (5.4.8)
    Requirement already satisfied: fastdtw<=0.3.4 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit[visualization]) (0.3.4)
    Requirement already satisfied: setuptools>=40.1.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit[visualization]) (57.4.0)
    Collecting quandl
      Downloading Quandl-3.6.1-py2.py3-none-any.whl (26 kB)
    Requirement already satisfied: sympy>=1.3 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit[visualization]) (1.7.1)
    Requirement already satisfied: urllib3>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from qiskit-ibmq-provider==0.16.0->qiskit[visualization]) (1.24.3)
    Collecting requests-ntlm>=1.1.0
      Downloading requests_ntlm-1.1.0-py2.py3-none-any.whl (5.7 kB)
    Requirement already satisfied: requests>=2.19 in /usr/local/lib/python3.7/dist-packages (from qiskit-ibmq-provider==0.16.0->qiskit[visualization]) (2.23.0)
    Requirement already satisfied: python-dateutil>=2.8.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-ibmq-provider==0.16.0->qiskit[visualization]) (2.8.2)
    Collecting websocket-client>=1.0.1
      Downloading websocket_client-1.2.1-py2.py3-none-any.whl (52 kB)
         |████████████████████████████████| 52 kB 1.2 MB/s
    Requirement already satisfied: jsonschema>=2.6 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.1->qiskit[visualization]) (2.6.0)
    Collecting tweedledum<2.0,>=1.1
      Downloading tweedledum-1.1.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (943 kB)
         |████████████████████████████████| 943 kB 39.4 MB/s
    Collecting fastjsonschema>=2.10
      Downloading fastjsonschema-2.15.1-py3-none-any.whl (21 kB)
    Collecting python-constraint>=1.4
      Downloading python-constraint-1.4.0.tar.bz2 (18 kB)
    Collecting symengine>0.7
      Downloading symengine-0.7.2-cp37-cp37m-manylinux2010_x86_64.whl (33.9 MB)
         |████████████████████████████████| 33.9 MB 19 kB/s
    Requirement already satisfied: dill>=0.3 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.1->qiskit[visualization]) (0.3.4)
    Collecting ply>=3.10
      Downloading ply-3.11-py2.py3-none-any.whl (49 kB)
         |████████████████████████████████| 49 kB 4.1 MB/s
    Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from docplex>=2.21.207->qiskit-aqua==0.9.4->qiskit[visualization]) (1.15.0)
    Requirement already satisfied: cached-property in /usr/local/lib/python3.7/dist-packages (from h5py<3.3.0->qiskit-aqua==0.9.4->qiskit[visualization]) (1.5.2)
    Requirement already satisfied: widgetsnbextension~=3.5.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.3.0->qiskit[visualization]) (3.5.1)
    Requirement already satisfied: ipykernel>=4.5.1 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.3.0->qiskit[visualization]) (4.10.1)
    Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.3.0->qiskit[visualization]) (1.0.0)
    Requirement already satisfied: ipython>=4.0.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.3.0->qiskit[visualization]) (5.5.0)
    Requirement already satisfied: traitlets>=4.3.1 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.3.0->qiskit[visualization]) (5.0.5)
    Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.3.0->qiskit[visualization]) (5.1.3)
    Requirement already satisfied: jupyter-client in /usr/local/lib/python3.7/dist-packages (from ipykernel>=4.5.1->ipywidgets>=7.3.0->qiskit[visualization]) (5.3.5)
    Requirement already satisfied: tornado>=4.0 in /usr/local/lib/python3.7/dist-packages (from ipykernel>=4.5.1->ipywidgets>=7.3.0->qiskit[visualization]) (5.1.1)
    Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0->ipywidgets>=7.3.0->qiskit[visualization]) (1.0.18)
    Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.8.1)
    Requirement already satisfied: pexpect in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0->ipywidgets>=7.3.0->qiskit[visualization]) (4.8.0)
    Requirement already satisfied: decorator in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0->ipywidgets>=7.3.0->qiskit[visualization]) (4.4.2)
    Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.7.5)
    Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=2.1->qiskit[visualization]) (1.3.1)
    Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=2.1->qiskit[visualization]) (0.10.0)
    Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=2.1->qiskit[visualization]) (2.4.7)
    Requirement already satisfied: jupyter-core in /usr/local/lib/python3.7/dist-packages (from nbformat>=4.2.0->ipywidgets>=7.3.0->qiskit[visualization]) (4.7.1)
    Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.7/dist-packages (from nbformat>=4.2.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.2.0)
    Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=4.0.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.2.5)
    Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19->qiskit-ibmq-provider==0.16.0->qiskit[visualization]) (2.10)
    Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19->qiskit-ibmq-provider==0.16.0->qiskit[visualization]) (2021.5.30)
    Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19->qiskit-ibmq-provider==0.16.0->qiskit[visualization]) (3.0.4)
    Collecting cryptography>=1.3
      Downloading cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl (3.0 MB)
         |████████████████████████████████| 3.0 MB 43.6 MB/s
    Collecting ntlm-auth>=1.0.2
      Downloading ntlm_auth-1.5.0-py2.py3-none-any.whl (29 kB)
    Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packages (from cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.16.0->qiskit[visualization]) (1.14.6)
    Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.12->cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.16.0->qiskit[visualization]) (2.20)
    Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.20.0->qiskit-aqua==0.9.4->qiskit[visualization]) (1.0.1)
    Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->qiskit-aqua==0.9.4->qiskit[visualization]) (2018.9)
    Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.7/dist-packages (from sympy>=1.3->qiskit-aqua==0.9.4->qiskit[visualization]) (1.2.1)
    Requirement already satisfied: notebook>=4.4.1 in /usr/local/lib/python3.7/dist-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (5.3.1)
    Requirement already satisfied: terminado>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.11.0)
    Requirement already satisfied: Send2Trash in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (1.8.0)
    Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (2.11.3)
    Requirement already satisfied: nbconvert in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (5.6.1)
    Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.7/dist-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets>=7.3.0->qiskit[visualization]) (22.2.1)
    Requirement already satisfied: ptyprocess in /usr/local/lib/python3.7/dist-packages (from terminado>=0.8.1->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.7.0)
    Requirement already satisfied: multitasking>=0.0.7 in /usr/local/lib/python3.7/dist-packages (from yfinance<0.1.63->qiskit-aqua==0.9.4->qiskit[visualization]) (0.0.9)
    Collecting lxml>=4.5.1
      Downloading lxml-4.6.3-cp37-cp37m-manylinux2014_x86_64.whl (6.3 MB)
         |████████████████████████████████| 6.3 MB 45.6 MB/s
    Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (2.0.1)
    Requirement already satisfied: defusedxml in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.7.1)
    Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.8.4)
    Requirement already satisfied: testpath in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.5.0)
    Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.3)
    Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (1.4.3)
    Requirement already satisfied: bleach in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (4.0.0)
    Requirement already satisfied: webencodings in /usr/local/lib/python3.7/dist-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (0.5.1)
    Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.3.0->qiskit[visualization]) (21.0)
    Requirement already satisfied: more-itertools in /usr/local/lib/python3.7/dist-packages (from quandl->qiskit-aqua==0.9.4->qiskit[visualization]) (8.8.0)
    Collecting inflection>=0.3.1
      Downloading inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
    Building wheels for collected packages: qiskit, dlx, docplex, pylatexenc, python-constraint, yfinance
      Building wheel for qiskit (setup.py) ... done
      Created wheel for qiskit: filename=qiskit-0.29.0-py3-none-any.whl size=11179 sha256=f853727baba57f529be3a8d0a45469d00ce74953a067412b041aac2d367bb22b
      Stored in directory: /root/.cache/pip/wheels/4b/d3/1f/f1bc9f8c3b170b19b9471e55fda4819e53476c21e5618ee86c
      Building wheel for dlx (setup.py) ... done
      Created wheel for dlx: filename=dlx-1.0.4-py3-none-any.whl size=5719 sha256=4423caf1af9f3f543c0a983563a2ab1d4ebd970e2ab12946d882a1fa12ad3f9d
      Stored in directory: /root/.cache/pip/wheels/78/55/c8/dc61e772445a566b7608a476d151e9dcaf4e092b01b0c4bc3c
      Building wheel for docplex (setup.py) ... done
      Created wheel for docplex: filename=docplex-2.21.207-py3-none-any.whl size=700544 sha256=42557f21917c2bb898161af86cc3aa9e1ed49c390ddb22886bfac02d25803f30
      Stored in directory: /root/.cache/pip/wheels/d8/4e/62/e43a45757e70549e6aa4712ccfcf67440a203c278ecb68de49
      Building wheel for pylatexenc (setup.py) ... done
      Created wheel for pylatexenc: filename=pylatexenc-2.10-py3-none-any.whl size=136833 sha256=4009057a4c16c21d6a3516f9378aa6cde4f0f492d7525f63da2bbff3093ff55e
      Stored in directory: /root/.cache/pip/wheels/f1/8a/f5/33ee79d4473eb201b519fa40f989b842e373237395a3421f52
      Building wheel for python-constraint (setup.py) ... done
      Created wheel for python-constraint: filename=python_constraint-1.4.0-py2.py3-none-any.whl size=24081 sha256=a776f7223caf699b123b120172a41e9d8cc846b06909ff78c51caeeee2ba268d
      Stored in directory: /root/.cache/pip/wheels/07/27/db/1222c80eb1e431f3d2199c12569cb1cac60f562a451fe30479
      Building wheel for yfinance (setup.py) ... done
      Created wheel for yfinance: filename=yfinance-0.1.62-py2.py3-none-any.whl size=23867 sha256=8f6dd286eb3837fcafa396870bdf3bb1beb4ef466a1a136e86af1fd00ce64253
      Stored in directory: /root/.cache/pip/wheels/4c/3a/2e/53936bb0b112189d5532492b32dd8f3e442cba9d832ceef3b6
    Successfully built qiskit dlx docplex pylatexenc python-constraint yfinance
    Installing collected packages: tweedledum, symengine, retworkx, python-constraint, ply, fastjsonschema, qiskit-terra, ntlm-auth, lxml, inflection, cryptography, yfinance, websocket-client, requests-ntlm, quandl, qiskit-ignis, pybind11, docplex, dlx, qiskit-ibmq-provider, qiskit-aqua, qiskit-aer, qiskit, pylatexenc
      Attempting uninstall: lxml
        Found existing installation: lxml 4.2.6
        Uninstalling lxml-4.2.6:
          Successfully uninstalled lxml-4.2.6
    Successfully installed cryptography-3.4.8 dlx-1.0.4 docplex-2.21.207 fastjsonschema-2.15.1 inflection-0.5.1 lxml-4.6.3 ntlm-auth-1.5.0 ply-3.11 pybind11-2.7.1 pylatexenc-2.10 python-constraint-1.4.0 qiskit-0.29.0 qiskit-aer-0.8.2 qiskit-aqua-0.9.4 qiskit-ibmq-provider-0.16.0 qiskit-ignis-0.6.0 qiskit-terra-0.18.1 quandl-3.6.1 requests-ntlm-1.1.0 retworkx-0.10.1 symengine-0.7.2 tweedledum-1.1.0 websocket-client-1.2.1 yfinance-0.1.62
    Collecting olsq
      Downloading olsq-0.0.4-py3-none-any.whl (36 kB)
    Requirement already satisfied: networkx>=2.5 in /usr/local/lib/python3.7/dist-packages (from olsq) (2.6.2)
    Collecting z3-solver>=4.8.9.0
      Downloading z3_solver-4.8.12.0-py2.py3-none-manylinux1_x86_64.whl (33.0 MB)
         |████████████████████████████████| 33.0 MB 17 kB/s
    Installing collected packages: z3-solver, olsq
    Successfully installed olsq-0.0.4 z3-solver-4.8.12.0
    Collecting anytree
      Downloading anytree-2.8.0-py2.py3-none-any.whl (41 kB)
         |████████████████████████████████| 41 kB 427 kB/s
    Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.7/dist-packages (from anytree) (1.15.0)
    Installing collected packages: anytree
    Successfully installed anytree-2.8.0
    Collecting pytket
      Downloading pytket-0.13.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB)
         |████████████████████████████████| 5.8 MB 12.5 MB/s
    Collecting numpy~=1.20
      Downloading numpy-1.21.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
         |████████████████████████████████| 15.7 MB 184 kB/s
    Collecting types-Jinja2
      Downloading types_Jinja2-2.11.6-py3-none-any.whl (18 kB)
    Requirement already satisfied: scipy~=1.2 in /usr/local/lib/python3.7/dist-packages (from pytket) (1.4.1)
    Collecting lark-parser~=0.7
      Downloading lark_parser-0.12.0-py2.py3-none-any.whl (103 kB)
         |████████████████████████████████| 103 kB 44.3 MB/s
    Requirement already satisfied: sympy~=1.6 in /usr/local/lib/python3.7/dist-packages (from pytket) (1.7.1)
    Requirement already satisfied: jinja2~=2.11 in /usr/local/lib/python3.7/dist-packages (from pytket) (2.11.3)
    Collecting types-pkg-resources
      Downloading types_pkg_resources-0.1.3-py2.py3-none-any.whl (4.8 kB)
    Collecting graphviz~=0.14
      Downloading graphviz-0.17-py3-none-any.whl (18 kB)
    Requirement already satisfied: networkx~=2.4 in /usr/local/lib/python3.7/dist-packages (from pytket) (2.6.2)
    Requirement already satisfied: typing-extensions~=3.7 in /usr/local/lib/python3.7/dist-packages (from pytket) (3.7.4.3)
    Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2~=2.11->pytket) (2.0.1)
    Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.7/dist-packages (from sympy~=1.6->pytket) (1.2.1)
    Collecting types-MarkupSafe
      Downloading types_MarkupSafe-1.1.6-py3-none-any.whl (4.0 kB)
    Installing collected packages: types-MarkupSafe, numpy, types-pkg-resources, types-Jinja2, lark-parser, graphviz, pytket
      Attempting uninstall: numpy
        Found existing installation: numpy 1.19.5
        Uninstalling numpy-1.19.5:
          Successfully uninstalled numpy-1.19.5
      Attempting uninstall: graphviz
        Found existing installation: graphviz 0.10.1
        Uninstalling graphviz-0.10.1:
          Successfully uninstalled graphviz-0.10.1
    ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
    tensorflow 2.6.0 requires numpy~=1.19.2, but you have numpy 1.21.2 which is incompatible.
    datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.
    albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible.
    Successfully installed graphviz-0.17 lark-parser-0.12.0 numpy-1.21.2 pytket-0.13.0 types-Jinja2-2.11.6 types-MarkupSafe-1.1.6 types-pkg-resources-0.1.3

    Collecting pytket-qiskit
      Downloading pytket-qiskit-0.16.1.tar.gz (27 kB)
    Requirement already satisfied: pytket~=0.13.0 in /usr/local/lib/python3.7/dist-packages (from pytket-qiskit) (0.13.0)
    Collecting qiskit~=0.28.0
      Downloading qiskit-0.28.0.tar.gz (12 kB)
    Requirement already satisfied: graphviz~=0.14 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (0.17)
    Requirement already satisfied: scipy~=1.2 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (1.4.1)
    Requirement already satisfied: networkx~=2.4 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (2.6.2)
    Requirement already satisfied: typing-extensions~=3.7 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (3.7.4.3)
    Requirement already satisfied: sympy~=1.6 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (1.7.1)
    Requirement already satisfied: lark-parser~=0.7 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (0.12.0)
    Requirement already satisfied: jinja2~=2.11 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (2.11.3)
    Requirement already satisfied: types-pkg-resources in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (0.1.3)
    Requirement already satisfied: types-Jinja2 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (2.11.6)
    Requirement already satisfied: numpy~=1.20 in /usr/local/lib/python3.7/dist-packages (from pytket~=0.13.0->pytket-qiskit) (1.21.2)
    Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2~=2.11->pytket~=0.13.0->pytket-qiskit) (2.0.1)
    Collecting qiskit-terra==0.18.0
      Downloading qiskit_terra-0.18.0-cp37-cp37m-manylinux2010_x86_64.whl (6.1 MB)
         |████████████████████████████████| 6.1 MB 26.6 MB/s
    Requirement already satisfied: qiskit-aer==0.8.2 in /usr/local/lib/python3.7/dist-packages (from qiskit~=0.28.0->pytket-qiskit) (0.8.2)
    Collecting qiskit-ibmq-provider==0.15.0
      Downloading qiskit_ibmq_provider-0.15.0-py3-none-any.whl (234 kB)
         |████████████████████████████████| 234 kB 54.9 MB/s
    Requirement already satisfied: qiskit-ignis==0.6.0 in /usr/local/lib/python3.7/dist-packages (from qiskit~=0.28.0->pytket-qiskit) (0.6.0)
    Requirement already satisfied: qiskit-aqua==0.9.4 in /usr/local/lib/python3.7/dist-packages (from qiskit~=0.28.0->pytket-qiskit) (0.9.4)
    Requirement already satisfied: pybind11>=2.6 in /usr/local/lib/python3.7/dist-packages (from qiskit-aer==0.8.2->qiskit~=0.28.0->pytket-qiskit) (2.7.1)
    Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (1.1.5)
    Requirement already satisfied: scikit-learn>=0.20.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (0.22.2.post1)
    Requirement already satisfied: psutil>=5 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (5.4.8)
    Requirement already satisfied: dlx<=1.0.4 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (1.0.4)
    Requirement already satisfied: retworkx>=0.8.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (0.10.1)
    Requirement already satisfied: setuptools>=40.1.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (57.4.0)
    Requirement already satisfied: yfinance<0.1.63 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (0.1.62)
    Requirement already satisfied: docplex>=2.21.207 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (2.21.207)
    Requirement already satisfied: h5py<3.3.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (3.1.0)
    Requirement already satisfied: quandl in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (3.6.1)
    Requirement already satisfied: fastdtw<=0.3.4 in /usr/local/lib/python3.7/dist-packages (from qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (0.3.4)
    Requirement already satisfied: requests>=2.19 in /usr/local/lib/python3.7/dist-packages (from qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (2.23.0)
    Requirement already satisfied: python-dateutil>=2.8.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (2.8.2)
    Requirement already satisfied: websocket-client>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (1.2.1)
    Requirement already satisfied: requests-ntlm>=1.1.0 in /usr/local/lib/python3.7/dist-packages (from qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (1.1.0)
    Requirement already satisfied: urllib3>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (1.24.3)
    Requirement already satisfied: python-constraint>=1.4 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.0->qiskit~=0.28.0->pytket-qiskit) (1.4.0)
    Requirement already satisfied: ply>=3.10 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.0->qiskit~=0.28.0->pytket-qiskit) (3.11)
    Requirement already satisfied: jsonschema>=2.6 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.0->qiskit~=0.28.0->pytket-qiskit) (2.6.0)
    Requirement already satisfied: dill>=0.3 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.0->qiskit~=0.28.0->pytket-qiskit) (0.3.4)
    Requirement already satisfied: tweedledum<2.0,>=1.1 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.0->qiskit~=0.28.0->pytket-qiskit) (1.1.0)
    Requirement already satisfied: symengine>0.7 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.0->qiskit~=0.28.0->pytket-qiskit) (0.7.2)
    Requirement already satisfied: fastjsonschema>=2.10 in /usr/local/lib/python3.7/dist-packages (from qiskit-terra==0.18.0->qiskit~=0.28.0->pytket-qiskit) (2.15.1)
    Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from docplex>=2.21.207->qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (1.15.0)
    Requirement already satisfied: cached-property in /usr/local/lib/python3.7/dist-packages (from h5py<3.3.0->qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (1.5.2)
    Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19->qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (3.0.4)
    Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19->qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (2021.5.30)
    Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19->qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (2.10)
    Requirement already satisfied: ntlm-auth>=1.0.2 in /usr/local/lib/python3.7/dist-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (1.5.0)
    Requirement already satisfied: cryptography>=1.3 in /usr/local/lib/python3.7/dist-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (3.4.8)
    Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packages (from cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (1.14.6)
    Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.12->cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.15.0->qiskit~=0.28.0->pytket-qiskit) (2.20)
    Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.20.0->qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (1.0.1)
    Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.7/dist-packages (from sympy~=1.6->pytket~=0.13.0->pytket-qiskit) (1.2.1)
    Requirement already satisfied: multitasking>=0.0.7 in /usr/local/lib/python3.7/dist-packages (from yfinance<0.1.63->qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (0.0.9)
    Requirement already satisfied: lxml>=4.5.1 in /usr/local/lib/python3.7/dist-packages (from yfinance<0.1.63->qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (4.6.3)
    Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (2018.9)
    Requirement already satisfied: more-itertools in /usr/local/lib/python3.7/dist-packages (from quandl->qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (8.8.0)
    Requirement already satisfied: inflection>=0.3.1 in /usr/local/lib/python3.7/dist-packages (from quandl->qiskit-aqua==0.9.4->qiskit~=0.28.0->pytket-qiskit) (0.5.1)
    Requirement already satisfied: types-MarkupSafe in /usr/local/lib/python3.7/dist-packages (from types-Jinja2->pytket~=0.13.0->pytket-qiskit) (1.1.6)
    Building wheels for collected packages: pytket-qiskit, qiskit
      Building wheel for pytket-qiskit (setup.py) ... done
      Created wheel for pytket-qiskit: filename=pytket_qiskit-0.16.1-py3-none-any.whl size=36308 sha256=d9a0e5cc9b5c4679f2f22f3121083bd1c8534b9d608d882b435fe4b25c3c293e
      Stored in directory: /root/.cache/pip/wheels/ac/b0/ac/777e9de1a16577c6a42352291804dbc58171c78e98d87c8c44
      Building wheel for qiskit (setup.py) ... done
      Created wheel for qiskit: filename=qiskit-0.28.0-py3-none-any.whl size=11091 sha256=0015888680d63447a0680c3a5164dda4047e03d6d01a522a8fb0e9d2655f7677
      Stored in directory: /root/.cache/pip/wheels/aa/7f/f7/f684068656b60591be96f758a6e80454a5ea5af86152598539
    Successfully built pytket-qiskit qiskit
    Installing collected packages: qiskit-terra, qiskit-ibmq-provider, qiskit, pytket-qiskit
      Attempting uninstall: qiskit-terra
        Found existing installation: qiskit-terra 0.18.1
        Uninstalling qiskit-terra-0.18.1:
          Successfully uninstalled qiskit-terra-0.18.1
      Attempting uninstall: qiskit-ibmq-provider
        Found existing installation: qiskit-ibmq-provider 0.16.0
        Uninstalling qiskit-ibmq-provider-0.16.0:
          Successfully uninstalled qiskit-ibmq-provider-0.16.0
      Attempting uninstall: qiskit
        Found existing installation: qiskit 0.29.0
        Uninstalling qiskit-0.29.0:
          Successfully uninstalled qiskit-0.29.0
    Successfully installed pytket-qiskit-0.16.1 qiskit-0.28.0 qiskit-ibmq-provider-0.15.0 qiskit-terra-0.18.0

```python
!git clone https://github.com/weiT1993/qiskit_helper_functions
!cd qiskit_helper_functions && git checkout e046beac78563e9d75abcfde629565d149085983
!cp -r qiskit_helper_functions/* ./ && python3 setup.py install
```

    Cloning into 'qiskit_helper_functions'...
    remote: Enumerating objects: 391, done.
    remote: Counting objects: 100% (391/391), done.
    remote: Compressing objects: 100% (259/259), done.
    remote: Total 391 (delta 239), reused 269 (delta 117), pack-reused 0
    Receiving objects: 100% (391/391), 72.47 KiB | 6.59 MiB/s, done.
    Resolving deltas: 100% (239/239), done.
    Note: checking out 'e046beac78563e9d75abcfde629565d149085983'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

      git checkout -b <new-branch-name>

    HEAD is now at e046bea removed aqua
    running install
    running bdist_egg
    running egg_info
    creating qiskit_helper_functions.egg-info
    writing qiskit_helper_functions.egg-info/PKG-INFO
    writing dependency_links to qiskit_helper_functions.egg-info/dependency_links.txt
    writing top-level names to qiskit_helper_functions.egg-info/top_level.txt
    writing manifest file 'qiskit_helper_functions.egg-info/SOURCES.txt'
    reading manifest file 'qiskit_helper_functions.egg-info/SOURCES.txt'
    adding license file 'LICENSE'
    writing manifest file 'qiskit_helper_functions.egg-info/SOURCES.txt'
    installing library code to build/bdist.linux-x86_64/egg
    running install_lib
    running build_py
    creating build
    creating build/lib
    creating build/lib/qcg
    copying qcg/generators.py -> build/lib/qcg
    copying qcg/__init__.py -> build/lib/qcg
    creating build/lib/qiskit_helper_functions
    copying qiskit_helper_functions/setup.py -> build/lib/qiskit_helper_functions
    copying qiskit_helper_functions/non_ibmq_functions.py -> build/lib/qiskit_helper_functions
    copying qiskit_helper_functions/schedule.py -> build/lib/qiskit_helper_functions
    copying qiskit_helper_functions/metrics.py -> build/lib/qiskit_helper_functions
    copying qiskit_helper_functions/conversions.py -> build/lib/qiskit_helper_functions
    copying qiskit_helper_functions/ibmq_functions.py -> build/lib/qiskit_helper_functions
    copying qiskit_helper_functions/__init__.py -> build/lib/qiskit_helper_functions
    creating build/lib/qcg/Supremacy
    copying qcg/Supremacy/Qgrid_Sycamore.py -> build/lib/qcg/Supremacy
    copying qcg/Supremacy/Qbit_original.py -> build/lib/qcg/Supremacy
    copying qcg/Supremacy/Qgrid_original.py -> build/lib/qcg/Supremacy
    copying qcg/Supremacy/ABCD_layer_generation.py -> build/lib/qcg/Supremacy
    copying qcg/Supremacy/Qbit_Sycamore.py -> build/lib/qcg/Supremacy
    copying qcg/Supremacy/__init__.py -> build/lib/qcg/Supremacy
    copying qcg/Supremacy/cz_layer_generation.py -> build/lib/qcg/Supremacy
    creating build/lib/qcg/Dynamics
    copying qcg/Dynamics/quantum_dynamics.py -> build/lib/qcg/Dynamics
    copying qcg/Dynamics/__init__.py -> build/lib/qcg/Dynamics
    creating build/lib/qcg/utils
    copying qcg/utils/testhwea.py -> build/lib/qcg/utils
    copying qcg/utils/__init__.py -> build/lib/qcg/utils
    creating build/lib/qcg/QAOA
    copying qcg/QAOA/hw_efficient_ansatz.py -> build/lib/qcg/QAOA
    copying qcg/QAOA/__init__.py -> build/lib/qcg/QAOA
    creating build/lib/qcg/BernsteinVazirani
    copying qcg/BernsteinVazirani/bernstein_vazirani.py -> build/lib/qcg/BernsteinVazirani
    copying qcg/BernsteinVazirani/__init__.py -> build/lib/qcg/BernsteinVazirani
    creating build/lib/qcg/QWalk
    copying qcg/QWalk/quantum_walk.py -> build/lib/qcg/QWalk
    copying qcg/QWalk/__init__.py -> build/lib/qcg/QWalk
    creating build/lib/qcg/VQE
    copying qcg/VQE/uccsd_ansatz.py -> build/lib/qcg/VQE
    copying qcg/VQE/__init__.py -> build/lib/qcg/VQE
    creating build/lib/qcg/Arithmetic
    copying qcg/Arithmetic/ripple_carry_adder.py -> build/lib/qcg/Arithmetic
    copying qcg/Arithmetic/__init__.py -> build/lib/qcg/Arithmetic
    creating build/lib/qcg/QFT
    copying qcg/QFT/qft_circ.py -> build/lib/qcg/QFT
    copying qcg/QFT/__init__.py -> build/lib/qcg/QFT
    creating build/lib/qiskit_helper_functions/qcg
    copying qiskit_helper_functions/qcg/generators.py -> build/lib/qiskit_helper_functions/qcg
    copying qiskit_helper_functions/qcg/__init__.py -> build/lib/qiskit_helper_functions/qcg
    creating build/lib/qiskit_helper_functions/qiskit_helper_functions
    copying qiskit_helper_functions/qiskit_helper_functions/non_ibmq_functions.py -> build/lib/qiskit_helper_functions/qiskit_helper_functions
    copying qiskit_helper_functions/qiskit_helper_functions/schedule.py -> build/lib/qiskit_helper_functions/qiskit_helper_functions
    copying qiskit_helper_functions/qiskit_helper_functions/metrics.py -> build/lib/qiskit_helper_functions/qiskit_helper_functions
    copying qiskit_helper_functions/qiskit_helper_functions/conversions.py -> build/lib/qiskit_helper_functions/qiskit_helper_functions
    copying qiskit_helper_functions/qiskit_helper_functions/ibmq_functions.py -> build/lib/qiskit_helper_functions/qiskit_helper_functions
    copying qiskit_helper_functions/qiskit_helper_functions/__init__.py -> build/lib/qiskit_helper_functions/qiskit_helper_functions
    creating build/lib/qiskit_helper_functions/qcg/Supremacy
    copying qiskit_helper_functions/qcg/Supremacy/Qgrid_Sycamore.py -> build/lib/qiskit_helper_functions/qcg/Supremacy
    copying qiskit_helper_functions/qcg/Supremacy/Qbit_original.py -> build/lib/qiskit_helper_functions/qcg/Supremacy
    copying qiskit_helper_functions/qcg/Supremacy/Qgrid_original.py -> build/lib/qiskit_helper_functions/qcg/Supremacy
    copying qiskit_helper_functions/qcg/Supremacy/ABCD_layer_generation.py -> build/lib/qiskit_helper_functions/qcg/Supremacy
    copying qiskit_helper_functions/qcg/Supremacy/Qbit_Sycamore.py -> build/lib/qiskit_helper_functions/qcg/Supremacy
    copying qiskit_helper_functions/qcg/Supremacy/__init__.py -> build/lib/qiskit_helper_functions/qcg/Supremacy
    copying qiskit_helper_functions/qcg/Supremacy/cz_layer_generation.py -> build/lib/qiskit_helper_functions/qcg/Supremacy
    creating build/lib/qiskit_helper_functions/qcg/Dynamics
    copying qiskit_helper_functions/qcg/Dynamics/quantum_dynamics.py -> build/lib/qiskit_helper_functions/qcg/Dynamics
    copying qiskit_helper_functions/qcg/Dynamics/__init__.py -> build/lib/qiskit_helper_functions/qcg/Dynamics
    creating build/lib/qiskit_helper_functions/qcg/utils
    copying qiskit_helper_functions/qcg/utils/testhwea.py -> build/lib/qiskit_helper_functions/qcg/utils
    copying qiskit_helper_functions/qcg/utils/__init__.py -> build/lib/qiskit_helper_functions/qcg/utils
    creating build/lib/qiskit_helper_functions/qcg/QAOA
    copying qiskit_helper_functions/qcg/QAOA/hw_efficient_ansatz.py -> build/lib/qiskit_helper_functions/qcg/QAOA
    copying qiskit_helper_functions/qcg/QAOA/__init__.py -> build/lib/qiskit_helper_functions/qcg/QAOA
    creating build/lib/qiskit_helper_functions/qcg/BernsteinVazirani
    copying qiskit_helper_functions/qcg/BernsteinVazirani/bernstein_vazirani.py -> build/lib/qiskit_helper_functions/qcg/BernsteinVazirani
    copying qiskit_helper_functions/qcg/BernsteinVazirani/__init__.py -> build/lib/qiskit_helper_functions/qcg/BernsteinVazirani
    creating build/lib/qiskit_helper_functions/qcg/QWalk
    copying qiskit_helper_functions/qcg/QWalk/quantum_walk.py -> build/lib/qiskit_helper_functions/qcg/QWalk
    copying qiskit_helper_functions/qcg/QWalk/__init__.py -> build/lib/qiskit_helper_functions/qcg/QWalk
    creating build/lib/qiskit_helper_functions/qcg/VQE
    copying qiskit_helper_functions/qcg/VQE/uccsd_ansatz.py -> build/lib/qiskit_helper_functions/qcg/VQE
    copying qiskit_helper_functions/qcg/VQE/__init__.py -> build/lib/qiskit_helper_functions/qcg/VQE
    creating build/lib/qiskit_helper_functions/qcg/Arithmetic
    copying qiskit_helper_functions/qcg/Arithmetic/ripple_carry_adder.py -> build/lib/qiskit_helper_functions/qcg/Arithmetic
    copying qiskit_helper_functions/qcg/Arithmetic/__init__.py -> build/lib/qiskit_helper_functions/qcg/Arithmetic
    creating build/lib/qiskit_helper_functions/qcg/QFT
    copying qiskit_helper_functions/qcg/QFT/qft_circ.py -> build/lib/qiskit_helper_functions/qcg/QFT
    copying qiskit_helper_functions/qcg/QFT/__init__.py -> build/lib/qiskit_helper_functions/qcg/QFT
    creating build/bdist.linux-x86_64
    creating build/bdist.linux-x86_64/egg
    creating build/bdist.linux-x86_64/egg/qcg
    creating build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/Qgrid_Sycamore.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/Qbit_original.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/Qgrid_original.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/ABCD_layer_generation.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/Qbit_Sycamore.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/__init__.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/cz_layer_generation.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    creating build/bdist.linux-x86_64/egg/qcg/Dynamics
    copying build/lib/qcg/Dynamics/quantum_dynamics.py -> build/bdist.linux-x86_64/egg/qcg/Dynamics
    copying build/lib/qcg/Dynamics/__init__.py -> build/bdist.linux-x86_64/egg/qcg/Dynamics
    copying build/lib/qcg/generators.py -> build/bdist.linux-x86_64/egg/qcg
    creating build/bdist.linux-x86_64/egg/qcg/utils
    copying build/lib/qcg/utils/testhwea.py -> build/bdist.linux-x86_64/egg/qcg/utils
    copying build/lib/qcg/utils/__init__.py -> build/bdist.linux-x86_64/egg/qcg/utils
    creating build/bdist.linux-x86_64/egg/qcg/QAOA
    copying build/lib/qcg/QAOA/hw_efficient_ansatz.py -> build/bdist.linux-x86_64/egg/qcg/QAOA
    copying build/lib/qcg/QAOA/__init__.py -> build/bdist.linux-x86_64/egg/qcg/QAOA
    creating build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani
    copying build/lib/qcg/BernsteinVazirani/bernstein_vazirani.py -> build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani
    copying build/lib/qcg/BernsteinVazirani/__init__.py -> build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani
    creating build/bdist.linux-x86_64/egg/qcg/QWalk
    copying build/lib/qcg/QWalk/quantum_walk.py -> build/bdist.linux-x86_64/egg/qcg/QWalk
    copying build/lib/qcg/QWalk/__init__.py -> build/bdist.linux-x86_64/egg/qcg/QWalk
    creating build/bdist.linux-x86_64/egg/qcg/VQE
    copying build/lib/qcg/VQE/uccsd_ansatz.py -> build/bdist.linux-x86_64/egg/qcg/VQE
    copying build/lib/qcg/VQE/__init__.py -> build/bdist.linux-x86_64/egg/qcg/VQE
    creating build/bdist.linux-x86_64/egg/qcg/Arithmetic
    copying build/lib/qcg/Arithmetic/ripple_carry_adder.py -> build/bdist.linux-x86_64/egg/qcg/Arithmetic
    copying build/lib/qcg/Arithmetic/__init__.py -> build/bdist.linux-x86_64/egg/qcg/Arithmetic
    copying build/lib/qcg/__init__.py -> build/bdist.linux-x86_64/egg/qcg
    creating build/bdist.linux-x86_64/egg/qcg/QFT
    copying build/lib/qcg/QFT/qft_circ.py -> build/bdist.linux-x86_64/egg/qcg/QFT
    copying build/lib/qcg/QFT/__init__.py -> build/bdist.linux-x86_64/egg/qcg/QFT
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/setup.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/non_ibmq_functions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/schedule.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/metrics.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/conversions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/Qgrid_Sycamore.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/Qbit_original.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/Qgrid_original.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/ABCD_layer_generation.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/Qbit_Sycamore.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/cz_layer_generation.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics
    copying build/lib/qiskit_helper_functions/qcg/Dynamics/quantum_dynamics.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics
    copying build/lib/qiskit_helper_functions/qcg/Dynamics/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics
    copying build/lib/qiskit_helper_functions/qcg/generators.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils
    copying build/lib/qiskit_helper_functions/qcg/utils/testhwea.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils
    copying build/lib/qiskit_helper_functions/qcg/utils/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA
    copying build/lib/qiskit_helper_functions/qcg/QAOA/hw_efficient_ansatz.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA
    copying build/lib/qiskit_helper_functions/qcg/QAOA/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani
    copying build/lib/qiskit_helper_functions/qcg/BernsteinVazirani/bernstein_vazirani.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani
    copying build/lib/qiskit_helper_functions/qcg/BernsteinVazirani/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk
    copying build/lib/qiskit_helper_functions/qcg/QWalk/quantum_walk.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk
    copying build/lib/qiskit_helper_functions/qcg/QWalk/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE
    copying build/lib/qiskit_helper_functions/qcg/VQE/uccsd_ansatz.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE
    copying build/lib/qiskit_helper_functions/qcg/VQE/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic
    copying build/lib/qiskit_helper_functions/qcg/Arithmetic/ripple_carry_adder.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic
    copying build/lib/qiskit_helper_functions/qcg/Arithmetic/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic
    copying build/lib/qiskit_helper_functions/qcg/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT
    copying build/lib/qiskit_helper_functions/qcg/QFT/qft_circ.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT
    copying build/lib/qiskit_helper_functions/qcg/QFT/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/non_ibmq_functions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/schedule.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/metrics.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/conversions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/ibmq_functions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/ibmq_functions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/Qgrid_Sycamore.py to Qgrid_Sycamore.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/Qbit_original.py to Qbit_original.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/Qgrid_original.py to Qgrid_original.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/ABCD_layer_generation.py to ABCD_layer_generation.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/Qbit_Sycamore.py to Qbit_Sycamore.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/cz_layer_generation.py to cz_layer_generation.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Dynamics/quantum_dynamics.py to quantum_dynamics.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Dynamics/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/generators.py to generators.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/utils/testhwea.py to testhwea.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/utils/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QAOA/hw_efficient_ansatz.py to hw_efficient_ansatz.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QAOA/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani/bernstein_vazirani.py to bernstein_vazirani.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QWalk/quantum_walk.py to quantum_walk.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QWalk/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/VQE/uccsd_ansatz.py to uccsd_ansatz.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/VQE/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Arithmetic/ripple_carry_adder.py to ripple_carry_adder.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Arithmetic/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QFT/qft_circ.py to qft_circ.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QFT/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/setup.py to setup.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/non_ibmq_functions.py to non_ibmq_functions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/schedule.py to schedule.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/metrics.py to metrics.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/conversions.py to conversions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/Qgrid_Sycamore.py to Qgrid_Sycamore.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/Qbit_original.py to Qbit_original.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/Qgrid_original.py to Qgrid_original.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/ABCD_layer_generation.py to ABCD_layer_generation.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/Qbit_Sycamore.py to Qbit_Sycamore.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/cz_layer_generation.py to cz_layer_generation.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics/quantum_dynamics.py to quantum_dynamics.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/generators.py to generators.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils/testhwea.py to testhwea.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA/hw_efficient_ansatz.py to hw_efficient_ansatz.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani/bernstein_vazirani.py to bernstein_vazirani.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk/quantum_walk.py to quantum_walk.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE/uccsd_ansatz.py to uccsd_ansatz.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic/ripple_carry_adder.py to ripple_carry_adder.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT/qft_circ.py to qft_circ.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/non_ibmq_functions.py to non_ibmq_functions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/schedule.py to schedule.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/metrics.py to metrics.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/conversions.py to conversions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/ibmq_functions.py to ibmq_functions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/ibmq_functions.py to ibmq_functions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/__init__.py to __init__.cpython-37.pyc
    creating build/bdist.linux-x86_64/egg/EGG-INFO
    copying qiskit_helper_functions.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying qiskit_helper_functions.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying qiskit_helper_functions.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying qiskit_helper_functions.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying qiskit_helper_functions.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    creating dist
    creating 'dist/qiskit_helper_functions-0.0.1-py3.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
    removing 'build/bdist.linux-x86_64/egg' (and everything under it)
    Processing qiskit_helper_functions-0.0.1-py3.7.egg
    creating /usr/local/lib/python3.7/dist-packages/qiskit_helper_functions-0.0.1-py3.7.egg
    Extracting qiskit_helper_functions-0.0.1-py3.7.egg to /usr/local/lib/python3.7/dist-packages
    Adding qiskit-helper-functions 0.0.1 to easy-install.pth file

    Installed /usr/local/lib/python3.7/dist-packages/qiskit_helper_functions-0.0.1-py3.7.egg
    Processing dependencies for qiskit-helper-functions==0.0.1
    Finished processing dependencies for qiskit-helper-functions==0.0.1

```python
!pip unstall CutQC
!git clone https://github.com/weiT1993/CutQC
!cd CutQC && git checkout 6629a3696bea8ef3aa90dddfc021782859113377
!cp -r CutQC/* ./ && python3 setup.py install
```

    ERROR: unknown command "unstall" - maybe you meant "uninstall"
    Cloning into 'CutQC'...
    remote: Enumerating objects: 372, done.
    remote: Counting objects: 100% (372/372), done.
    remote: Compressing objects: 100% (182/182), done.
    remote: Total 372 (delta 127), reused 365 (delta 120), pack-reused 0
    Receiving objects: 100% (372/372), 230.67 KiB | 9.23 MiB/s, done.
    Resolving deltas: 100% (127/127), done.
    Note: checking out '6629a3696bea8ef3aa90dddfc021782859113377'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

      git checkout -b <new-branch-name>

    HEAD is now at 6629a36 added numpy postprocess
    running install
    running bdist_egg
    running egg_info
    creating CutQC.egg-info
    writing CutQC.egg-info/PKG-INFO
    writing dependency_links to CutQC.egg-info/dependency_links.txt
    writing top-level names to CutQC.egg-info/top_level.txt
    writing manifest file 'CutQC.egg-info/SOURCES.txt'
    reading manifest file 'CutQC.egg-info/SOURCES.txt'
    adding license file 'LICENSE'
    writing manifest file 'CutQC.egg-info/SOURCES.txt'
    installing library code to build/bdist.linux-x86_64/egg
    running install_lib
    running build_py
    creating build/lib/cutqc
    copying cutqc/post_process.py -> build/lib/cutqc
    copying cutqc/verify.py -> build/lib/cutqc
    copying cutqc/cutter.py -> build/lib/cutqc
    copying cutqc/evaluator.py -> build/lib/cutqc
    copying cutqc/main.py -> build/lib/cutqc
    copying cutqc/__init__.py -> build/lib/cutqc
    copying cutqc/helper_fun.py -> build/lib/cutqc
    creating build/bdist.linux-x86_64/egg
    creating build/bdist.linux-x86_64/egg/cutqc
    copying build/lib/cutqc/post_process.py -> build/bdist.linux-x86_64/egg/cutqc
    copying build/lib/cutqc/verify.py -> build/bdist.linux-x86_64/egg/cutqc
    copying build/lib/cutqc/cutter.py -> build/bdist.linux-x86_64/egg/cutqc
    copying build/lib/cutqc/evaluator.py -> build/bdist.linux-x86_64/egg/cutqc
    copying build/lib/cutqc/main.py -> build/bdist.linux-x86_64/egg/cutqc
    copying build/lib/cutqc/__init__.py -> build/bdist.linux-x86_64/egg/cutqc
    copying build/lib/cutqc/helper_fun.py -> build/bdist.linux-x86_64/egg/cutqc
    creating build/bdist.linux-x86_64/egg/qcg
    creating build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/Qgrid_Sycamore.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/Qbit_original.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/Qgrid_original.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/ABCD_layer_generation.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/Qbit_Sycamore.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/__init__.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    copying build/lib/qcg/Supremacy/cz_layer_generation.py -> build/bdist.linux-x86_64/egg/qcg/Supremacy
    creating build/bdist.linux-x86_64/egg/qcg/Dynamics
    copying build/lib/qcg/Dynamics/quantum_dynamics.py -> build/bdist.linux-x86_64/egg/qcg/Dynamics
    copying build/lib/qcg/Dynamics/__init__.py -> build/bdist.linux-x86_64/egg/qcg/Dynamics
    copying build/lib/qcg/generators.py -> build/bdist.linux-x86_64/egg/qcg
    creating build/bdist.linux-x86_64/egg/qcg/utils
    copying build/lib/qcg/utils/testhwea.py -> build/bdist.linux-x86_64/egg/qcg/utils
    copying build/lib/qcg/utils/__init__.py -> build/bdist.linux-x86_64/egg/qcg/utils
    creating build/bdist.linux-x86_64/egg/qcg/QAOA
    copying build/lib/qcg/QAOA/hw_efficient_ansatz.py -> build/bdist.linux-x86_64/egg/qcg/QAOA
    copying build/lib/qcg/QAOA/__init__.py -> build/bdist.linux-x86_64/egg/qcg/QAOA
    creating build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani
    copying build/lib/qcg/BernsteinVazirani/bernstein_vazirani.py -> build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani
    copying build/lib/qcg/BernsteinVazirani/__init__.py -> build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani
    creating build/bdist.linux-x86_64/egg/qcg/QWalk
    copying build/lib/qcg/QWalk/quantum_walk.py -> build/bdist.linux-x86_64/egg/qcg/QWalk
    copying build/lib/qcg/QWalk/__init__.py -> build/bdist.linux-x86_64/egg/qcg/QWalk
    creating build/bdist.linux-x86_64/egg/qcg/VQE
    copying build/lib/qcg/VQE/uccsd_ansatz.py -> build/bdist.linux-x86_64/egg/qcg/VQE
    copying build/lib/qcg/VQE/__init__.py -> build/bdist.linux-x86_64/egg/qcg/VQE
    creating build/bdist.linux-x86_64/egg/qcg/Arithmetic
    copying build/lib/qcg/Arithmetic/ripple_carry_adder.py -> build/bdist.linux-x86_64/egg/qcg/Arithmetic
    copying build/lib/qcg/Arithmetic/__init__.py -> build/bdist.linux-x86_64/egg/qcg/Arithmetic
    copying build/lib/qcg/__init__.py -> build/bdist.linux-x86_64/egg/qcg
    creating build/bdist.linux-x86_64/egg/qcg/QFT
    copying build/lib/qcg/QFT/qft_circ.py -> build/bdist.linux-x86_64/egg/qcg/QFT
    copying build/lib/qcg/QFT/__init__.py -> build/bdist.linux-x86_64/egg/qcg/QFT
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/setup.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/non_ibmq_functions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/schedule.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/metrics.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/conversions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/Qgrid_Sycamore.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/Qbit_original.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/Qgrid_original.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/ABCD_layer_generation.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/Qbit_Sycamore.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    copying build/lib/qiskit_helper_functions/qcg/Supremacy/cz_layer_generation.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics
    copying build/lib/qiskit_helper_functions/qcg/Dynamics/quantum_dynamics.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics
    copying build/lib/qiskit_helper_functions/qcg/Dynamics/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics
    copying build/lib/qiskit_helper_functions/qcg/generators.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils
    copying build/lib/qiskit_helper_functions/qcg/utils/testhwea.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils
    copying build/lib/qiskit_helper_functions/qcg/utils/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA
    copying build/lib/qiskit_helper_functions/qcg/QAOA/hw_efficient_ansatz.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA
    copying build/lib/qiskit_helper_functions/qcg/QAOA/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani
    copying build/lib/qiskit_helper_functions/qcg/BernsteinVazirani/bernstein_vazirani.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani
    copying build/lib/qiskit_helper_functions/qcg/BernsteinVazirani/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk
    copying build/lib/qiskit_helper_functions/qcg/QWalk/quantum_walk.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk
    copying build/lib/qiskit_helper_functions/qcg/QWalk/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE
    copying build/lib/qiskit_helper_functions/qcg/VQE/uccsd_ansatz.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE
    copying build/lib/qiskit_helper_functions/qcg/VQE/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic
    copying build/lib/qiskit_helper_functions/qcg/Arithmetic/ripple_carry_adder.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic
    copying build/lib/qiskit_helper_functions/qcg/Arithmetic/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic
    copying build/lib/qiskit_helper_functions/qcg/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT
    copying build/lib/qiskit_helper_functions/qcg/QFT/qft_circ.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT
    copying build/lib/qiskit_helper_functions/qcg/QFT/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT
    creating build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/non_ibmq_functions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/schedule.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/metrics.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/conversions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/ibmq_functions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/qiskit_helper_functions/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/ibmq_functions.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    copying build/lib/qiskit_helper_functions/__init__.py -> build/bdist.linux-x86_64/egg/qiskit_helper_functions
    byte-compiling build/bdist.linux-x86_64/egg/cutqc/post_process.py to post_process.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/cutqc/verify.py to verify.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/cutqc/cutter.py to cutter.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/cutqc/evaluator.py to evaluator.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/cutqc/main.py to main.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/cutqc/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/cutqc/helper_fun.py to helper_fun.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/Qgrid_Sycamore.py to Qgrid_Sycamore.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/Qbit_original.py to Qbit_original.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/Qgrid_original.py to Qgrid_original.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/ABCD_layer_generation.py to ABCD_layer_generation.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/Qbit_Sycamore.py to Qbit_Sycamore.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Supremacy/cz_layer_generation.py to cz_layer_generation.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Dynamics/quantum_dynamics.py to quantum_dynamics.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Dynamics/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/generators.py to generators.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/utils/testhwea.py to testhwea.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/utils/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QAOA/hw_efficient_ansatz.py to hw_efficient_ansatz.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QAOA/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani/bernstein_vazirani.py to bernstein_vazirani.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/BernsteinVazirani/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QWalk/quantum_walk.py to quantum_walk.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QWalk/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/VQE/uccsd_ansatz.py to uccsd_ansatz.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/VQE/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Arithmetic/ripple_carry_adder.py to ripple_carry_adder.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/Arithmetic/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QFT/qft_circ.py to qft_circ.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qcg/QFT/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/setup.py to setup.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/non_ibmq_functions.py to non_ibmq_functions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/schedule.py to schedule.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/metrics.py to metrics.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/conversions.py to conversions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/Qgrid_Sycamore.py to Qgrid_Sycamore.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/Qbit_original.py to Qbit_original.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/Qgrid_original.py to Qgrid_original.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/ABCD_layer_generation.py to ABCD_layer_generation.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/Qbit_Sycamore.py to Qbit_Sycamore.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Supremacy/cz_layer_generation.py to cz_layer_generation.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics/quantum_dynamics.py to quantum_dynamics.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Dynamics/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/generators.py to generators.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils/testhwea.py to testhwea.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/utils/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA/hw_efficient_ansatz.py to hw_efficient_ansatz.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QAOA/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani/bernstein_vazirani.py to bernstein_vazirani.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/BernsteinVazirani/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk/quantum_walk.py to quantum_walk.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QWalk/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE/uccsd_ansatz.py to uccsd_ansatz.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/VQE/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic/ripple_carry_adder.py to ripple_carry_adder.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/Arithmetic/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT/qft_circ.py to qft_circ.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qcg/QFT/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/non_ibmq_functions.py to non_ibmq_functions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/schedule.py to schedule.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/metrics.py to metrics.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/conversions.py to conversions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/ibmq_functions.py to ibmq_functions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/qiskit_helper_functions/__init__.py to __init__.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/ibmq_functions.py to ibmq_functions.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/qiskit_helper_functions/__init__.py to __init__.cpython-37.pyc
    creating build/bdist.linux-x86_64/egg/EGG-INFO
    copying CutQC.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying CutQC.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying CutQC.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying CutQC.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying CutQC.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    creating 'dist/CutQC-0.0.1-py3.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
    removing 'build/bdist.linux-x86_64/egg' (and everything under it)
    Processing CutQC-0.0.1-py3.7.egg
    creating /usr/local/lib/python3.7/dist-packages/CutQC-0.0.1-py3.7.egg
    Extracting CutQC-0.0.1-py3.7.egg to /usr/local/lib/python3.7/dist-packages
    Adding CutQC 0.0.1 to easy-install.pth file

    Installed /usr/local/lib/python3.7/dist-packages/CutQC-0.0.1-py3.7.egg
    Processing dependencies for CutQC==0.0.1
    Finished processing dependencies for CutQC==0.0.1

# Code

```python
from qiskit.quantum_info import random_unitary
from qiskit.circuit.random import random_circuit
from qiskit_helper_functions.non_ibmq_functions import generate_circ
from qiskit_helper_functions.non_ibmq_functions import apply_measurement
from qiskit_helper_functions.conversions import dict_to_array

from cutqc.cutter import find_cuts
from cutqc.post_process import generate_summation_terms, get_naive_overhead # build
from cutqc.evaluator import run_subcircuit_instances
from cutqc.verify import verify

from anytree import Node, RenderTree
from anytree.exporter import DotExporter
from anytree.search import findall_by_attr

from pprint import pprint

from cutqc.cutter import subcircuits_parser, get_pairs, get_counter, cost_estimate
from cutqc.evaluator import modify_subcircuit_instance, mutate_measurement_basis, measure_prob
```

```python
types = [
         # qiskit_helper_functions
         "bv",
         "supremacy",
         "supremacy_linear",
         "hwea",
         "qft",
         "aqft",
         "sycamore",
         "adder",
         "grover",
         "random",

         # qiskit.circuit.random
         "qiskit-random"
    ]

def generate_circuit(register_size = 12, circuit_type = "bv", **kwargs):

    if not circuit_type in types:
        raise Exception("Unknown circuit type.")

    if circuit_type == "qiskit-random":
        return random_circuit(register_size, register_size*3, conditional=True, measure=True)

    return generate_circ(full_circ_size=register_size, circuit_type=circuit_type, **kwargs)

def run_batch(definition, batch = 5, context = {}):
    return timeit.repeat(stmt="definition()", setup="", repeat=batch, number = batch, globals={ **globals(), **context, "definition": definition })

def avg(arr):
    return sum(arr) / len(arr)
```

```python
def cut(circuit, verbose = True):

    sub_circuit_max = circuit.num_qubits

    # 6 is the max limit for `Gurobi` Optimier.
    if sub_circuit_max > 6:
        sub_circuit_max = 6

    circuit_const = int( circuit.size() / circuit.num_qubits )
    max_subcircuit_width = circuit.num_qubits + circuit_const
    max_subcircuit_cuts = circuit.num_qubits
    max_subcircuit_size = circuit.size() + circuit_const
    quantum_cost_weight = 1.0
    max_cuts = circuit.num_qubits - 2

    num_subcircuits = [s for s in range(2, sub_circuit_max)]

    kwargs = {
        "max_subcircuit_width": max_subcircuit_width,
        "max_subcircuit_cuts": max_subcircuit_cuts,
        "max_subcircuit_size": max_subcircuit_size,
        "quantum_cost_weight": quantum_cost_weight,
        "max_cuts": max_cuts,
        "num_subcircuits": num_subcircuits
    }

    return find_cuts(circuit=circuit, **kwargs, verbose=verbose)

def recursive_cut(circuit, callback=None, prefix='cut1', parent_node=None, min_qubit=None):
    if parent_node:
        node = Node(prefix, parent=parent_node)
    else:
        node = Node(prefix)

    cuts = cut(circuit, False)
    all_cuts = cuts.get('subcircuits', [])

    if len(all_cuts) < 2:
        if callback:
            callback(node, circuit, prefix)
        # print(f"Final Node : {prefix}")
        node.data = circuit
        return node
    else:
        node.data = circuit

        if min_qubit:
            if circuit.num_qubits <= min_qubit:
                if callback:
                    callback(node, circuit, prefix)
                return node

        node.complete_path_map = cuts.get('complete_path_map', {})
        node.cuts = cuts

        # if callback:
        #     callback(node, circuit, prefix)

        postfix = 0
        for circ in all_cuts:
            postfix = postfix + 1
            recursive_cut(circ, callback, prefix + str(postfix), node, min_qubit)

    return node
```

```python
def get_target_from_path(n, graph):

    key = [ k for k in filter ( lambda obj: obj.index == n, list(graph.keys()) )]

    return key, graph[key]

def get_mapped_from_path(subcircuit_idx, n, graph):

    def check(obj):
        for o in obj:
            if ( o['subcircuit_idx'] == subcircuit_idx ) and ( o['subcircuit_qubit'].index == n ):
                return True
        return False

    key = [ k for k in filter ( lambda obj: check(graph[obj]), list(graph.keys()) )]
    key = key[0]

    return key, graph[key]

def graph_output_circuit_nums(graph):
    size = []
    for val in graph.values():
        for v in val:
            size += [ v['subcircuit_idx'] ]
    return len(set(size))

def graph_output_circuit_ids(graph):
    size = []
    for val in graph.values():
        for v in val:
            size += [ v['subcircuit_idx'] ]
    return list(set(size))

def graph_input_circuit_size(graph):
    return list(graph.keys())[0].register.size

def get_cut_from_graph(graph):
    return [ mappings for mappings in list(graph.values()) if len(mappings) > 1][0]

def get_cut_idx(cut, graph):
    for channel in cut:
        if channel['subcircuit_qubit'] in graph:
            return channel['subcircuit_idx']
    return False

def clean_name_tree(node):
    if node.is_leaf:
        node.name = "node" + node.name[3:]
    [ clean_name_tree(child) for child in node.children ]
    return node

def get_solution(circuit, subcircuits, complete_path_map):

    # subcircuits, complete_path_map = subcircuits_parser(subcircuit_gates=subcircuits, circuit=circuit)
    O_rho_pairs = get_pairs(complete_path_map=complete_path_map)
    counter = get_counter(subcircuits=subcircuits, O_rho_pairs=O_rho_pairs)
    quantum_cost, classical_cost = cost_estimate(counter=counter)
    max_subcircuit_width = max([subcircuit.width() for subcircuit in subcircuits])

    cut_solution = {
        'max_subcircuit_width':max_subcircuit_width,
        'subcircuits':subcircuits,
        'complete_path_map':complete_path_map,
        'num_cuts':len(O_rho_pairs),
        'counter':counter,
        'classical_cost':classical_cost,
        'quantum_cost':quantum_cost}

    return cut_solution

def get_complete_path_map(pnode): # node_stack, circuit_stack, circuit):
    # 1.) get pnode->path_map
    # 2.) get (!pnode->is_leaf)=>(return pnode->path_map + pnode.children->get_complete_path_map without None)
    # 3.)
    # 4.) (pnode->is_leaf)=>return none
    # complete_path_map

    if not pnode.is_leaf:
        child_path_map = [ get_complete_path_map(child) for child in pnode.children ]
        child_path_map = [ (child) for child in child_path_map if child ]
        if child_path_map:

            if len(child_path_map) == 1:
                child_path_map = child_path_map[0]
                return combine_path_map(pnode.complete_path_map, child_path_map)
            else:
                map = combine_path_map(pnode.complete_path_map, child_path_map[0])
                for i in range(1, len(child_path_map)):
                    map = combine_path_map(pnode.complete_path_map, child_path_map[i])
                child_path_map = map
                return child_path_map
        else:
            return pnode.complete_path_map
    else:
        return None

def combine_path_map(parent_path_map, child_path_map):

    result = parent_path_map

    reconstructed_map = {}

    parent_size = graph_output_circuit_nums(parent_path_map)
    child_size = graph_output_circuit_nums(child_path_map)
    total_size = parent_size + child_size

    circuit_piece = [ i for i in range(total_size + 1) ]

    parent_input_size = graph_input_circuit_size(parent_path_map)
    child_input_size  = graph_input_circuit_size(child_path_map)

    parent_piece_mapping = {}
    child_piece_mapping = {}

    cut = get_cut_from_graph(parent_path_map)
    cut_point = get_cut_idx(cut, list(child_path_map.keys()))
    end_point = child_size

    parent_piece_mapping.update({ f:f for f in range(0, cut_point) })
    child_piece_mapping.update({ (f-cut_point):f for f in range(cut_point, end_point + cut_point) })
    parent_piece_mapping.update({(f-end_point + 1):f for f in range(end_point + cut_point, total_size - 1) })

    child_path_map_remapped = {}
    for key, values in child_path_map.items():
        remapped_values = []
        for piece in values:
            remapped_values += [{ 'subcircuit_idx': child_piece_mapping[ piece['subcircuit_idx'] ], 'subcircuit_qubit': piece['subcircuit_qubit'] }]
        child_path_map_remapped[key] = remapped_values

    parent_path_map_remapped = parent_path_map

    reconstructed_map = {}
    for qubit, qubit_to_sub_circuit_map in parent_path_map_remapped.items():
        map = qubit_to_sub_circuit_map
        join = []
        remove = []
        for index, connection in enumerate(qubit_to_sub_circuit_map):
            if connection['subcircuit_qubit'] in list( child_path_map_remapped.keys() ) and cut_point == connection['subcircuit_idx']:
                add_this = child_path_map_remapped[ connection['subcircuit_qubit'] ]
                join += add_this
            else:
                add_this = connection
                add_this['subcircuit_idx'] = parent_piece_mapping[add_this['subcircuit_idx']]
                join += [ add_this ]
            remove += [connection]

        [ map.remove(con) for con in remove ]

        map += join
        reconstructed_map[qubit] =  map

    new_output_map = { value: key for (key, value) in enumerate(graph_output_circuit_ids(reconstructed_map)) }
    reconstructed_map_correction = {}
    for key, values in reconstructed_map.items():
        remapped_values = []
        for piece in values:
            remapped_values += [{ 'subcircuit_idx': new_output_map[ piece['subcircuit_idx'] ], 'subcircuit_qubit': piece['subcircuit_qubit'] }]
        reconstructed_map_correction[key] = remapped_values

    return reconstructed_map_correction

```

```python
from time import time
import itertools, copy

import numpy as np

from qiskit import IBMQ, transpile, Aer, execute

from qiskit.providers.aer import noise
from qiskit import QuantumCircuit
from qiskit.providers.aer import AerSimulator
from qiskit.tools.visualization import plot_histogram
from qiskit.test.mock import FakeBackend, FakeTokyo, FakeVigo, FakeMelbourne, FakePoughkeepsie, FakeQasmSimulator, FakeRueschlikon, FakeTenerife

available_backend = {
    "FakeTokyo": FakeTokyo,
    "FakeVigo": FakeVigo,
    "FakeMelbourne": FakeMelbourne,
    "FakePoughkeepsie": FakePoughkeepsie,
    "FakeRueschlikon": FakeRueschlikon,
    "FakeTenerife": FakeTenerife
}

def get_backend_name(backend):
    for name, device in available_backend.items():
        if device is backend:
            return name
    raise Exception("Backend Error: No specified vackend found.")

def evaluate_circ(circuit, backend, options=None):
    if backend in available_backend:
        backend = available_backend[backend]()
        noise_model = noise.NoiseModel.from_backend(backend)
        if isinstance(options,dict) and 'num_shots' in options:
            num_shots = options['num_shots']
        else:
            num_shots = max(1024,2**circuit.num_qubits)
        if isinstance(options,dict) and 'memory' in options:
            memory = options['memory']
        else:
            memory = False
        if circuit.num_clbits == 0:
            circuit = apply_measurement(circuit=circuit,qubits=circuit.qubits)
        job = execute(circuit, backend=backend, noise_model=noise_model, shots=num_shots, memory=memory).result()
        if memory:
            qasm_memory = np.array(job.get_memory(0))
            assert len(qasm_memory)==num_shots
            return qasm_memory
        else:
            counts = job.get_counts(0)
            assert sum(counts.values())==num_shots
            counts = dict_to_array(distribution_dict=counts,force_prob=True)
            return counts
    if type(backend) is str:
        if backend=='statevector_simulator':
            backend = Aer.get_backend('statevector_simulator')
            job = execute(circuit, backend=backend, optimization_level=0)
            result = job.result()
            output_sv = result.get_statevector(circuit)
            output_p = []
            for x in output_sv:
                amplitude = np.absolute(x)**2
                if amplitude>1e-16:
                    output_p.append(amplitude)
                else:
                    output_p.append(0)
            output_p = np.array(output_p)
            return output_p
        elif backend == 'noiseless_qasm_simulator':
            if isinstance(options,dict) and 'num_shots' in options:
                num_shots = options['num_shots']
            else:
                num_shots = max(1024,2**circuit.num_qubits)
            backend = Aer.get_backend('qasm_simulator')

            if isinstance(options,dict) and 'memory' in options:
                memory = options['memory']
            else:
                memory = False
            if circuit.num_clbits == 0:
                circuit = apply_measurement(circuit=circuit,qubits=circuit.qubits)
            noiseless_qasm_result = execute(circuit, backend, shots=num_shots, memory=memory).result()

            if memory:
                qasm_memory = np.array(noiseless_qasm_result.get_memory(0))
                assert len(qasm_memory)==num_shots
                return qasm_memory
            else:
                noiseless_counts = noiseless_qasm_result.get_counts(0)
                assert sum(noiseless_counts.values())==num_shots
                noiseless_counts = dict_to_array(distribution_dict=noiseless_counts,force_prob=True)
                return noiseless_counts
        elif backend=='noisy_qasm_simulator':
            noisy_qasm_result = execute(circuit, Aer.get_backend('qasm_simulator'),
            coupling_map=options['coupling_map'],
            basis_gates=options['basis_gates'],
            noise_model=options['noise_model'],
            shots=options['num_shots']).result()

            noisy_counts = noisy_qasm_result.get_counts(0)
            assert sum(noisy_counts.values())==options['num_shots']
            noisy_counts = dict_to_array(distribution_dict=noisy_counts,force_prob=True)
            return noisy_counts
        else:
            raise NotImplementedError

def simulate_subcircuit(subcircuit,eval_mode,num_shots):
    '''
    Simulate a subcircuit
    '''
    if eval_mode=='sv':
        subcircuit_inst_prob = evaluate_circ(circuit=subcircuit,backend='statevector_simulator')
    elif eval_mode=='qasm':
        subcircuit_inst_prob = evaluate_circ(circuit=subcircuit,backend='noiseless_qasm_simulator',options={'num_shots':num_shots})
    else:
        subcircuit_inst_prob = evaluate_circ(circuit=subcircuit,backend=get_backend_name(eval_mode),options={'num_shots':num_shots})
    return subcircuit_inst_prob

def naive_compute(subcircuit_order, summation_terms, subcircuit_entry_probs):
	try:
		import cupy as cp
		CUDA = True
	except:
		import numpy as np
		CUDA = False
	reconstructed_prob = None
	for idx in range(len(summation_terms)):
		summation_term = summation_terms[idx]
		summation_term_prob = None
		for subcircuit_idx in subcircuit_order:
			subcircuit_entry_idx = summation_term[subcircuit_idx]
			subcircuit_entry_prob = subcircuit_entry_probs[subcircuit_idx][subcircuit_entry_idx]
			if summation_term_prob is None:
				summation_term_prob = subcircuit_entry_prob
			else:
				if CUDA:
					summation_term_prob = cp.array(summation_term_prob)
					subcircuit_entry_prob = cp.array(subcircuit_entry_prob)
					summation_term_prob = cp.kron(summation_term_prob,subcircuit_entry_prob)
					summation_term_prob = cp.asnumpy(summation_term_prob)
				else:
					summation_term_prob = np.kron(summation_term_prob,subcircuit_entry_prob)

		if reconstructed_prob is None:
			reconstructed_prob = summation_term_prob
		else:
			reconstructed_prob += summation_term_prob
	return reconstructed_prob

def build(summation_terms, subcircuit_entry_probs, num_cuts, counter, verbose):
	min_overhead = float('inf')
	for subcircuit_order in itertools.permutations(range(len(subcircuit_entry_probs))):
		overhead = get_naive_overhead(subcircuit_order=subcircuit_order,num_cuts=num_cuts,counter=counter)
		if overhead['additions']+overhead['multiplications']<min_overhead:
			smart_order = subcircuit_order
			min_overhead = overhead['additions']+overhead['multiplications']
			if verbose:
				print('subcircuit_order {}. overhead = {}.'.format(subcircuit_order,overhead))

	reconstructed_prob = naive_compute(subcircuit_order, summation_terms, subcircuit_entry_probs)
	reconstructed_prob /= 2**num_cuts
	return reconstructed_prob, smart_order

def get_backend_name_from_stack(backend_run_stack, circuit):
    for key, values in backend_run_stack.items():
        if circuit in values:
            return key
    return 'sv'

def run_subcircuit_instances(subcircuits,subcircuit_instances,eval_mode,num_shots_fn, backend_run_stack=None):
    '''
    subcircuit_instance_probs[subcircuit_idx][subcircuit_instance_idx] = measured probability
    '''
    subcircuit_instance_probs = {}
    for subcircuit_idx in subcircuit_instances:
        subcircuit_instance_probs[subcircuit_idx] = {}
        num_shots = num_shots_fn(subcircuits[subcircuit_idx])
        for init_meas in subcircuit_instances[subcircuit_idx]:
            subcircuit_instance_idx = subcircuit_instances[subcircuit_idx][init_meas]
            if subcircuit_instance_idx not in subcircuit_instance_probs[subcircuit_idx]:
                # print('Subcircuit %d instance %d'%(subcircuit_idx,subcircuit_instance_idx))
                subcircuit_instance = modify_subcircuit_instance(
                    subcircuit=subcircuits[subcircuit_idx],
                    init=init_meas[0],meas=init_meas[1])
                if backend_run_stack:
                    subcircuit_inst_prob = simulate_subcircuit(subcircuit=subcircuit_instance,eval_mode=get_backend_name_from_stack(backend_run_stack, subcircuits[subcircuit_idx]),num_shots=num_shots)
                else:
                    subcircuit_inst_prob = simulate_subcircuit(subcircuit=subcircuit_instance,eval_mode=eval_mode,num_shots=num_shots)
                mutated_meas = mutate_measurement_basis(meas=init_meas[1])
                for meas in mutated_meas:
                    measured_prob = measure_prob(unmeasured_prob=subcircuit_inst_prob,meas=meas)
                    mutated_subcircuit_instance_idx = subcircuit_instances[subcircuit_idx][(init_meas[0],meas)]
                    subcircuit_instance_probs[subcircuit_idx][mutated_subcircuit_instance_idx] = measured_prob
                    # print('Measured instance %d'%mutated_subcircuit_instance_idx)
    return subcircuit_instance_probs

def summation(subcircuits, complete_path_map, num_cuts, full_circuit):
    return generate_summation_terms(subcircuits, complete_path_map, num_cuts)

def _attribute_shots(summation_terms, subcircuit_entries, subcircuit_instances, subcircuits, backend=None, backend_run_stack=None):
    '''
    eval_mode = qasm: simulate shots
    eval_mode = sv: statevector simulation
    num_shots_fn: a function that gives the number of shots to take for a given circuit
    '''
    eval_mode = 'sv'
    if backend:
        eval_mode = backend
    def constant_shots_fn(circuit):
        return 1024
    num_shots_fn = constant_shots_fn
    print("subcircuits : ", [ circ.num_qubits for circ in subcircuits ])
    print("subcircuit_instances : ", subcircuit_instances)
    subcircuit_instance_probs = run_subcircuit_instances(subcircuits=subcircuits,subcircuit_instances=subcircuit_instances, eval_mode=eval_mode,num_shots_fn=num_shots_fn, backend_run_stack=backend_run_stack)
    print("subcircuit_instance_probs : ", [ f"{key}: {len(proba)}    " for key, proba in subcircuit_instance_probs.items() ])

    subcircuit_entry_probs = {}
    for subcircuit_idx in subcircuit_entries:
        subcircuit_entry_probs[subcircuit_idx] = {}
        for label in subcircuit_entries[subcircuit_idx]:
            subcircuit_entry_idx, kronecker_term = subcircuit_entries[subcircuit_idx][label]
            # print('Subcircuit {:d} entry {:d} kronecker_term {}'.format(
            #     subcircuit_idx, subcircuit_entry_idx, kronecker_term
            # ))
            subcircuit_entry_prob = None
            for term in kronecker_term:
                coefficient, subcircuit_instance_idx = term
                if subcircuit_entry_prob is None:
                    subcircuit_entry_prob = coefficient * subcircuit_instance_probs[subcircuit_idx][subcircuit_instance_idx]
                else:
                    subcircuit_entry_prob += coefficient * subcircuit_instance_probs[subcircuit_idx][subcircuit_instance_idx]
            subcircuit_entry_probs[subcircuit_idx][subcircuit_entry_idx] = subcircuit_entry_prob
    return subcircuit_entry_probs

def reconstruct(subcircuits, complete_path_map, full_circuit, backend = None, backend_run_stack=None):

    num_cuts = graph_output_circuit_nums(complete_path_map) - 1

    summation_terms, subcircuit_entries, subcircuit_instances = generate_summation_terms(subcircuits, complete_path_map, num_cuts)

    cuts = get_solution(full_circuit, subcircuits, complete_path_map)

    if backend:
        subcircuit_entry_probs = _attribute_shots(summation_terms, subcircuit_entries, subcircuit_instances, subcircuits, backend=backend)
    if backend_run_stack:
        subcircuit_entry_probs = _attribute_shots(summation_terms, subcircuit_entries, subcircuit_instances, subcircuits, backend_run_stack=backend_run_stack)

    reconstructed_prob, smart_order = build(summation_terms, subcircuit_entry_probs, num_cuts, cuts['counter'], True)

    unordered_prob = reconstructed_prob
    reconstructed_output, metrics = verify(full_circuit=full_circuit,
                unordered=unordered_prob,
                complete_path_map=cuts['complete_path_map'],
                subcircuits=subcircuits,
                smart_order=smart_order)
    return reconstructed_output, metrics

```

```python
node_stack = {}
circuit_stack = {}

def callback(node, circuit, prefix):
    circuit_stack[prefix] = circuit
    node_stack[prefix] = node

circuit = generate_circuit( 12, "bv" )
pnode = recursive_cut(circuit, callback=callback, min_qubit=3)
clean_name_tree(pnode)

for pre, fill, node in RenderTree(pnode):
    print("%s%s" % (pre, node.name + " : " + str(node.data.num_qubits)))

complete_path_map = get_complete_path_map(pnode)
solution = get_solution(circuit, list(circuit_stack.values()), complete_path_map)

# pprint(solution)

subcircuits = list( circuit_stack.values() )
reconstructed_output, metrics = reconstruct(subcircuits, complete_path_map, circuit, backend=FakeTokyo)

pprint(metrics)
```

    Restricted license - for non-production use only - expires 2022-01-13
    cut1 : 12
    ├── cut11 : 9
    │   ├── cut111 : 6
    │   │   ├── cut1111 : 4
    │   │   │   ├── node11111 : 2
    │   │   │   └── node11112 : 3
    │   │   └── node1112 : 3
    │   └── cut112 : 4
    │       ├── node1121 : 2
    │       └── node1122 : 3
    └── cut12 : 4
        ├── node121 : 2
        └── node122 : 3
    subcircuits :  [2, 3, 3, 2, 3, 2, 3]
    subcircuit_instances :  {0: {(('zero', 'zero'), ('comp', 'I')): 0, (('zero', 'zero'), ('comp', 'X')): 1, (('zero', 'zero'), ('comp', 'Y')): 2, (('zero', 'zero'), ('comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero'), ('comp', 'I')): 0, (('zero', 'one'), ('comp', 'I')): 1, (('zero', 'plus'), ('comp', 'I')): 2, (('zero', 'plusI'), ('comp', 'I')): 3, (('zero', 'zero'), ('comp', 'X')): 4, (('zero', 'one'), ('comp', 'X')): 5, (('zero', 'plus'), ('comp', 'X')): 6, (('zero', 'plusI'), ('comp', 'X')): 7, (('zero', 'zero'), ('comp', 'Y')): 8, (('zero', 'one'), ('comp', 'Y')): 9, (('zero', 'plus'), ('comp', 'Y')): 10, (('zero', 'plusI'), ('comp', 'Y')): 11, (('zero', 'zero'), ('comp', 'Z')): 12, (('zero', 'one'), ('comp', 'Z')): 13, (('zero', 'plus'), ('comp', 'Z')): 14, (('zero', 'plusI'), ('comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 5: {(('zero', 'zero'), ('comp', 'I')): 0, (('zero', 'one'), ('comp', 'I')): 1, (('zero', 'plus'), ('comp', 'I')): 2, (('zero', 'plusI'), ('comp', 'I')): 3, (('zero', 'zero'), ('comp', 'X')): 4, (('zero', 'one'), ('comp', 'X')): 5, (('zero', 'plus'), ('comp', 'X')): 6, (('zero', 'plusI'), ('comp', 'X')): 7, (('zero', 'zero'), ('comp', 'Y')): 8, (('zero', 'one'), ('comp', 'Y')): 9, (('zero', 'plus'), ('comp', 'Y')): 10, (('zero', 'plusI'), ('comp', 'Y')): 11, (('zero', 'zero'), ('comp', 'Z')): 12, (('zero', 'one'), ('comp', 'Z')): 13, (('zero', 'plus'), ('comp', 'Z')): 14, (('zero', 'plusI'), ('comp', 'Z')): 15}, 6: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'comp')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'comp')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'comp')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'comp')): 3}}

    /usr/local/lib/python3.7/dist-packages/ipykernel_launcher.py:35: DeprecationWarning: Back-references to from Bit instances to their containing Registers have been deprecated. Instead, inspect Registers to find their contained Bits.

    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 16    ', '5: 16    ', '6: 4    ']
    subcircuit_order (0, 1, 2, 3, 4, 5, 6). overhead = {'additions': 16773120, 'multiplications': 20348928}.
    subcircuit_order (0, 1, 2, 3, 5, 4, 6). overhead = {'additions': 16773120, 'multiplications': 19824640}.
    subcircuit_order (0, 1, 3, 2, 5, 4, 6). overhead = {'additions': 16773120, 'multiplications': 19759104}.
    subcircuit_order (0, 1, 3, 5, 2, 4, 6). overhead = {'additions': 16773120, 'multiplications': 19628032}.
    subcircuit_order (0, 3, 1, 5, 2, 4, 6). overhead = {'additions': 16773120, 'multiplications': 19611648}.
    subcircuit_order (0, 3, 5, 1, 2, 4, 6). overhead = {'additions': 16773120, 'multiplications': 19578880}.
    {'naive': {'Cross Entropy': 2.678769959757899,
               'HOP': 0.06864754148227782,
               'Mean Absolute Percentage Error': 227380971317803.12,
               'Mean Squared Error': 0.00021317235882506357,
               'chi2': 1.7430488956646646},
     'nearest': {'Cross Entropy': 2.6403571317396,
                 'HOP': 0.07133578873232556,
                 'Mean Absolute Percentage Error': 226724660954021.97,
                 'Mean Squared Error': 0.00021205718583309181,
                 'chi2': 1.7336566574827674}}

```python
from pytket.routing import Architecture, route, place_with_map
from pytket.transform import Transform
from pytket.routing import Placement, LinePlacement, GraphPlacement, NoiseAwarePlacement
from pytket.extensions.qiskit import qiskit_to_tk, tk_to_qiskit

def Tket(circuit, backend = None, transform = False):
    pytket_circ = qiskit_to_tk(circuit)

    if not backend in list(available_backend.values()):
        raise Exception(f"Backend `{backend}` is not valid")

    backend = backend()
    check_chip_compatiblity(backend, circuit) # Validate Chip Size to Circuit Size

    if transform:
        Transform.RemoveRedundancies().apply(physical_c)
        Transform.OptimisePostRouting().apply(physical_c)
        Transform.RebaseToQiskit().apply(physical_c)

    arc = Architecture(backend._configuration.coupling_map)

    # placement = Placement(arc)
    # placement_map = placement.get_placement_map(pytket_circ)

    physical_c = route(pytket_circ, arc)

    # placement.place(physical_c)
    # place_with_map(pytket_circ, placement_map)

    final_circ = tk_to_qiskit(physical_c)

    return final_circ

from qiskit.circuit import QuantumRegister, Qubit
from pprint import pprint
def tket_path(pathmap):
    map = pathmap.copy()
    q_node = Qubit(QuantumRegister(6, 'q'), 0)
    q_node.register.size, q_node.index

    for key, values in map.items():
        for index, conn in enumerate(map[key]):
            # {'subcircuit_idx': 0, 'subcircuit_qubit': Qubit(QuantumRegister(4, 'q'), 0)}
            qubit = conn['subcircuit_qubit']
            qubit = Qubit(QuantumRegister(qubit.register.size, 'node'), qubit.index)
            qubit._hash = pathmap[key][index]['subcircuit_qubit']._hash
            map[key][index]['subcircuit_qubit'] = qubit
    return map

from qiskit import QuantumCircuit, QuantumRegister
def tket_rename_nodes(circuit):
    qreg = QuantumRegister(circuit.num_qubits , 'q')
    if circuit.cregs:
        creg = QuantumRegister(len(circuit.cregs) , 'c')
        circ = QuantumCircuit(qreg, creg)
    else:
        circ = QuantumCircuit(qreg)

    for instr, qargs, cargs in circuit._data:
        qreg = [ reg.index for reg in qargs ]
        circ.append(instr, qreg)

    return circ
```

```python
# print(Tket(circuit, FakeTokyo).draw())
# tket_rename_nodes(Tket(circuit, FakeTokyo)).draw()
```

```python
from qiskit import QuantumCircuit, execute

class CircuitLargerThanChip(Exception):
    pass

def check_chip_compatiblity(backend, circuit, raise_exception=True):
    if backend._configuration.n_qubits < circuit.num_qubits:
        if raise_exception:
            raise CircuitLargerThanChip("Circuit is larger than chip size.")
        else:
            return False
    return True

class Schedular:
    def __init__(self, backend_list):
        self.backend_list = backend_list
        self.backend_sizes = { backend()._configuration.n_qubits: backend for backend in backend_list }
        self.backend_run_stack = { backend: [] for backend in backend_list }
        self.pnode = None
        self.smallest_chip_size = min([device()._configuration.n_qubits for device in backend_list])
        self.node_stack = {}
        self.circuit_stack = {}

    def callback(self, node, circuit, prefix):
        self.circuit_stack[prefix] = circuit
        self.node_stack[prefix] = node

    def __call__(self, circuit):
        self.pnode = recursive_cut(circuit, callback=self.callback, min_qubit=self.smallest_chip_size)
        [ self.alot(circuit) for circuit in list(self.circuit_stack.values()) ]

        # Distribute the circuit if some devices are free
        empty_devices = [backend for backend, run_stack in self.backend_run_stack.items() if len(run_stack) == 0]
        for devices in empty_devices:
            run_stack_size = [ len(run_stack) for backend, run_stack in self.backend_run_stack.items() ]
            most_busy = [ (backend, run_stack) for backend, run_stack in self.backend_run_stack.items() if len(run_stack) == max(run_stack_size) ]
            backend, run_stack = most_busy[0]
            size = len(run_stack)
            new_run_stack_1 = run_stack[:size//2]
            new_run_stack_2 = run_stack[size//2:]
            self.backend_run_stack[backend] = new_run_stack_1
            self.backend_run_stack[devices] = new_run_stack_2

        subcircuits = list( self.circuit_stack.values() )
        complete_path_map = get_complete_path_map(self.pnode)

        solution = get_solution(circuit, subcircuits, complete_path_map)
        reconstructed_output, metrics = reconstruct(subcircuits, complete_path_map, circuit, backend_run_stack = self.backend_run_stack)

        return (reconstructed_output, metrics) # self.backend_run_stack

    def alot(self, circuit):
        # Fill `backend_run_stack` in order from low to high
        size_list = list(self.backend_sizes.keys())
        size_list = list(sorted(list(size_list)))
        for size in size_list:
            backend = self.backend_sizes[size]
            if check_chip_compatiblity(backend(), circuit):
                self.backend_run_stack[backend] += [circuit]
                return backend
        raise Exception("Circuit too big for available devices.")

    def kernal(self, circuit):
        pass
```

```python
{ name:device()._configuration.n_qubits for name, device in available_backend.items() }
```

    {'FakeMelbourne': 14,
     'FakePoughkeepsie': 20,
     'FakeRueschlikon': 16,
     'FakeTenerife': 5,
     'FakeTokyo': 20,
     'FakeVigo': 5}

```python
import pickle

def save(obj, filename):
    with open(f'{filename}.pickle', 'wb') as handle:
        pickle.dump(obj, handle, protocol=pickle.HIGHEST_PROTOCOL)

metrics_list = []

backend_list = list(available_backend.values())

circuit_list = { f"cirucit [bv-{qubit}]": generate_circuit( qubit, "bv" ) for qubit in range(6, 24) }
for name, circ in circuit_list.items():
    schedule = Schedular(backend_list)
    reconstructed_output, metrics = schedule(circ)
    metrics_list += [ metrics ]
    save({"reconstructed_output": reconstructed_output, "metrics": metrics}, name)
```

    subcircuits :  [4, 3]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'comp')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'comp')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'comp')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 4    ']
    subcircuit_order (0, 1). overhead = {'additions': 192, 'multiplications': 256}.
    subcircuits :  [3, 5]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'comp')): 0, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'comp')): 1, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'comp')): 2, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 4    ']
    subcircuit_order (0, 1). overhead = {'additions': 384, 'multiplications': 512}.
    subcircuits :  [4, 3, 3]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'comp')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'comp')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'comp')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'comp')): 3}}

    /usr/local/lib/python3.7/dist-packages/ipykernel_launcher.py:35: DeprecationWarning: Back-references to from Bit instances to their containing Registers have been deprecated. Instead, inspect Registers to find their contained Bits.

    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 4    ']
    subcircuit_order (0, 1, 2). overhead = {'additions': 3840, 'multiplications': 4608}.
    subcircuits :  [4, 3, 4]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 4    ']
    subcircuit_order (0, 1, 2). overhead = {'additions': 7680, 'multiplications': 8704}.
    subcircuits :  [4, 3, 5]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'comp')): 0, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'comp')): 1, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'comp')): 2, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 4    ']
    subcircuit_order (0, 1, 2). overhead = {'additions': 15360, 'multiplications': 16896}.
    subcircuits :  [4, 3, 4, 3]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'comp')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'comp')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'comp')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 4    ']
    subcircuit_order (0, 1, 2, 3). overhead = {'additions': 129024, 'multiplications': 149504}.
    subcircuits :  [4, 3, 4, 4]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 4    ']
    subcircuit_order (0, 1, 2, 3). overhead = {'additions': 258048, 'multiplications': 280576}.
    subcircuits :  [3, 5, 3, 5]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'comp')): 0, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'comp')): 1, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'comp')): 2, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 4    ']
    subcircuit_order (0, 1, 2, 3). overhead = {'additions': 516096, 'multiplications': 544768}.
    subcircuit_order (0, 2, 1, 3). overhead = {'additions': 516096, 'multiplications': 541696}.
    subcircuits :  [4, 3, 4, 3, 4]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 4    ']
    subcircuit_order (0, 1, 2, 3, 4). overhead = {'additions': 4177920, 'multiplications': 4530176}.
    subcircuit_order (0, 1, 3, 2, 4). overhead = {'additions': 4177920, 'multiplications': 4497408}.
    subcircuit_order (1, 3, 0, 2, 4). overhead = {'additions': 4177920, 'multiplications': 4493312}.
    subcircuits :  [4, 3, 4, 3, 4, 2]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 5: {(('zero', 'zero'), ('comp', 'comp')): 0, (('zero', 'one'), ('comp', 'comp')): 1, (('zero', 'plus'), ('comp', 'comp')): 2, (('zero', 'plusI'), ('comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 16    ', '5: 4    ']
    subcircuit_order (0, 1, 2, 3, 4, 5). overhead = {'additions': 33521664, 'multiplications': 43286528}.
    subcircuit_order (0, 1, 2, 3, 5, 4). overhead = {'additions': 33521664, 'multiplications': 39092224}.
    subcircuit_order (0, 1, 3, 2, 5, 4). overhead = {'additions': 33521664, 'multiplications': 38961152}.
    subcircuit_order (0, 1, 3, 5, 2, 4). overhead = {'additions': 33521664, 'multiplications': 38436864}.
    subcircuit_order (1, 3, 0, 5, 2, 4). overhead = {'additions': 33521664, 'multiplications': 38420480}.
    subcircuit_order (1, 3, 5, 0, 2, 4). overhead = {'additions': 33521664, 'multiplications': 38354944}.
    subcircuits :  [2, 4, 3, 4, 3, 4, 2]
    subcircuit_instances :  {0: {(('zero', 'zero'), ('comp', 'I')): 0, (('zero', 'zero'), ('comp', 'X')): 1, (('zero', 'zero'), ('comp', 'Y')): 2, (('zero', 'zero'), ('comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 5: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 6: {(('zero', 'zero'), ('comp', 'comp')): 0, (('zero', 'one'), ('comp', 'comp')): 1, (('zero', 'plus'), ('comp', 'comp')): 2, (('zero', 'plusI'), ('comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 16    ', '5: 16    ', '6: 4    ']
    subcircuit_order (0, 1, 2, 3, 4, 5, 6). overhead = {'additions': 268369920, 'multiplications': 346357760}.
    subcircuit_order (0, 1, 2, 3, 4, 6, 5). overhead = {'additions': 268369920, 'multiplications': 312803328}.
    subcircuit_order (0, 1, 2, 4, 3, 6, 5). overhead = {'additions': 268369920, 'multiplications': 311754752}.
    subcircuit_order (0, 1, 2, 4, 6, 3, 5). overhead = {'additions': 268369920, 'multiplications': 307560448}.
    subcircuit_order (0, 2, 1, 4, 6, 3, 5). overhead = {'additions': 268369920, 'multiplications': 307527680}.
    subcircuit_order (0, 2, 4, 1, 6, 3, 5). overhead = {'additions': 268369920, 'multiplications': 307396608}.
    subcircuit_order (0, 2, 4, 6, 1, 3, 5). overhead = {'additions': 268369920, 'multiplications': 306872320}.
    subcircuits :  [3, 4, 3, 4, 3, 4, 2]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 5: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 6: {(('zero', 'zero'), ('comp', 'comp')): 0, (('zero', 'one'), ('comp', 'comp')): 1, (('zero', 'plus'), ('comp', 'comp')): 2, (('zero', 'plusI'), ('comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 16    ', '5: 16    ', '6: 4    ']
    subcircuit_order (0, 1, 2, 3, 4, 5, 6). overhead = {'additions': 536739840, 'multiplications': 692715520}.
    subcircuit_order (0, 1, 2, 3, 4, 6, 5). overhead = {'additions': 536739840, 'multiplications': 625606656}.
    subcircuit_order (0, 1, 2, 4, 3, 6, 5). overhead = {'additions': 536739840, 'multiplications': 623509504}.
    subcircuit_order (0, 1, 2, 4, 6, 3, 5). overhead = {'additions': 536739840, 'multiplications': 615120896}.
    subcircuit_order (0, 2, 1, 4, 6, 3, 5). overhead = {'additions': 536739840, 'multiplications': 615055360}.
    subcircuit_order (0, 2, 4, 1, 6, 3, 5). overhead = {'additions': 536739840, 'multiplications': 614793216}.
    subcircuit_order (0, 2, 4, 6, 1, 3, 5). overhead = {'additions': 536739840, 'multiplications': 613744640}.
    Caught: Model too large for size-limited license; visit https://www.gurobi.com/free-trial for a full license
    subcircuits :  [2, 3, 4, 3, 4, 3, 4, 2]
    subcircuit_instances :  {0: {(('zero', 'zero'), ('comp', 'I')): 0, (('zero', 'zero'), ('comp', 'X')): 1, (('zero', 'zero'), ('comp', 'Y')): 2, (('zero', 'zero'), ('comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 5: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 6: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 7: {(('zero', 'zero'), ('comp', 'comp')): 0, (('zero', 'one'), ('comp', 'comp')): 1, (('zero', 'plus'), ('comp', 'comp')): 2, (('zero', 'plusI'), ('comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 16    ', '5: 16    ', '6: 16    ', '7: 4    ']
    subcircuit_order (0, 1, 2, 3, 4, 5, 6, 7). overhead = {'additions': 4294705152, 'multiplications': 5541855232}.
    subcircuit_order (0, 1, 2, 3, 4, 5, 7, 6). overhead = {'additions': 4294705152, 'multiplications': 5004984320}.
    subcircuit_order (0, 1, 2, 3, 5, 4, 7, 6). overhead = {'additions': 4294705152, 'multiplications': 4988207104}.
    subcircuit_order (0, 1, 2, 3, 5, 7, 4, 6). overhead = {'additions': 4294705152, 'multiplications': 4921098240}.
    subcircuit_order (0, 1, 3, 2, 5, 7, 4, 6). overhead = {'additions': 4294705152, 'multiplications': 4920573952}.
    subcircuit_order (0, 1, 3, 5, 2, 7, 4, 6). overhead = {'additions': 4294705152, 'multiplications': 4918476800}.
    subcircuit_order (0, 1, 3, 5, 7, 2, 4, 6). overhead = {'additions': 4294705152, 'multiplications': 4910088192}.
    Caught: Model too large for size-limited license; visit https://www.gurobi.com/free-trial for a full license
    subcircuits :  [3, 3, 4, 3, 4, 3, 4, 2]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 5: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 6: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 7: {(('zero', 'zero'), ('comp', 'comp')): 0, (('zero', 'one'), ('comp', 'comp')): 1, (('zero', 'plus'), ('comp', 'comp')): 2, (('zero', 'plusI'), ('comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 16    ', '5: 16    ', '6: 16    ', '7: 4    ']
    subcircuit_order (0, 1, 2, 3, 4, 5, 6, 7). overhead = {'additions': 8589410304, 'multiplications': 11083710464}.
    subcircuit_order (0, 1, 2, 3, 4, 5, 7, 6). overhead = {'additions': 8589410304, 'multiplications': 10009968640}.
    subcircuit_order (0, 1, 2, 3, 5, 4, 7, 6). overhead = {'additions': 8589410304, 'multiplications': 9976414208}.
    subcircuit_order (0, 1, 2, 3, 5, 7, 4, 6). overhead = {'additions': 8589410304, 'multiplications': 9842196480}.
    subcircuit_order (0, 1, 3, 2, 5, 7, 4, 6). overhead = {'additions': 8589410304, 'multiplications': 9841147904}.
    subcircuit_order (0, 1, 3, 5, 2, 7, 4, 6). overhead = {'additions': 8589410304, 'multiplications': 9836953600}.
    subcircuit_order (0, 1, 3, 5, 7, 2, 4, 6). overhead = {'additions': 8589410304, 'multiplications': 9820176384}.
    Caught: Model too large for size-limited license; visit https://www.gurobi.com/free-trial for a full license
    subcircuits :  [3, 5, 4, 3, 4, 3, 4]
    subcircuit_instances :  {0: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 1, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 2, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 5: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 6: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 16    ', '5: 16    ', '6: 4    ']
    subcircuit_order (0, 1, 2, 3, 4, 5, 6). overhead = {'additions': 4293918720, 'multiplications': 4641259520}.
    subcircuit_order (0, 1, 2, 3, 5, 4, 6). overhead = {'additions': 4293918720, 'multiplications': 4607705088}.
    subcircuit_order (0, 1, 3, 2, 5, 4, 6). overhead = {'additions': 4293918720, 'multiplications': 4606656512}.
    subcircuit_order (0, 1, 3, 5, 2, 4, 6). overhead = {'additions': 4293918720, 'multiplications': 4602462208}.
    subcircuit_order (0, 2, 3, 4, 5, 1, 6). overhead = {'additions': 4293918720, 'multiplications': 4585029632}.
    subcircuit_order (0, 2, 3, 5, 4, 1, 6). overhead = {'additions': 4293918720, 'multiplications': 4582932480}.
    subcircuit_order (0, 3, 2, 5, 4, 1, 6). overhead = {'additions': 4293918720, 'multiplications': 4582866944}.
    subcircuit_order (0, 3, 5, 2, 4, 1, 6). overhead = {'additions': 4293918720, 'multiplications': 4582604800}.
    Caught: Model too large for size-limited license; visit https://www.gurobi.com/free-trial for a full license
    Caught: Model too large for size-limited license; visit https://www.gurobi.com/free-trial for a full license
    subcircuits :  [2, 3, 5, 4, 3, 4, 3, 4]
    subcircuit_instances :  {0: {(('zero', 'zero'), ('comp', 'I')): 0, (('zero', 'zero'), ('comp', 'X')): 1, (('zero', 'zero'), ('comp', 'Y')): 2, (('zero', 'zero'), ('comp', 'Z')): 3}, 1: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 2: {(('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp', 'Z')): 15}, 3: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 4: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 5: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'I')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'I')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'I')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'X')): 4, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'X')): 5, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'X')): 6, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Y')): 8, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Y')): 9, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Y')): 10, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'Z')): 12, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'Z')): 13, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'Z')): 14, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'Z')): 15}, 6: {(('zero', 'zero', 'zero'), ('comp', 'comp', 'I')): 0, (('zero', 'zero', 'one'), ('comp', 'comp', 'I')): 1, (('zero', 'zero', 'plus'), ('comp', 'comp', 'I')): 2, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'I')): 3, (('zero', 'zero', 'zero'), ('comp', 'comp', 'X')): 4, (('zero', 'zero', 'one'), ('comp', 'comp', 'X')): 5, (('zero', 'zero', 'plus'), ('comp', 'comp', 'X')): 6, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'X')): 7, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Y')): 8, (('zero', 'zero', 'one'), ('comp', 'comp', 'Y')): 9, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Y')): 10, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Y')): 11, (('zero', 'zero', 'zero'), ('comp', 'comp', 'Z')): 12, (('zero', 'zero', 'one'), ('comp', 'comp', 'Z')): 13, (('zero', 'zero', 'plus'), ('comp', 'comp', 'Z')): 14, (('zero', 'zero', 'plusI'), ('comp', 'comp', 'Z')): 15}, 7: {(('zero', 'zero', 'zero', 'zero'), ('comp', 'comp', 'comp', 'comp')): 0, (('zero', 'zero', 'zero', 'one'), ('comp', 'comp', 'comp', 'comp')): 1, (('zero', 'zero', 'zero', 'plus'), ('comp', 'comp', 'comp', 'comp')): 2, (('zero', 'zero', 'zero', 'plusI'), ('comp', 'comp', 'comp', 'comp')): 3}}
    subcircuit_instance_probs :  ['0: 4    ', '1: 16    ', '2: 16    ', '3: 16    ', '4: 16    ', '5: 16    ', '6: 16    ', '7: 4    ']
    subcircuit_order (0, 1, 2, 3, 4, 5, 6, 7). overhead = {'additions': 34357641216, 'multiplications': 37130207232}.
    subcircuit_order (0, 1, 2, 3, 4, 6, 5, 7). overhead = {'additions': 34357641216, 'multiplications': 36861771776}.
    subcircuit_order (0, 1, 2, 4, 3, 6, 5, 7). overhead = {'additions': 34357641216, 'multiplications': 36853383168}.
    subcircuit_order (0, 1, 2, 4, 6, 3, 5, 7). overhead = {'additions': 34357641216, 'multiplications': 36819828736}.
    subcircuit_order (0, 1, 3, 4, 5, 6, 2, 7). overhead = {'additions': 34357641216, 'multiplications': 36680368128}.
    subcircuit_order (0, 1, 3, 4, 6, 5, 2, 7). overhead = {'additions': 34357641216, 'multiplications': 36663590912}.
    subcircuit_order (0, 1, 4, 3, 6, 5, 2, 7). overhead = {'additions': 34357641216, 'multiplications': 36663066624}.
    subcircuit_order (0, 1, 4, 6, 3, 5, 2, 7). overhead = {'additions': 34357641216, 'multiplications': 36660969472}.

```python
metrics_list[0]
```

    {'naive': {'Cross Entropy': 1.1566534090169873,
      'HOP': 0.31453704833984375,
      'Mean Absolute Percentage Error': 1.071035861968994e+16,
      'Mean Squared Error': 0.008262061045058996,
      'chi2': 1.042896360396752},
     'nearest': {'Cross Entropy': 1.1566534090169873,
      'HOP': 0.31453704833984375,
      'Mean Absolute Percentage Error': 1.071035861968994e+16,
      'Mean Squared Error': 0.008262061045058996,
      'chi2': 1.042896360396752}}

```python
# importing the required libraries
import matplotlib.pyplot as plt
import numpy as np

def draw(line1, line2, title, start_from = 0):
    plt.plot([i for i in range(start_from, start_from+len(line1))], line1) # Plot the chart
    plt.plot([i for i in range(start_from, start_from+len(line2))], line2, '-.') # Plot the chart
    # plt.xlabel("X-axis data")
    # plt.ylabel("Y-axis data")
    plt.title(title)
    plt.show() # display

def plot_metric(metrics_list, column):
    hop_naive = [metric['naive'][column]  for metric in metrics_list]
    hop_nearest = [metric['nearest'][column]  for metric in metrics_list]

    draw(hop_naive, hop_nearest, column, 6)

plot_metric(metrics_list, 'Cross Entropy')
plot_metric(metrics_list, 'Mean Squared Error')
plot_metric(metrics_list, 'Mean Absolute Percentage Error')
plot_metric(metrics_list, 'chi2')
plot_metric(metrics_list, 'HOP')
```

```python

```