├── .editorconfig ├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── benchmark ├── Visualize.ipynb ├── benchmark.py └── benchmark_data.csv ├── docs ├── _templates │ └── util │ │ └── footer.html ├── conf.py ├── gates.rst ├── guide.rst ├── index.rst ├── install.rst ├── operations.rst ├── quickstart.rst └── registers.rst ├── examples ├── bell_state.py ├── bernstein_vazirani.py ├── deutsch-jozsa.py └── qft.py ├── make.bat ├── qcgpu ├── __init__.py ├── backend.py ├── gate.py └── state.py ├── requirements.txt ├── setup.cfg ├── setup.py ├── tests ├── test_gate.py ├── test_gate_application.py └── test_state.py └── working.py /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = false 9 | insert_final_newline = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/c,c++,cuda,linux,macos,windows 3 | 4 | ### C ### 5 | # Prerequisites 6 | *.d 7 | 8 | # Object files 9 | *.o 10 | *.ko 11 | *.obj 12 | *.elf 13 | 14 | # Linker output 15 | *.ilk 16 | *.map 17 | *.exp 18 | 19 | # Precompiled Headers 20 | *.gch 21 | *.pch 22 | 23 | # Libraries 24 | *.lib 25 | *.a 26 | *.la 27 | *.lo 28 | 29 | # Shared objects (inc. Windows DLLs) 30 | *.dll 31 | *.so 32 | *.so.* 33 | *.dylib 34 | 35 | # Executables 36 | *.exe 37 | *.out 38 | *.app 39 | *.i*86 40 | *.x86_64 41 | *.hex 42 | 43 | # Debug files 44 | *.dSYM/ 45 | *.su 46 | *.idb 47 | *.pdb 48 | 49 | # Kernel Module Compile Results 50 | *.mod* 51 | *.cmd 52 | .tmp_versions/ 53 | modules.order 54 | Module.symvers 55 | Mkfile.old 56 | dkms.conf 57 | 58 | ### C++ ### 59 | # Prerequisites 60 | 61 | # Compiled Object files 62 | *.slo 63 | 64 | # Precompiled Headers 65 | 66 | # Compiled Dynamic libraries 67 | 68 | # Fortran module files 69 | *.mod 70 | *.smod 71 | 72 | # Compiled Static libraries 73 | *.lai 74 | 75 | # Executables 76 | 77 | ### CUDA ### 78 | *.i 79 | *.ii 80 | *.gpu 81 | *.ptx 82 | *.cubin 83 | *.fatbin 84 | 85 | ### Linux ### 86 | *~ 87 | 88 | # temporary files which can be created if a process still has a handle open of a deleted file 89 | .fuse_hidden* 90 | 91 | # KDE directory preferences 92 | .directory 93 | 94 | # Linux trash folder which might appear on any partition or disk 95 | .Trash-* 96 | 97 | # .nfs files are created when an open file is removed but is still being accessed 98 | .nfs* 99 | 100 | ### macOS ### 101 | # General 102 | .DS_Store 103 | .AppleDouble 104 | .LSOverride 105 | 106 | # Icon must end with two \r 107 | Icon 108 | 109 | # Thumbnails 110 | ._* 111 | 112 | # Files that might appear in the root of a volume 113 | .DocumentRevisions-V100 114 | .fseventsd 115 | .Spotlight-V100 116 | .TemporaryItems 117 | .Trashes 118 | .VolumeIcon.icns 119 | .com.apple.timemachine.donotpresent 120 | 121 | # Directories potentially created on remote AFP share 122 | .AppleDB 123 | .AppleDesktop 124 | Network Trash Folder 125 | Temporary Items 126 | .apdisk 127 | 128 | ### Windows ### 129 | # Windows thumbnail cache files 130 | Thumbs.db 131 | ehthumbs.db 132 | ehthumbs_vista.db 133 | 134 | # Dump file 135 | *.stackdump 136 | 137 | # Folder config file 138 | [Dd]esktop.ini 139 | 140 | # Recycle Bin used on file shares 141 | $RECYCLE.BIN/ 142 | 143 | # Windows Installer files 144 | *.cab 145 | *.msi 146 | *.msix 147 | *.msm 148 | *.msp 149 | 150 | # Windows shortcuts 151 | *.lnk 152 | 153 | .vscode 154 | 155 | # Byte-compiled / optimized / DLL files 156 | __pycache__/ 157 | *.py[cod] 158 | *$py.class 159 | 160 | # C extensions 161 | *.so 162 | 163 | # Distribution / packaging 164 | .Python 165 | build/ 166 | develop-eggs/ 167 | dist/ 168 | downloads/ 169 | eggs/ 170 | .eggs/ 171 | lib/ 172 | lib64/ 173 | parts/ 174 | sdist/ 175 | var/ 176 | wheels/ 177 | *.egg-info/ 178 | .installed.cfg 179 | *.egg 180 | 181 | # PyInstaller 182 | # Usually these files are written by a python script from a template 183 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 184 | *.manifest 185 | *.spec 186 | 187 | # Installer logs 188 | pip-log.txt 189 | pip-delete-this-directory.txt 190 | 191 | # Unit test / coverage reports 192 | htmlcov/ 193 | .tox/ 194 | .coverage 195 | .coverage.* 196 | .cache 197 | nosetests.xml 198 | coverage.xml 199 | *.cover 200 | .hypothesis/ 201 | 202 | # Translations 203 | *.mo 204 | *.pot 205 | 206 | # Django stuff: 207 | *.log 208 | local_settings.py 209 | 210 | # Flask stuff: 211 | instance/ 212 | .webassets-cache 213 | 214 | # Scrapy stuff: 215 | .scrapy 216 | 217 | # Sphinx documentation 218 | docs/_build/ 219 | 220 | # PyBuilder 221 | target/ 222 | 223 | # Jupyter Notebook 224 | .ipynb_checkpoints 225 | 226 | # pyenv 227 | .python-version 228 | 229 | # celery beat schedule file 230 | celerybeat-schedule 231 | 232 | # SageMath parsed files 233 | *.sage.py 234 | 235 | # Environments 236 | .env 237 | .venv 238 | env/ 239 | venv/ 240 | ENV/ 241 | 242 | # Spyder project settings 243 | .spyderproject 244 | .spyproject 245 | 246 | # Rope project settings 247 | .ropeproject 248 | 249 | # mkdocs documentation 250 | /site 251 | 252 | # mypy 253 | .mypy_cache/ 254 | 255 | # pytest 256 | .pytest_cache 257 | 258 | # End of https://www.gitignore.io/api/c,c++,cuda,linux,macos,windows 259 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: generic 2 | os: osx 3 | 4 | # language: python 5 | # python: 6 | # - "2.7.15" 7 | # - "3.6.6" 8 | # - "3.7-dev" 9 | 10 | # dist: trusty 11 | 12 | # addons: 13 | # apt: 14 | # packages: 15 | # - opencl-headers 16 | # - ocl-icd-opencl-dev 17 | # - fglrx 18 | 19 | git: 20 | depth: false 21 | 22 | install: 23 | # There is sometimes issues with the install order so do this bad boi first 24 | - pip3 install pybind11 25 | - pip3 install -r requirements.txt 26 | - pip3 install -e . 27 | 28 | script: 29 | - python3 setup.py test 30 | 31 | after_success: 32 | - make html 33 | 34 | deploy: 35 | provider: pages 36 | skip-cleanup: true 37 | github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure 38 | keep-history: true 39 | local-dir: ./build/html 40 | on: 41 | branch: master -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Adam Kelly 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = docs 8 | BUILDDIR = build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # Catch-all target: route all unknown targets to Sphinx using the new 17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 18 | %: Makefile 19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # QCGPU 2 | 3 | [![Travis 4 | (.org)](https://img.shields.io/travis/QCGPU/qcgpu.svg?style=for-the-badge)](https://travis-ci.org/QCGPU/qcgpu) 5 | [![PyPi 6 | Version](https://img.shields.io/pypi/v/qcgpu.svg?style=for-the-badge)](https://pypi.python.org/pypi/qcgpu) 7 | [![License](https://img.shields.io/pypi/l/qcgpu.svg?style=for-the-badge)](https://pypi.python.org/pypi/qcgpu/) 8 | [![GitHub 9 | stars](https://img.shields.io/github/stars/qcgpu/qcgpu.svg?style=for-the-badge&label=Stars)](https://github.com/QCGPU/qcgpu) 10 | [![Unitary Fund](https://img.shields.io/badge/Supported%20By-UNITARY%20FUND-brightgreen.svg?style=for-the-badge)](http://unitary.fund) 11 | 12 | Open Source, High Performance & Hardware Accelerated, Quantum Computer 13 | Simulator. Read the [research paper](https://arxiv.org/abs/1805.00988). 14 | 15 | **Features:** 16 | 17 | - Written with OpenCL. Accelerated your simulations with GPUs and other 18 | accelerators, while still running cross device and cross platform. 19 | - Simulation of arbitrary quantum circuits 20 | - Includes example algorithm implementations 21 | - Support for arbitrary gate creation/application, with many built in. 22 | 23 | ## Installing 24 | 25 | This library is distributed on 26 | [PyPI](https://pypi.python.org/pypi/qcgpu) and can be installed using 27 | pip: 28 | 29 | ```bash 30 | $ pip install qcgpu 31 | ``` 32 | 33 | For more information read the full [installing docs](https://qcgpu.github.io/qcgpu/install.html). 34 | -------------------------------------------------------------------------------- /benchmark/Visualize.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 13, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "data": { 10 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAacAAACkCAYAAAAzDOGCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvDW2N/gAAG1FJREFUeJzt3X9M1Pf9B/DnHZoSfhwHIlgERKXGKMohkpsOPZpZsROKgqzGTWUONa1Na2UGNhpHtFqoYZPp5kq0YAZkukYCVYMGI6QTRs4fh9oZU0RAlFVlh4coKnef7x+O+/oZvyv3+XyA5yN5p+V977v3i/O4570/v04lCIIAIiIiBVHLXQAREdH/YjgREZHiMJyIiEhxGE5ERKQ4DCciIlIchhMRESkOw4mIiBSH4URERIrDcCIiIsVhOBERkeIwnIiISHEYTkREpDgMJyIiUhyGExERKQ7DiYiIFIfhREREisNwIiIixWE4ERGR4jCciIhIcRhORESkOAwnIiJSHIYTEREpDsOJiIgUh+FERESKw3AiIiLFYTgREZHijJO7AJLX1q1bYTKZJJ9Xp9Nh3759ks9LRCMDV05jnMlkkjyc5JiTiEYWrpwIOp0OFRUVks0XFRUl2VxENDJx5URERIrDcCIiIsVhOBERkeIwnIiISHEYTkREpDgMJyIiUhyGExERKc6YCaf8/Pwhn18THh6O06dPO6YgkoUgCBAEQe4yhmwk1kz0KmQNp/T0dEydOhUajQY+Pj5YtWoVmpqaJJnbarVi+/btmDhxItzd3ZGQkIAHDx6IxsTFxaG0tFSSekYSPz8/HDp0SNQnCAI0Gg2Ki4tlqqpvgiDg2LFjWLx4McaPH4/x48cjMjISR48eVfSb/s2bN/HRRx/By8sLarUaPj4+SEtLw507d+QujcjhZA2ntWvXwmQywWKxoKGhAYGBgVi9erUk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CfPzxx1i0aBE++ugjUf/q1asRFRWFBQsW2Ff/JpMJP/7xj7Fo0SJ88803cpQ7Yt29exfz5s2Ds7Mzurq6RLclJSVBr9cjKioKRUVFAICtW7ciKioKUVFR8PT0lKPkMUlZx0cSjVGXLl3Co0eP8M033+C9996zHyoMAH/7298AvDgRtPsixDt27MDRo0fh5eWF+Ph4lJWVyVb7SOPl5YWzZ89i5cqVvd5eWFiI4OBg+8/79u0DAFy+fBnZ2dmS1EhcOREpwj//+U+89dZbAIAlS5agurq6x5ji4mLEx8cDeHHlcn9/f7i4uKCjowNPnjyRtN6RzNnZuc8VkEqlwrp16xAbGyv6hgJA/PyT4zGciBSgra1N9KWCbW1totufP3+Oq1evYt68eQCAiRMn4tq1a7h//z6uXbvWYzz9MNnZ2aiqqkJqaipSUlJEt5WVlfV7MQAaXtysR6QAHh4e9qNZLRYLtFqt6PaKigpERUXZf87MzMQHH3wAd3d3zJ07l1cxGSZeXl4AgMjISNEl07777jtMnjwZLi4ucpU25jCciBRgwYIF+OKLL/Czn/0M5eXlPc7JKy4uFn1L9IwZM3DmzBk8ePAAH3/8McaPHy9xxaOTxWKBRqPBjRs3RB8QiouL+9xHNZxMJpPoQ4gUTCaTIk+z4WY9IgXoPnps0aJFcHJyQmBgIHbv3g3gxTUmq6urERkZaR9/+PBhvPnmm1i3bh127twpV9kj0vPnz7FkyRLU1tYiOjoalZWV9uf65z//OSIjI5GcnIzMzEz7fU6cOIHY2FiH1iXXuZhKPQdUJQgDXLeciIhIYlw5ERGR4jCciIhIcRhORESkOAwnIiJSHIYTEREpDsOJiIgUh+FERESKw3AiIiLFYTgREZHiMJyIiEhxGE5ERKQ4DCciIlIchhMRESnO/wG3xCwBo7YRiwAAAABJRU5ErkJggg==\n", 11 | "text/plain": [ 12 | "
" 13 | ] 14 | }, 15 | "metadata": {}, 16 | "output_type": "display_data" 17 | } 18 | ], 19 | "source": [ 20 | "from qiskit import QuantumCircuit, QuantumRegister\n", 21 | "from qiskit.tools.visualization import matplotlib_circuit_drawer, qx_color_scheme\n", 22 | "import math\n", 23 | "\n", 24 | "# Quantum Fourier Transform\n", 25 | "def construct_circuit(num_qubits):\n", 26 | " q = QuantumRegister(num_qubits)\n", 27 | " circ = QuantumCircuit(q)\n", 28 | " \n", 29 | " for j in range(num_qubits):\n", 30 | " for k in range(j):\n", 31 | " circ.cu1(math.pi/float(2**(j-k)), q[j], q[k])\n", 32 | " circ.h(q[j])\n", 33 | "\n", 34 | " return circ\n", 35 | "\n", 36 | "matplotlib_circuit_drawer(construct_circuit(3))" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": 14, 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "from mpl_toolkits.mplot3d import axes3d \n", 46 | "\n", 47 | "import pandas as pd\n", 48 | "import numpy as np\n", 49 | "import matplotlib.pyplot as plt\n", 50 | "from scipy.optimize import curve_fit\n", 51 | "from scipy import stats\n", 52 | "%matplotlib inline" 53 | ] 54 | }, 55 | { 56 | "cell_type": "code", 57 | "execution_count": 15, 58 | "metadata": { 59 | "scrolled": true 60 | }, 61 | "outputs": [], 62 | "source": [ 63 | "df = pd.read_csv('benchmark_data.csv')\n", 64 | "\n", 65 | "NUM_QUBITS = 24\n", 66 | "\n", 67 | "# Pandas Conditions\n", 68 | "qiskit = df['name'] == 'bench_qiskit'\n", 69 | "qcgpu = df['name'] == 'bench_qcgpu'\n", 70 | "projectq = df['name'] == 'bench_projectq'\n", 71 | "\n", 72 | "# Get mean values\n", 73 | "means_qcgpu = []\n", 74 | "means_qiskit = []\n", 75 | "means_projectq = []\n", 76 | "\n", 77 | "for i in range(NUM_QUBITS):\n", 78 | " means_qcgpu.append(df[qcgpu & (df['num_qubits'] == i+1)]['time'].mean())\n", 79 | " means_qiskit.append(df[qiskit & (df['num_qubits'] == i+1)]['time'].mean())\n", 80 | " means_projectq.append(df[projectq & (df['num_qubits'] == i+1)]['time'].mean())" 81 | ] 82 | }, 83 | { 84 | "cell_type": "code", 85 | "execution_count": 16, 86 | "metadata": { 87 | "scrolled": false 88 | }, 89 | "outputs": [ 90 | { 91 | "data": { 92 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEWCAYAAACEz/viAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvDW2N/gAAIABJREFUeJzt3XmYVOWZ9/Hvj6YJjkFRBIbI0mAUF5AWW4IiBkWJJi7EURM1EY2KeeM2k6CgzjvJJBpx1Li9Jg5iJhiJS9xAY1xGRUlQsVvbFQ2CTcAoIGKUoNB03+8f5zQW2HRXN11Vvfw+19VX1Vmec+46FOeu5znnPI8iAjMz69g6FToAMzMrPCcDMzNzMjAzMycDMzPDycDMzHAyMDMznAzMzAwnA7MmkTRK0kJJaySNL3Q8Zi3FycAKQtKpkl6RtFbSe5J+KWn7jOU/kVSdnnTr/i6U9FrGdI2kTzOmL65nP5nb+VDSPEn7b0XoPwX+X0R8MSLu34rtmLUqTgaWd5J+BFwBXABsD4wESoBHJRVnrHpnetKt+/uviNirbhqYC5yTsfznW9jlnen6PYE/AfdKUhNj7py+HQC81pSy9WzDrNVxMrC8krQd8J/AuRHxcERUR0QVcAIwCDgpV/uOiGpgBvDPQI80nu9JWiBptaRHJA3IiDUknS1pIbBQ0qI0xgfSmsYXJH1J0mxJH0h6S9KZGeV/IuluSbdJ+gg4NZ33+3Tex2ntaDdJF0laIWmppHEZ2zgtje9jSYslnZWxbIykZZJ+lJZ9V9JpGcu3kXS1pCWS/i7pT5K2SZeNTGtJH0p6SdKYXB13axucDCzfDgC6AvdmzoyINcBDwLj6CrUESV8ATgWWRsT7ko4BLgaOJak1zAVu36zYeOArwJ4RsQvwV+CotCayDrgDWAZ8CTgO+LmkQzLKHwPcDXQHZqbzjgJ+C+wAvAg8QvJ/cWeSZqj/zii/A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tKHYrGNzr6VmBSRpPPAL4OCIWFLoeKzjcjIwMzM3E5mZmZOBmZnhZGBmZjgZmJkZTgZmZoaTgZmZAf8fbubcqAp+aIwAAAAASUVORK5CYII=\n", 93 | "text/plain": [ 94 | "
" 95 | ] 96 | }, 97 | "metadata": { 98 | "needs_background": "light" 99 | }, 100 | "output_type": "display_data" 101 | } 102 | ], 103 | "source": [ 104 | "xdata = np.arange(1, NUM_QUBITS + 1)\n", 105 | "\n", 106 | "plt.plot(xdata, means_qcgpu, \".\", label=\"QCGPU\")\n", 107 | "plt.plot(xdata, means_qiskit, \".\", label=\"Qiskit\")\n", 108 | "plt.plot(xdata, means_projectq, \".\", label=\"Project Q\")\n", 109 | "\n", 110 | "# def model_func(x, o, c):\n", 111 | "# return ((x ** 2 + x) / 2) * o * (2 ** x) + c\n", 112 | "\n", 113 | "# popt, pcov = curve_fit(model_func, xdata, means_qiskit)\n", 114 | "\n", 115 | "# plt.plot(xdata, model_func(xdata, *popt), label=\"Fitted Curve\")\n", 116 | "\n", 117 | "plt.legend()\n", 118 | "plt.title('QFT Performance')\n", 119 | "plt.xlabel('Number of Qubits')\n", 120 | "plt.ylabel('Runtime (seconds)')\n", 121 | "plt.show()\n" 122 | ] 123 | } 124 | ], 125 | "metadata": { 126 | "kernelspec": { 127 | "display_name": "Python 3", 128 | "language": "python", 129 | "name": "python3" 130 | }, 131 | "language_info": { 132 | "codemirror_mode": { 133 | "name": "ipython", 134 | "version": 3 135 | }, 136 | "file_extension": ".py", 137 | "mimetype": "text/x-python", 138 | "name": "python", 139 | "nbconvert_exporter": "python", 140 | "pygments_lexer": "ipython3", 141 | "version": "3.6.6" 142 | } 143 | }, 144 | "nbformat": 4, 145 | "nbformat_minor": 2 146 | } 147 | -------------------------------------------------------------------------------- /benchmark/benchmark.py: -------------------------------------------------------------------------------- 1 | import click 2 | import time 3 | import random 4 | import statistics 5 | import csv 6 | import os.path 7 | import math 8 | 9 | from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit 10 | from qiskit.wrapper import load_qasm_file 11 | from qiskit import QISKitError, execute, Aer 12 | 13 | from projectq import MainEngine 14 | import projectq.ops as ops 15 | from projectq.backends import Simulator 16 | 17 | import qcgpu 18 | 19 | # Implementation of the Quantum Fourier Transform 20 | def construct_circuit(num_qubits): 21 | q = QuantumRegister(num_qubits) 22 | circ = QuantumCircuit(q) 23 | 24 | # Quantum Fourier Transform 25 | for j in range(num_qubits): 26 | for k in range(j): 27 | circ.cu1(math.pi/float(2**(j-k)), q[j], q[k]) 28 | circ.h(q[j]) 29 | 30 | return circ 31 | 32 | 33 | # Benchmarking functions 34 | qiskit_backend = Aer.get_backend('statevector_simulator') 35 | eng = MainEngine(backend=Simulator(), engine_list=[]) 36 | 37 | # Setup the OpenCL Device 38 | qcgpu.backend.create_context() 39 | 40 | def bench_qiskit(qc): 41 | start = time.time() 42 | job_sim = execute(qc, qiskit_backend) 43 | sim_result = job_sim.result() 44 | return time.time() - start 45 | 46 | def bench_qcgpu(num_qubits): 47 | start = time.time() 48 | state = qcgpu.State(num_qubits) 49 | 50 | for j in range(num_qubits): 51 | for k in range(j): 52 | state.cu1(j, k, math.pi/float(2**(j-k))) 53 | state.h(j) 54 | 55 | state.backend.queue.finish() 56 | return time.time() - start 57 | 58 | def bench_projectq(num_qubits): 59 | start = time.time() 60 | 61 | q = eng.allocate_qureg(num_qubits) 62 | 63 | for j in range(num_qubits): 64 | for k in range(j): 65 | ops.CRz(math.pi / float(2**(j-k))) | (q[j], q[k]) 66 | ops.H | q[j] 67 | eng.flush() 68 | 69 | t = time.time() - start 70 | # measure to get rid of runtime error message 71 | for j in q: 72 | ops.Measure | j 73 | 74 | return t 75 | 76 | 77 | # Reporting 78 | def create_csv(filename): 79 | file_exists = os.path.isfile(filename) 80 | csvfile = open(filename, 'a') 81 | 82 | headers = ['name', 'num_qubits', 'time'] 83 | writer = csv.DictWriter(csvfile, delimiter=',', lineterminator='\n',fieldnames=headers) 84 | 85 | if not file_exists: 86 | writer.writeheader() # file doesn't exist yet, write a header 87 | 88 | return writer 89 | 90 | def write_csv(writer, data): 91 | writer.writerow(data) 92 | 93 | 94 | 95 | @click.command() 96 | @click.option('--samples', default=5, help='Number of samples to take for each qubit.') 97 | @click.option('--qubits', default=5, help='How many qubits you want to test for') 98 | @click.option('--out', default='benchmark_data.csv', help='Where to store the CSV output of each test') 99 | @click.option('--single', default=False, help='Only run the benchmark for a single amount of qubits, and print an analysis') 100 | def benchmark(samples, qubits, out, single): 101 | if single: 102 | # functions = bench_qcgpu, bench_qiskit, bench_projectq 103 | functions = bench_projectq, 104 | times = {f.__name__: [] for f in functions} 105 | 106 | names = [] 107 | means = [] 108 | 109 | qc = construct_circuit(qubits) 110 | # Run the benchmarks 111 | for i in range(samples): 112 | progress = (i) / (samples) 113 | if samples > 1: 114 | print("\rProgress: [{0:50s}] {1:.1f}%".format('#' * int(progress * 50), progress*100), end="", flush=True) 115 | 116 | func = random.choice(functions) 117 | if func.__name__ != 'bench_qiskit': 118 | t = func(qubits) 119 | else: 120 | t = func(qc) 121 | times[func.__name__].append(t) 122 | 123 | print('') 124 | 125 | for name, numbers in times.items(): 126 | print('FUNCTION:', name, 'Used', len(numbers), 'times') 127 | print('\tMEDIAN', statistics.median(numbers)) 128 | print('\tMEAN ', statistics.mean(numbers)) 129 | if len(numbers) > 1: 130 | print('\tSTDEV ', statistics.stdev(numbers)) 131 | 132 | return 133 | 134 | 135 | 136 | functions = bench_qcgpu, bench_qiskit, bench_projectq 137 | # times = {f.__name__: [] for f in functions} 138 | writer = create_csv(out) 139 | 140 | for n in range(23, qubits): 141 | # Progress counter 142 | progress = (n+1) / (qubits) 143 | print("\rProgress: [{0:50s}] {1:.1f}%".format('#' * int(progress * 50), progress*100), end="", flush=True) 144 | 145 | # Construct the circuit 146 | qc = construct_circuit(n+1) 147 | 148 | # Run the benchmarks 149 | for i in range(samples): 150 | func = random.choice(functions) 151 | if func.__name__ != 'bench_qiskit': 152 | t = func(n + 1) 153 | else: 154 | t = func(qc) 155 | # times[func.__name__].append(t) 156 | write_csv(writer, {'name': func.__name__, 'num_qubits': n+1, 'time': t}) 157 | 158 | if __name__ == '__main__': 159 | benchmark() -------------------------------------------------------------------------------- /benchmark/benchmark_data.csv: -------------------------------------------------------------------------------- 1 | name,num_qubits,time 2 | bench_qcgpu,1,0.001962423324584961 3 | bench_projectq,1,0.0064144134521484375 4 | bench_projectq,1,0.00516057014465332 5 | bench_qcgpu,1,0.002281665802001953 6 | bench_projectq,1,0.006537914276123047 7 | bench_projectq,1,0.007903814315795898 8 | bench_qiskit,1,0.0646977424621582 9 | bench_qcgpu,1,0.0010831356048583984 10 | bench_qcgpu,1,0.00032830238342285156 11 | bench_projectq,1,0.004880428314208984 12 | bench_qiskit,1,0.029195547103881836 13 | bench_projectq,1,0.00410914421081543 14 | bench_qcgpu,1,0.0007774829864501953 15 | bench_qcgpu,1,0.00043845176696777344 16 | bench_qcgpu,1,0.0004336833953857422 17 | bench_qcgpu,1,0.00041794776916503906 18 | bench_qcgpu,1,0.00042247772216796875 19 | bench_qiskit,1,0.019387483596801758 20 | bench_projectq,1,0.0026090145111083984 21 | bench_projectq,1,0.0031790733337402344 22 | bench_qcgpu,1,0.0007462501525878906 23 | bench_qiskit,1,0.025688886642456055 24 | bench_qiskit,1,0.02609992027282715 25 | bench_projectq,1,0.0030794143676757812 26 | bench_projectq,1,0.0030028820037841797 27 | bench_qcgpu,1,0.0006074905395507812 28 | bench_qiskit,1,0.017613649368286133 29 | bench_qiskit,1,0.022231101989746094 30 | bench_qiskit,1,0.022557973861694336 31 | bench_projectq,1,0.002870321273803711 32 | bench_qiskit,1,0.024362564086914062 33 | bench_qiskit,1,0.02612900733947754 34 | bench_projectq,1,0.002986907958984375 35 | bench_projectq,1,0.003258943557739258 36 | bench_projectq,1,0.002695798873901367 37 | bench_qiskit,1,0.01965951919555664 38 | bench_qcgpu,1,0.0010139942169189453 39 | bench_projectq,1,0.0027685165405273438 40 | bench_qiskit,1,0.02158188819885254 41 | bench_qiskit,1,0.022047758102416992 42 | bench_qcgpu,1,0.0010657310485839844 43 | bench_projectq,1,0.002878427505493164 44 | bench_projectq,1,0.003093242645263672 45 | bench_qiskit,1,0.017705202102661133 46 | bench_qcgpu,1,0.000652313232421875 47 | bench_projectq,1,0.0022907257080078125 48 | bench_projectq,1,0.0034575462341308594 49 | bench_projectq,1,0.0026972293853759766 50 | bench_projectq,1,0.0026941299438476562 51 | bench_qcgpu,1,0.0003998279571533203 52 | bench_qcgpu,1,0.0003299713134765625 53 | bench_qcgpu,1,0.0003261566162109375 54 | bench_projectq,1,0.0023424625396728516 55 | bench_projectq,1,0.002699136734008789 56 | bench_qcgpu,1,0.00039458274841308594 57 | bench_qcgpu,1,0.0003247261047363281 58 | bench_qcgpu,1,0.000324249267578125 59 | bench_qcgpu,1,0.0003287792205810547 60 | bench_qiskit,1,0.01689600944519043 61 | bench_qiskit,1,0.02729034423828125 62 | bench_projectq,1,0.0024237632751464844 63 | bench_projectq,1,0.003265857696533203 64 | bench_qcgpu,1,0.0006756782531738281 65 | bench_projectq,1,0.0023050308227539062 66 | bench_qiskit,1,0.020470857620239258 67 | bench_projectq,1,0.0031473636627197266 68 | bench_projectq,1,0.003556489944458008 69 | bench_qiskit,1,0.019428491592407227 70 | bench_qiskit,1,0.0313410758972168 71 | bench_qiskit,1,0.02786087989807129 72 | bench_qiskit,1,0.02246403694152832 73 | bench_qiskit,1,0.028017520904541016 74 | bench_qcgpu,1,0.0007491111755371094 75 | bench_qcgpu,1,0.00041222572326660156 76 | bench_qiskit,1,0.02396869659423828 77 | bench_qiskit,1,0.028481483459472656 78 | bench_projectq,1,0.0037505626678466797 79 | bench_qiskit,1,0.023489952087402344 80 | bench_projectq,1,0.003545045852661133 81 | bench_qcgpu,1,0.0011234283447265625 82 | bench_projectq,1,0.0028755664825439453 83 | bench_qiskit,1,0.018468141555786133 84 | bench_qiskit,1,0.0282595157623291 85 | bench_projectq,1,0.0028531551361083984 86 | bench_projectq,1,0.0033202171325683594 87 | bench_qiskit,1,0.021029233932495117 88 | bench_projectq,1,0.002516031265258789 89 | bench_projectq,1,0.00301361083984375 90 | bench_qiskit,1,0.02159595489501953 91 | bench_qiskit,1,0.024035215377807617 92 | bench_qcgpu,1,0.0008740425109863281 93 | bench_qcgpu,1,0.0007131099700927734 94 | bench_qcgpu,1,0.0006916522979736328 95 | bench_qiskit,1,0.02765345573425293 96 | bench_qcgpu,1,0.0010318756103515625 97 | bench_projectq,1,0.0029332637786865234 98 | bench_qcgpu,1,0.0004673004150390625 99 | bench_qcgpu,1,0.0003902912139892578 100 | bench_qcgpu,1,0.00037932395935058594 101 | bench_qiskit,1,0.02129340171813965 102 | bench_projectq,2,0.006117343902587891 103 | bench_qcgpu,2,0.0018062591552734375 104 | bench_qiskit,2,0.02585124969482422 105 | bench_qiskit,2,0.03485584259033203 106 | bench_qiskit,2,0.03109121322631836 107 | bench_qiskit,2,0.0314180850982666 108 | bench_qcgpu,2,0.001161336898803711 109 | bench_qcgpu,2,0.0007605552673339844 110 | bench_projectq,2,0.0012166500091552734 111 | bench_projectq,2,0.0036923885345458984 112 | bench_qcgpu,2,0.0011281967163085938 113 | bench_qiskit,2,0.02260565757751465 114 | bench_qcgpu,2,0.001916646957397461 115 | bench_qiskit,2,0.03398847579956055 116 | bench_qiskit,2,0.03314852714538574 117 | bench_projectq,2,0.0053021907806396484 118 | bench_projectq,2,0.0062808990478515625 119 | bench_projectq,2,0.005654096603393555 120 | bench_qiskit,2,0.022181034088134766 121 | bench_qcgpu,2,0.0010297298431396484 122 | bench_projectq,2,0.004962444305419922 123 | bench_qcgpu,2,0.0011076927185058594 124 | bench_qiskit,2,0.02257680892944336 125 | bench_qcgpu,2,0.0019915103912353516 126 | bench_projectq,2,0.006532192230224609 127 | bench_qiskit,2,0.024515867233276367 128 | bench_projectq,2,0.006519317626953125 129 | bench_qcgpu,2,0.001055002212524414 130 | bench_qiskit,2,0.0241849422454834 131 | bench_qiskit,2,0.033226728439331055 132 | bench_projectq,2,0.006264209747314453 133 | bench_qcgpu,2,0.0012118816375732422 134 | bench_projectq,2,0.005005598068237305 135 | bench_projectq,2,0.005369424819946289 136 | bench_projectq,2,0.00538325309753418 137 | bench_qcgpu,2,0.0010559558868408203 138 | bench_projectq,2,0.005224466323852539 139 | bench_projectq,2,0.00562596321105957 140 | bench_projectq,2,0.0056378841400146484 141 | bench_qiskit,2,0.022062063217163086 142 | bench_qcgpu,2,0.0018661022186279297 143 | bench_qiskit,2,0.031784772872924805 144 | bench_qiskit,2,0.03204631805419922 145 | bench_projectq,2,0.0039064884185791016 146 | bench_projectq,2,0.005011081695556641 147 | bench_qcgpu,2,0.0010540485382080078 148 | bench_qcgpu,2,0.0009753704071044922 149 | bench_qcgpu,2,0.0008213520050048828 150 | bench_projectq,2,0.005230426788330078 151 | bench_qiskit,2,0.02205491065979004 152 | bench_qcgpu,2,0.001840829849243164 153 | bench_qiskit,2,0.03095102310180664 154 | bench_qcgpu,2,0.0015485286712646484 155 | bench_qiskit,2,0.02521824836730957 156 | bench_qiskit,2,0.02968740463256836 157 | bench_qcgpu,2,0.0018889904022216797 158 | bench_projectq,2,0.0031774044036865234 159 | bench_projectq,2,0.005417823791503906 160 | bench_qiskit,2,0.023447751998901367 161 | bench_qiskit,2,0.03049468994140625 162 | bench_qcgpu,2,0.0018086433410644531 163 | bench_qiskit,2,0.030115842819213867 164 | bench_qiskit,2,0.03269696235656738 165 | bench_qcgpu,2,0.0017845630645751953 166 | bench_qcgpu,2,0.001435995101928711 167 | bench_qcgpu,2,0.001438140869140625 168 | bench_projectq,2,0.0061376094818115234 169 | bench_qiskit,2,0.02513265609741211 170 | bench_qcgpu,2,0.00165557861328125 171 | bench_projectq,2,0.006384134292602539 172 | bench_qcgpu,2,0.0008692741394042969 173 | bench_qcgpu,2,0.00075531005859375 174 | bench_qiskit,2,0.02520012855529785 175 | bench_projectq,2,0.0054662227630615234 176 | bench_qiskit,2,0.024279117584228516 177 | bench_projectq,2,0.006216764450073242 178 | bench_qiskit,2,0.023524761199951172 179 | bench_qiskit,2,0.033056020736694336 180 | bench_projectq,2,0.007993698120117188 181 | bench_qcgpu,2,0.0011463165283203125 182 | bench_qiskit,2,0.023265838623046875 183 | bench_qcgpu,2,0.0017521381378173828 184 | bench_projectq,2,0.0055561065673828125 185 | bench_projectq,2,0.005369424819946289 186 | bench_qiskit,2,0.021652936935424805 187 | bench_qcgpu,2,0.0011365413665771484 188 | bench_projectq,2,0.005049467086791992 189 | bench_projectq,2,0.0052089691162109375 190 | bench_qcgpu,2,0.0009872913360595703 191 | bench_projectq,2,0.006253480911254883 192 | bench_qcgpu,2,0.0012936592102050781 193 | bench_qcgpu,2,0.00078582763671875 194 | bench_qiskit,2,0.023669004440307617 195 | bench_qcgpu,2,0.001188039779663086 196 | bench_qiskit,2,0.027714967727661133 197 | bench_projectq,2,0.0060994625091552734 198 | bench_qcgpu,2,0.0010247230529785156 199 | bench_projectq,2,0.005069732666015625 200 | bench_qiskit,2,0.022353649139404297 201 | bench_qiskit,2,0.030964374542236328 202 | bench_qiskit,3,0.03610062599182129 203 | bench_qiskit,3,0.038137197494506836 204 | bench_qcgpu,3,0.0030918121337890625 205 | bench_qiskit,3,0.03485822677612305 206 | bench_qcgpu,3,0.0013797283172607422 207 | bench_projectq,3,0.0030765533447265625 208 | bench_projectq,3,0.009647846221923828 209 | bench_projectq,3,0.010111331939697266 210 | bench_qiskit,3,0.028271913528442383 211 | bench_qcgpu,3,0.0028870105743408203 212 | bench_qcgpu,3,0.0026302337646484375 213 | bench_qcgpu,3,0.002493143081665039 214 | bench_qiskit,3,0.03290534019470215 215 | bench_qcgpu,3,0.0030260086059570312 216 | bench_qcgpu,3,0.0024611949920654297 217 | bench_qcgpu,3,0.0016841888427734375 218 | bench_qiskit,3,0.03603863716125488 219 | bench_projectq,3,0.00373077392578125 220 | bench_qiskit,3,0.0319819450378418 221 | bench_qiskit,3,0.03288912773132324 222 | bench_qiskit,3,0.03781914710998535 223 | bench_qiskit,3,0.03442072868347168 224 | bench_qiskit,3,0.041608572006225586 225 | bench_qiskit,3,0.07282447814941406 226 | bench_projectq,3,0.006039619445800781 227 | bench_projectq,3,0.0083770751953125 228 | bench_qcgpu,3,0.0015559196472167969 229 | bench_qcgpu,3,0.0011510848999023438 230 | bench_qiskit,3,0.025821685791015625 231 | bench_qiskit,3,0.03526449203491211 232 | bench_qcgpu,3,0.0017118453979492188 233 | bench_qiskit,3,0.03512883186340332 234 | bench_projectq,3,0.004452943801879883 235 | bench_projectq,3,0.009696722030639648 236 | bench_qcgpu,3,0.0015072822570800781 237 | bench_qcgpu,3,0.0011200904846191406 238 | bench_qiskit,3,0.025707483291625977 239 | bench_qiskit,3,0.032416582107543945 240 | bench_projectq,3,0.011788129806518555 241 | bench_qcgpu,3,0.0015180110931396484 242 | bench_projectq,3,0.009376764297485352 243 | bench_qiskit,3,0.026602983474731445 244 | bench_qiskit,3,0.033234596252441406 245 | bench_qcgpu,3,0.002297639846801758 246 | bench_projectq,3,0.009259939193725586 247 | bench_qiskit,3,0.033036231994628906 248 | bench_qiskit,3,0.03497958183288574 249 | bench_qiskit,3,0.0386204719543457 250 | bench_projectq,3,0.0012371540069580078 251 | bench_qiskit,3,0.03392362594604492 252 | bench_projectq,3,0.012619972229003906 253 | bench_projectq,3,0.009383678436279297 254 | bench_projectq,3,0.010889530181884766 255 | bench_qcgpu,3,0.0016663074493408203 256 | bench_qcgpu,3,0.0011265277862548828 257 | bench_qiskit,3,0.029111623764038086 258 | bench_qcgpu,3,0.0017337799072265625 259 | bench_qiskit,3,0.03595113754272461 260 | bench_qcgpu,3,0.0032258033752441406 261 | bench_qcgpu,3,0.002817869186401367 262 | bench_qiskit,3,0.035523176193237305 263 | bench_qiskit,3,0.0397186279296875 264 | bench_qiskit,3,0.0383296012878418 265 | bench_qcgpu,3,0.0030639171600341797 266 | bench_qiskit,3,0.037631988525390625 267 | bench_qcgpu,3,0.0017108917236328125 268 | bench_projectq,3,0.004287242889404297 269 | bench_qcgpu,3,0.0013670921325683594 270 | bench_qiskit,3,0.030469655990600586 271 | bench_projectq,3,0.009677648544311523 272 | bench_projectq,3,0.009698629379272461 273 | bench_projectq,3,0.00968027114868164 274 | bench_qiskit,3,0.026366233825683594 275 | bench_qiskit,3,0.03621530532836914 276 | bench_qiskit,3,0.03922605514526367 277 | bench_projectq,3,0.0034704208374023438 278 | bench_projectq,3,0.009805917739868164 279 | bench_projectq,3,0.009803295135498047 280 | bench_qiskit,3,0.026273727416992188 281 | bench_qiskit,3,0.034148454666137695 282 | bench_qcgpu,3,0.00321197509765625 283 | bench_qcgpu,3,0.0025899410247802734 284 | bench_qiskit,3,0.03392624855041504 285 | bench_qiskit,3,0.03922867774963379 286 | bench_projectq,3,0.010303974151611328 287 | bench_qcgpu,3,0.0014870166778564453 288 | bench_qiskit,3,0.030937910079956055 289 | bench_qiskit,3,0.03242993354797363 290 | bench_projectq,3,0.007639408111572266 291 | bench_projectq,3,0.009718894958496094 292 | bench_projectq,3,0.010268449783325195 293 | bench_projectq,3,0.009748220443725586 294 | bench_qiskit,3,0.028675556182861328 295 | bench_qcgpu,3,0.0016942024230957031 296 | bench_qcgpu,3,0.0011131763458251953 297 | bench_projectq,3,0.010548114776611328 298 | bench_qiskit,3,0.033821821212768555 299 | bench_qcgpu,3,0.0023539066314697266 300 | bench_qiskit,3,0.03493309020996094 301 | bench_projectq,3,0.007304668426513672 302 | bench_qcgpu,4,0.002155303955078125 303 | bench_projectq,4,0.01566290855407715 304 | bench_qiskit,4,0.038002729415893555 305 | bench_qcgpu,4,0.0027794837951660156 306 | bench_qiskit,4,0.04594016075134277 307 | bench_projectq,4,0.004345417022705078 308 | bench_qiskit,4,0.03554081916809082 309 | bench_projectq,4,0.01691269874572754 310 | bench_qcgpu,4,0.002305746078491211 311 | bench_qcgpu,4,0.0018181800842285156 312 | bench_qiskit,4,0.035675048828125 313 | bench_qcgpu,4,0.002337217330932617 314 | bench_qiskit,4,0.04153800010681152 315 | bench_projectq,4,0.005130767822265625 316 | bench_qiskit,4,0.03943061828613281 317 | bench_qiskit,4,0.04070329666137695 318 | bench_projectq,4,0.0041027069091796875 319 | bench_qiskit,4,0.04175996780395508 320 | bench_projectq,4,0.016085147857666016 321 | bench_qcgpu,4,0.0022313594818115234 322 | bench_qiskit,4,0.035205841064453125 323 | bench_qcgpu,4,0.004445791244506836 324 | bench_qcgpu,4,0.004261970520019531 325 | bench_qcgpu,4,0.002206087112426758 326 | bench_projectq,4,0.01697540283203125 327 | bench_qcgpu,4,0.001922607421875 328 | bench_qcgpu,4,0.0017597675323486328 329 | bench_qiskit,4,0.0394132137298584 330 | bench_qiskit,4,0.04159998893737793 331 | bench_qcgpu,4,0.0022521018981933594 332 | bench_qiskit,4,0.04752707481384277 333 | bench_qiskit,4,0.04730629920959473 334 | bench_projectq,4,0.002825498580932617 335 | bench_qcgpu,4,0.0021893978118896484 336 | bench_projectq,4,0.002633810043334961 337 | bench_projectq,4,0.01568007469177246 338 | bench_qiskit,4,0.036527156829833984 339 | bench_qcgpu,4,0.0021965503692626953 340 | bench_qiskit,4,0.04189443588256836 341 | bench_qcgpu,4,0.004714488983154297 342 | bench_projectq,4,0.0034170150756835938 343 | bench_projectq,4,0.015359878540039062 344 | bench_qcgpu,4,0.0022487640380859375 345 | bench_qiskit,4,0.03633713722229004 346 | bench_projectq,4,0.016309022903442383 347 | bench_qiskit,4,0.03885769844055176 348 | bench_qcgpu,4,0.003755807876586914 349 | bench_qcgpu,4,0.001787424087524414 350 | bench_qcgpu,4,0.0017330646514892578 351 | bench_qcgpu,4,0.0017147064208984375 352 | bench_qcgpu,4,0.0017943382263183594 353 | bench_projectq,4,0.01598358154296875 354 | bench_qcgpu,4,0.0021774768829345703 355 | bench_projectq,4,0.017017364501953125 356 | bench_qiskit,4,0.03524947166442871 357 | bench_qcgpu,4,0.0020554065704345703 358 | bench_projectq,4,0.017140626907348633 359 | bench_projectq,4,0.015693187713623047 360 | bench_qcgpu,4,0.0019183158874511719 361 | bench_qiskit,4,0.04208779335021973 362 | bench_projectq,4,0.017177820205688477 363 | bench_qiskit,4,0.03527402877807617 364 | bench_projectq,4,0.01725625991821289 365 | bench_qiskit,4,0.046924591064453125 366 | bench_projectq,4,0.015723705291748047 367 | bench_qiskit,4,0.038454294204711914 368 | bench_qcgpu,4,0.0022182464599609375 369 | bench_qcgpu,4,0.0017578601837158203 370 | bench_qcgpu,4,0.0021147727966308594 371 | bench_projectq,4,0.017376184463500977 372 | bench_projectq,4,0.0157010555267334 373 | bench_projectq,4,0.015698671340942383 374 | bench_qiskit,4,0.03785133361816406 375 | bench_projectq,4,0.016474485397338867 376 | bench_qcgpu,4,0.002244710922241211 377 | bench_projectq,4,0.01599287986755371 378 | bench_qiskit,4,0.03677487373352051 379 | bench_qcgpu,4,0.002373933792114258 380 | bench_qiskit,4,0.0407412052154541 381 | bench_qiskit,4,0.0432276725769043 382 | bench_qcgpu,4,0.0025424957275390625 383 | bench_qiskit,4,0.04749703407287598 384 | bench_qcgpu,4,0.0021207332611083984 385 | bench_qcgpu,4,0.0016789436340332031 386 | bench_qiskit,4,0.04375195503234863 387 | bench_projectq,4,0.003159761428833008 388 | bench_qcgpu,4,0.0024995803833007812 389 | bench_projectq,4,0.01629495620727539 390 | bench_qiskit,4,0.03534197807312012 391 | bench_projectq,4,0.015622615814208984 392 | bench_projectq,4,0.015475749969482422 393 | bench_projectq,4,0.015644550323486328 394 | bench_qiskit,4,0.03529715538024902 395 | bench_qiskit,4,0.0410914421081543 396 | bench_qiskit,4,0.04465651512145996 397 | bench_qiskit,4,0.05100512504577637 398 | bench_qiskit,4,0.04842424392700195 399 | bench_qcgpu,4,0.002248525619506836 400 | bench_qcgpu,4,0.0017631053924560547 401 | bench_projectq,4,0.003973484039306641 402 | bench_projectq,5,0.023391246795654297 403 | bench_qiskit,5,0.04813241958618164 404 | bench_qiskit,5,0.05422019958496094 405 | bench_projectq,5,0.0019237995147705078 406 | bench_qcgpu,5,0.003385305404663086 407 | bench_projectq,5,0.024191856384277344 408 | bench_projectq,5,0.023801565170288086 409 | bench_qiskit,5,0.0472722053527832 410 | bench_qcgpu,5,0.003949880599975586 411 | bench_projectq,5,0.015013694763183594 412 | bench_projectq,5,0.023354053497314453 413 | bench_qiskit,5,0.04759573936462402 414 | bench_qiskit,5,0.05793952941894531 415 | bench_qcgpu,5,0.007182598114013672 416 | bench_qcgpu,5,0.006039142608642578 417 | bench_qcgpu,5,0.0024111270904541016 418 | bench_qiskit,5,0.05495738983154297 419 | bench_projectq,5,0.005318641662597656 420 | bench_projectq,5,0.02258920669555664 421 | bench_qiskit,5,0.04839897155761719 422 | bench_qiskit,5,0.051096200942993164 423 | bench_qcgpu,5,0.002963542938232422 424 | bench_qcgpu,5,0.002633810043334961 425 | bench_projectq,5,0.0042266845703125 426 | bench_qcgpu,5,0.002732992172241211 427 | bench_qiskit,5,0.048856496810913086 428 | bench_qiskit,5,0.048726797103881836 429 | bench_qcgpu,5,0.0035696029663085938 430 | bench_qcgpu,5,0.0031774044036865234 431 | bench_qcgpu,5,0.003209352493286133 432 | bench_projectq,5,0.0024623870849609375 433 | bench_qcgpu,5,0.0032651424407958984 434 | bench_qcgpu,5,0.0031723976135253906 435 | bench_qcgpu,5,0.002474069595336914 436 | bench_projectq,5,0.025297880172729492 437 | bench_qiskit,5,0.04922604560852051 438 | bench_projectq,5,0.01619434356689453 439 | bench_projectq,5,0.0027904510498046875 440 | bench_qiskit,5,0.054360151290893555 441 | bench_qcgpu,5,0.006102085113525391 442 | bench_projectq,5,0.003710508346557617 443 | bench_qiskit,5,0.05108642578125 444 | bench_qcgpu,5,0.005787372589111328 445 | bench_qiskit,5,0.056116342544555664 446 | bench_projectq,5,0.005460023880004883 447 | bench_qiskit,5,0.0565645694732666 448 | bench_qiskit,5,0.05191493034362793 449 | bench_qiskit,5,0.05590987205505371 450 | bench_qiskit,5,0.08318519592285156 451 | bench_projectq,5,0.0034835338592529297 452 | bench_projectq,5,0.024052858352661133 453 | bench_projectq,5,0.03070998191833496 454 | bench_qcgpu,5,0.003939628601074219 455 | bench_projectq,5,0.023311138153076172 456 | bench_projectq,5,0.023597240447998047 457 | bench_qcgpu,5,0.002946138381958008 458 | bench_qcgpu,5,0.0024666786193847656 459 | bench_qiskit,5,0.049653053283691406 460 | bench_qiskit,5,0.053795814514160156 461 | bench_qiskit,5,0.05646872520446777 462 | bench_qiskit,5,0.06086897850036621 463 | bench_qcgpu,5,0.002931833267211914 464 | bench_qcgpu,5,0.0025589466094970703 465 | bench_qiskit,5,0.05441641807556152 466 | bench_projectq,5,0.0059397220611572266 467 | bench_qiskit,5,0.055301666259765625 468 | bench_qcgpu,5,0.0030951499938964844 469 | bench_qiskit,5,0.05721783638000488 470 | bench_qcgpu,5,0.0029888153076171875 471 | bench_projectq,5,0.0032196044921875 472 | bench_projectq,5,0.02322244644165039 473 | bench_qcgpu,5,0.0032334327697753906 474 | bench_qiskit,5,0.05413699150085449 475 | bench_projectq,5,0.005002260208129883 476 | bench_qcgpu,5,0.003136873245239258 477 | bench_projectq,5,0.025280237197875977 478 | bench_projectq,5,0.02765822410583496 479 | bench_qcgpu,5,0.004632234573364258 480 | bench_qiskit,5,0.05007767677307129 481 | bench_qiskit,5,0.056459903717041016 482 | bench_qcgpu,5,0.005068063735961914 483 | bench_qcgpu,5,0.004487276077270508 484 | bench_projectq,5,0.00443577766418457 485 | bench_qiskit,5,0.04870438575744629 486 | bench_qcgpu,5,0.004992961883544922 487 | bench_projectq,5,0.007152557373046875 488 | bench_qcgpu,5,0.003134012222290039 489 | bench_qcgpu,5,0.0027561187744140625 490 | bench_qiskit,5,0.0536189079284668 491 | bench_projectq,5,0.014518499374389648 492 | bench_qiskit,5,0.04993748664855957 493 | bench_projectq,5,0.014242887496948242 494 | bench_qcgpu,5,0.0030565261840820312 495 | bench_qcgpu,5,0.0024771690368652344 496 | bench_qcgpu,5,0.0026788711547851562 497 | bench_projectq,5,0.025208711624145508 498 | bench_projectq,5,0.02325272560119629 499 | bench_projectq,5,0.023048877716064453 500 | bench_projectq,5,0.023125886917114258 501 | bench_projectq,5,0.023388147354125977 502 | bench_qiskit,6,0.07030320167541504 503 | bench_qiskit,6,0.0693666934967041 504 | bench_projectq,6,0.008496999740600586 505 | bench_projectq,6,0.040959835052490234 506 | bench_qiskit,6,0.06695437431335449 507 | bench_projectq,6,0.008294820785522461 508 | bench_projectq,6,0.042360544204711914 509 | bench_qiskit,6,0.07561588287353516 510 | bench_qiskit,6,0.07330155372619629 511 | bench_projectq,6,0.004426002502441406 512 | bench_qcgpu,6,0.003972291946411133 513 | bench_projectq,6,0.032913923263549805 514 | bench_projectq,6,0.03242850303649902 515 | bench_qiskit,6,0.06464600563049316 516 | bench_qiskit,6,0.0733492374420166 517 | bench_qiskit,6,0.07474398612976074 518 | bench_qiskit,6,0.07402205467224121 519 | bench_projectq,6,0.004244089126586914 520 | bench_qcgpu,6,0.004128456115722656 521 | bench_qiskit,6,0.07255721092224121 522 | bench_qiskit,6,0.0738523006439209 523 | bench_qiskit,6,0.07482099533081055 524 | bench_projectq,6,0.013962507247924805 525 | bench_projectq,6,0.03365039825439453 526 | bench_qiskit,6,0.06877589225769043 527 | bench_qcgpu,6,0.007294654846191406 528 | bench_qiskit,6,0.07383441925048828 529 | bench_qiskit,6,0.0810842514038086 530 | bench_qiskit,6,0.07355332374572754 531 | bench_projectq,6,0.007880687713623047 532 | bench_qcgpu,6,0.004165172576904297 533 | bench_qiskit,6,0.06701993942260742 534 | bench_projectq,6,0.0064394474029541016 535 | bench_qiskit,6,0.06934881210327148 536 | bench_projectq,6,0.003643512725830078 537 | bench_projectq,6,0.03244423866271973 538 | bench_qiskit,6,0.09441924095153809 539 | bench_qiskit,6,0.08524584770202637 540 | bench_qiskit,6,0.07708573341369629 541 | bench_qiskit,6,0.07621026039123535 542 | bench_projectq,6,0.004530191421508789 543 | bench_projectq,6,0.041268110275268555 544 | bench_qiskit,6,0.0658121109008789 545 | bench_qcgpu,6,0.007410764694213867 546 | bench_projectq,6,0.004231929779052734 547 | bench_qiskit,6,0.06690812110900879 548 | bench_qiskit,6,0.07569766044616699 549 | bench_qcgpu,6,0.004998922348022461 550 | bench_qcgpu,6,0.0044422149658203125 551 | bench_qiskit,6,0.06934452056884766 552 | bench_qiskit,6,0.07122516632080078 553 | bench_projectq,6,0.0037131309509277344 554 | bench_projectq,6,0.033354759216308594 555 | bench_projectq,6,0.04246234893798828 556 | bench_qiskit,6,0.06906580924987793 557 | bench_qcgpu,6,0.003927707672119141 558 | bench_qcgpu,6,0.003573894500732422 559 | bench_qcgpu,6,0.003449678421020508 560 | bench_qiskit,6,0.07009673118591309 561 | bench_projectq,6,0.00587010383605957 562 | bench_qiskit,6,0.060979366302490234 563 | bench_projectq,6,0.004376888275146484 564 | bench_qiskit,6,0.06285548210144043 565 | bench_projectq,6,0.0035500526428222656 566 | bench_projectq,6,0.03185081481933594 567 | bench_projectq,6,0.03282666206359863 568 | bench_projectq,6,0.03170061111450195 569 | bench_projectq,6,0.03286480903625488 570 | bench_qiskit,6,0.06558895111083984 571 | bench_qcgpu,6,0.0052945613861083984 572 | bench_qcgpu,6,0.004431009292602539 573 | bench_qiskit,6,0.06979179382324219 574 | bench_projectq,6,0.004244089126586914 575 | bench_qiskit,6,0.06813693046569824 576 | bench_qiskit,6,0.07830262184143066 577 | bench_projectq,6,0.0109405517578125 578 | bench_projectq,6,0.03898048400878906 579 | bench_qiskit,6,0.06637215614318848 580 | bench_projectq,6,0.011750459671020508 581 | bench_qiskit,6,0.06674790382385254 582 | bench_qcgpu,6,0.00474238395690918 583 | bench_qcgpu,6,0.004576206207275391 584 | bench_qiskit,6,0.0728447437286377 585 | bench_projectq,6,0.006310224533081055 586 | bench_qiskit,6,0.0672752857208252 587 | bench_qiskit,6,0.07990598678588867 588 | bench_qiskit,6,0.07838201522827148 589 | bench_projectq,6,0.011177778244018555 590 | bench_projectq,6,0.0385136604309082 591 | bench_qiskit,6,0.07500076293945312 592 | bench_qiskit,6,0.07135915756225586 593 | bench_qiskit,6,0.07373166084289551 594 | bench_qiskit,6,0.09889650344848633 595 | bench_qiskit,6,0.07453012466430664 596 | bench_qcgpu,6,0.004063606262207031 597 | bench_projectq,6,0.0036115646362304688 598 | bench_projectq,6,0.03197836875915527 599 | bench_qcgpu,6,0.003802061080932617 600 | bench_projectq,6,0.03389310836791992 601 | bench_projectq,6,0.032488107681274414 602 | bench_qiskit,7,0.07985186576843262 603 | bench_qcgpu,7,0.00587773323059082 604 | bench_qiskit,7,0.09048748016357422 605 | bench_qiskit,7,0.0912177562713623 606 | bench_projectq,7,0.007252693176269531 607 | bench_qcgpu,7,0.00656890869140625 608 | bench_qiskit,7,0.09772205352783203 609 | bench_projectq,7,0.025481700897216797 610 | bench_qiskit,7,0.08533668518066406 611 | bench_qiskit,7,0.09988546371459961 612 | bench_qcgpu,7,0.0069773197174072266 613 | bench_qiskit,7,0.0924539566040039 614 | bench_qcgpu,7,0.007784366607666016 615 | bench_projectq,7,0.007693052291870117 616 | bench_qcgpu,7,0.007127046585083008 617 | bench_qiskit,7,0.09587287902832031 618 | bench_qcgpu,7,0.005118131637573242 619 | bench_qcgpu,7,0.004594087600708008 620 | bench_qcgpu,7,0.004754781723022461 621 | bench_qiskit,7,0.08878946304321289 622 | bench_qiskit,7,0.09342837333679199 623 | bench_qcgpu,7,0.004999637603759766 624 | bench_qcgpu,7,0.005388021469116211 625 | bench_qcgpu,7,0.006006956100463867 626 | bench_qiskit,7,0.09053897857666016 627 | bench_projectq,7,0.005655765533447266 628 | bench_qcgpu,7,0.005387544631958008 629 | bench_projectq,7,0.04345250129699707 630 | bench_qiskit,7,0.08874845504760742 631 | bench_projectq,7,0.007445812225341797 632 | bench_qiskit,7,0.09100198745727539 633 | bench_qcgpu,7,0.005222797393798828 634 | bench_qiskit,7,0.08863615989685059 635 | bench_qcgpu,7,0.0070819854736328125 636 | bench_projectq,7,0.07014822959899902 637 | bench_qiskit,7,0.1414649486541748 638 | bench_qcgpu,7,0.008441925048828125 639 | bench_projectq,7,0.007010936737060547 640 | bench_qiskit,7,0.09977602958679199 641 | bench_projectq,7,0.04537320137023926 642 | bench_qcgpu,7,0.005682945251464844 643 | bench_qiskit,7,0.1073615550994873 644 | bench_projectq,7,0.04838204383850098 645 | bench_projectq,7,0.05107235908508301 646 | bench_projectq,7,0.043486833572387695 647 | bench_qiskit,7,0.08809876441955566 648 | bench_qcgpu,7,0.007997751235961914 649 | bench_projectq,7,0.005470991134643555 650 | bench_qcgpu,7,0.0052759647369384766 651 | bench_projectq,7,0.04597115516662598 652 | bench_projectq,7,0.04380059242248535 653 | bench_qcgpu,7,0.005348682403564453 654 | bench_projectq,7,0.04286932945251465 655 | bench_qiskit,7,0.08327174186706543 656 | bench_qiskit,7,0.09125590324401855 657 | bench_projectq,7,0.003507852554321289 658 | bench_qcgpu,7,0.006411314010620117 659 | bench_projectq,7,0.05380511283874512 660 | bench_qiskit,7,0.0842750072479248 661 | bench_projectq,7,0.012135744094848633 662 | bench_qiskit,7,0.08490514755249023 663 | bench_qiskit,7,0.08854532241821289 664 | bench_qcgpu,7,0.0053293704986572266 665 | bench_qcgpu,7,0.005850553512573242 666 | bench_projectq,7,0.012939453125 667 | bench_projectq,7,0.004267692565917969 668 | bench_qiskit,7,0.08519649505615234 669 | bench_qcgpu,7,0.008089065551757812 670 | bench_qiskit,7,0.08895635604858398 671 | bench_projectq,7,0.0040740966796875 672 | bench_qcgpu,7,0.005337715148925781 673 | bench_projectq,7,0.04402637481689453 674 | bench_qcgpu,7,0.005074262619018555 675 | bench_qiskit,7,0.08806538581848145 676 | bench_qiskit,7,0.09191679954528809 677 | bench_projectq,7,0.005216121673583984 678 | bench_qcgpu,7,0.005246639251708984 679 | bench_qcgpu,7,0.004764080047607422 680 | bench_qcgpu,7,0.004773616790771484 681 | bench_qiskit,7,0.08751225471496582 682 | bench_qcgpu,7,0.005328655242919922 683 | bench_qiskit,7,0.08709263801574707 684 | bench_qcgpu,7,0.0061588287353515625 685 | bench_qcgpu,7,0.005850553512573242 686 | bench_projectq,7,0.012055635452270508 687 | bench_projectq,7,0.04292702674865723 688 | bench_qiskit,7,0.08011412620544434 689 | bench_qcgpu,7,0.006253242492675781 690 | bench_projectq,7,0.00937795639038086 691 | bench_qiskit,7,0.08934617042541504 692 | bench_qiskit,7,0.1186971664428711 693 | bench_qiskit,7,0.09080696105957031 694 | bench_qiskit,7,0.08962035179138184 695 | bench_qcgpu,7,0.006632804870605469 696 | bench_qiskit,7,0.09104800224304199 697 | bench_qcgpu,7,0.011258363723754883 698 | bench_projectq,7,0.007095813751220703 699 | bench_qcgpu,7,0.004898786544799805 700 | bench_projectq,7,0.04218459129333496 701 | bench_qcgpu,7,0.0049953460693359375 702 | bench_qiskit,8,0.10343599319458008 703 | bench_qcgpu,8,0.00641632080078125 704 | bench_qiskit,8,0.11151814460754395 705 | bench_qcgpu,8,0.006227254867553711 706 | bench_qcgpu,8,0.006996631622314453 707 | bench_qiskit,8,0.10956096649169922 708 | bench_projectq,8,0.0047817230224609375 709 | bench_qiskit,8,0.10384464263916016 710 | bench_qiskit,8,0.11056137084960938 711 | bench_projectq,8,0.005670309066772461 712 | bench_projectq,8,0.051526546478271484 713 | bench_projectq,8,0.05062103271484375 714 | bench_projectq,8,0.04952692985534668 715 | bench_qiskit,8,0.0994877815246582 716 | bench_projectq,8,0.005328655242919922 717 | bench_qiskit,8,0.10359787940979004 718 | bench_qcgpu,8,0.006457805633544922 719 | bench_qcgpu,8,0.007043361663818359 720 | bench_qiskit,8,0.15238165855407715 721 | bench_qiskit,8,0.11613798141479492 722 | bench_qiskit,8,0.1112828254699707 723 | bench_projectq,8,0.008939504623413086 724 | bench_qcgpu,8,0.007081747055053711 725 | bench_qcgpu,8,0.006981372833251953 726 | bench_projectq,8,0.03673911094665527 727 | bench_qcgpu,8,0.008614063262939453 728 | bench_projectq,8,0.07011032104492188 729 | bench_qcgpu,8,0.008247137069702148 730 | bench_qiskit,8,0.11575675010681152 731 | bench_qcgpu,8,0.01056051254272461 732 | bench_qiskit,8,0.11287307739257812 733 | bench_qiskit,8,0.11524081230163574 734 | bench_projectq,8,0.012280702590942383 735 | bench_qiskit,8,0.11344742774963379 736 | bench_qcgpu,8,0.006713151931762695 737 | bench_projectq,8,0.007052421569824219 738 | bench_qiskit,8,0.12094926834106445 739 | bench_qcgpu,8,0.006514787673950195 740 | bench_qcgpu,8,0.007123708724975586 741 | bench_qiskit,8,0.11047720909118652 742 | bench_qcgpu,8,0.006605386734008789 743 | bench_qcgpu,8,0.006123065948486328 744 | bench_qiskit,8,0.10580325126647949 745 | bench_projectq,8,0.00911569595336914 746 | bench_projectq,8,0.04978489875793457 747 | bench_qcgpu,8,0.007750511169433594 748 | bench_qcgpu,8,0.006268978118896484 749 | bench_qcgpu,8,0.00600743293762207 750 | bench_qcgpu,8,0.00629115104675293 751 | bench_projectq,8,0.02229022979736328 752 | bench_projectq,8,0.047301292419433594 753 | bench_qiskit,8,0.1363058090209961 754 | bench_qiskit,8,0.11098384857177734 755 | bench_qcgpu,8,0.006348848342895508 756 | bench_qcgpu,8,0.00701141357421875 757 | bench_qiskit,8,0.10654234886169434 758 | bench_projectq,8,0.003645658493041992 759 | bench_projectq,8,0.004462003707885742 760 | bench_qcgpu,8,0.006548643112182617 761 | bench_qiskit,8,0.10408973693847656 762 | bench_qiskit,8,0.11820721626281738 763 | bench_qiskit,8,0.10998272895812988 764 | bench_qcgpu,8,0.006488800048828125 765 | bench_projectq,8,0.01010274887084961 766 | bench_projectq,8,0.05062055587768555 767 | bench_projectq,8,0.05006980895996094 768 | bench_qcgpu,8,0.006421566009521484 769 | bench_qcgpu,8,0.006193399429321289 770 | bench_qcgpu,8,0.005995273590087891 771 | bench_qcgpu,8,0.0062103271484375 772 | bench_projectq,8,0.025077104568481445 773 | bench_projectq,8,0.0044612884521484375 774 | bench_projectq,8,0.052384376525878906 775 | bench_projectq,8,0.045568227767944336 776 | bench_qcgpu,8,0.006674528121948242 777 | bench_qcgpu,8,0.006311178207397461 778 | bench_qcgpu,8,0.006304740905761719 779 | bench_projectq,8,0.05555534362792969 780 | bench_projectq,8,0.04996967315673828 781 | bench_qcgpu,8,0.006510257720947266 782 | bench_projectq,8,0.05463743209838867 783 | bench_qcgpu,8,0.006495475769042969 784 | bench_qcgpu,8,0.006342172622680664 785 | bench_qiskit,8,0.10283613204956055 786 | bench_qcgpu,8,0.006314992904663086 787 | bench_qiskit,8,0.10669231414794922 788 | bench_projectq,8,0.00597381591796875 789 | bench_qiskit,8,0.10233688354492188 790 | bench_qcgpu,8,0.007710933685302734 791 | bench_qiskit,8,0.10452580451965332 792 | bench_projectq,8,0.005398273468017578 793 | bench_projectq,8,0.0504918098449707 794 | bench_projectq,8,0.04964303970336914 795 | bench_qiskit,8,0.12972617149353027 796 | bench_qiskit,8,0.11218714714050293 797 | bench_qiskit,8,0.11177825927734375 798 | bench_qcgpu,8,0.00910639762878418 799 | bench_projectq,8,0.003752470016479492 800 | bench_projectq,8,0.004554033279418945 801 | bench_qiskit,8,0.10527253150939941 802 | bench_projectq,9,0.012317180633544922 803 | bench_qiskit,9,0.13317131996154785 804 | bench_qcgpu,9,0.009150981903076172 805 | bench_projectq,9,0.007651329040527344 806 | bench_qcgpu,9,0.008267402648925781 807 | bench_projectq,9,0.03987765312194824 808 | bench_qcgpu,9,0.008153200149536133 809 | bench_qcgpu,9,0.007740974426269531 810 | bench_projectq,9,0.033913373947143555 811 | bench_projectq,9,0.04662609100341797 812 | bench_projectq,9,0.005152702331542969 813 | bench_qiskit,9,0.1255040168762207 814 | bench_qiskit,9,0.13535737991333008 815 | bench_qiskit,9,0.14421963691711426 816 | bench_projectq,9,0.0070972442626953125 817 | bench_qcgpu,9,0.007992744445800781 818 | bench_qiskit,9,0.1349172592163086 819 | bench_qiskit,9,0.1346879005432129 820 | bench_projectq,9,0.011948108673095703 821 | bench_qcgpu,9,0.008055448532104492 822 | bench_projectq,9,0.039544105529785156 823 | bench_projectq,9,0.0420832633972168 824 | bench_qcgpu,9,0.007770538330078125 825 | bench_qiskit,9,0.148911714553833 826 | bench_projectq,9,0.006134510040283203 827 | bench_qiskit,9,0.12578225135803223 828 | bench_projectq,9,0.005886554718017578 829 | bench_projectq,9,0.06232452392578125 830 | bench_qiskit,9,0.1287684440612793 831 | bench_qiskit,9,0.13627004623413086 832 | bench_qiskit,9,0.1358661651611328 833 | bench_projectq,9,0.005670070648193359 834 | bench_qiskit,9,0.13284921646118164 835 | bench_qcgpu,9,0.00793313980102539 836 | bench_qiskit,9,0.13509082794189453 837 | bench_projectq,9,0.009281396865844727 838 | bench_qcgpu,9,0.008077144622802734 839 | bench_projectq,9,0.039510488510131836 840 | bench_qcgpu,9,0.007776975631713867 841 | bench_projectq,9,0.07142400741577148 842 | bench_projectq,9,0.04300999641418457 843 | bench_qcgpu,9,0.007905244827270508 844 | bench_qiskit,9,0.1572895050048828 845 | bench_qcgpu,9,0.009790420532226562 846 | bench_qiskit,9,0.12964153289794922 847 | bench_qcgpu,9,0.007789134979248047 848 | bench_projectq,9,0.037659645080566406 849 | bench_qcgpu,9,0.007766008377075195 850 | bench_qiskit,9,0.12751555442810059 851 | bench_qiskit,9,0.1339268684387207 852 | bench_qiskit,9,0.12727117538452148 853 | bench_qiskit,9,0.1442432403564453 854 | bench_projectq,9,0.012328147888183594 855 | bench_projectq,9,0.06490397453308105 856 | bench_qcgpu,9,0.008152246475219727 857 | bench_qcgpu,9,0.007645606994628906 858 | bench_qiskit,9,0.12237930297851562 859 | bench_qcgpu,9,0.008074522018432617 860 | bench_qiskit,9,0.16445422172546387 861 | bench_qiskit,9,0.1326899528503418 862 | bench_projectq,9,0.0060176849365234375 863 | bench_projectq,9,0.04587864875793457 864 | bench_qcgpu,9,0.008214950561523438 865 | bench_qcgpu,9,0.0075910091400146484 866 | bench_qcgpu,9,0.007601261138916016 867 | bench_qcgpu,9,0.0074765682220458984 868 | bench_qiskit,9,0.12901735305786133 869 | bench_qiskit,9,0.13547563552856445 870 | bench_projectq,9,0.0050067901611328125 871 | bench_projectq,9,0.04731178283691406 872 | bench_projectq,9,0.0046689510345458984 873 | bench_qcgpu,9,0.00819706916809082 874 | bench_projectq,9,0.06736207008361816 875 | bench_projectq,9,0.04916024208068848 876 | bench_qiskit,9,0.12849664688110352 877 | bench_projectq,9,0.041448116302490234 878 | bench_qcgpu,9,0.009728193283081055 879 | bench_projectq,9,0.03041672706604004 880 | bench_qcgpu,9,0.008068084716796875 881 | bench_qcgpu,9,0.007651090621948242 882 | bench_qcgpu,9,0.007532835006713867 883 | bench_qcgpu,9,0.0077211856842041016 884 | bench_projectq,9,0.05510759353637695 885 | bench_projectq,9,0.004720449447631836 886 | bench_projectq,9,0.042319536209106445 887 | bench_qcgpu,9,0.007950067520141602 888 | bench_qcgpu,9,0.007738828659057617 889 | bench_qiskit,9,0.13274097442626953 890 | bench_qiskit,9,0.13151788711547852 891 | bench_qiskit,9,0.1327512264251709 892 | bench_projectq,9,0.004525661468505859 893 | bench_qiskit,9,0.16341018676757812 894 | bench_projectq,9,0.004841327667236328 895 | bench_qcgpu,9,0.00854945182800293 896 | bench_projectq,9,0.07782101631164551 897 | bench_qcgpu,9,0.007979393005371094 898 | bench_qcgpu,9,0.0072438716888427734 899 | bench_qcgpu,9,0.007198810577392578 900 | bench_qcgpu,9,0.007512331008911133 901 | bench_projectq,9,0.021103858947753906 902 | bench_qiskit,10,0.15669775009155273 903 | bench_qcgpu,10,0.013074398040771484 904 | bench_qiskit,10,0.161909818649292 905 | bench_qiskit,10,0.16330909729003906 906 | bench_projectq,10,0.011082649230957031 907 | bench_qcgpu,10,0.009693622589111328 908 | bench_projectq,10,0.038947105407714844 909 | bench_qiskit,10,0.1535325050354004 910 | bench_qiskit,10,0.15813827514648438 911 | bench_qiskit,10,0.19222497940063477 912 | bench_qcgpu,10,0.009687185287475586 913 | bench_projectq,10,0.019198179244995117 914 | bench_projectq,10,0.05154728889465332 915 | bench_qiskit,10,0.152144193649292 916 | bench_qiskit,10,0.16448378562927246 917 | bench_projectq,10,0.00903463363647461 918 | bench_qcgpu,10,0.010163545608520508 919 | bench_projectq,10,0.03509211540222168 920 | bench_projectq,10,0.04339408874511719 921 | bench_projectq,10,0.0635979175567627 922 | bench_projectq,10,0.04221057891845703 923 | bench_projectq,10,0.0061495304107666016 924 | bench_qcgpu,10,0.009985685348510742 925 | bench_qiskit,10,0.15272784233093262 926 | bench_qiskit,10,0.16382598876953125 927 | bench_qiskit,10,0.16589736938476562 928 | bench_projectq,10,0.02110576629638672 929 | bench_projectq,10,0.043460845947265625 930 | bench_qiskit,10,0.18623757362365723 931 | bench_projectq,10,0.00633549690246582 932 | bench_qiskit,10,0.1488044261932373 933 | bench_qcgpu,10,0.012740850448608398 934 | bench_qcgpu,10,0.010225057601928711 935 | bench_qcgpu,10,0.009007453918457031 936 | bench_qiskit,10,0.15813565254211426 937 | bench_qiskit,10,0.16835975646972656 938 | bench_projectq,10,0.0530390739440918 939 | bench_projectq,10,0.04980921745300293 940 | bench_qiskit,10,0.1513826847076416 941 | bench_qcgpu,10,0.011793136596679688 942 | bench_qiskit,10,0.16135644912719727 943 | bench_qcgpu,10,0.011135578155517578 944 | bench_qcgpu,10,0.009841442108154297 945 | bench_qiskit,10,0.1851181983947754 946 | bench_qiskit,10,0.16313624382019043 947 | bench_qiskit,10,0.17072010040283203 948 | bench_qcgpu,10,0.010102987289428711 949 | bench_projectq,10,0.008820772171020508 950 | bench_qiskit,10,0.16331005096435547 951 | bench_projectq,10,0.009312868118286133 952 | bench_qiskit,10,0.15765833854675293 953 | bench_qiskit,10,0.15356731414794922 954 | bench_projectq,10,0.02429056167602539 955 | bench_projectq,10,0.0684814453125 956 | bench_qcgpu,10,0.010326385498046875 957 | bench_qcgpu,10,0.008975744247436523 958 | bench_projectq,10,0.019739627838134766 959 | bench_qcgpu,10,0.009575366973876953 960 | bench_qcgpu,10,0.009250879287719727 961 | bench_qcgpu,10,0.009341239929199219 962 | bench_qiskit,10,0.14623451232910156 963 | bench_qiskit,10,0.18738389015197754 964 | bench_qcgpu,10,0.011237621307373047 965 | bench_qcgpu,10,0.009897232055664062 966 | bench_qcgpu,10,0.009351253509521484 967 | bench_qcgpu,10,0.009426593780517578 968 | bench_projectq,10,0.006214618682861328 969 | bench_qiskit,10,0.153062105178833 970 | bench_qiskit,10,0.1632692813873291 971 | bench_qcgpu,10,0.01004481315612793 972 | bench_qcgpu,10,0.01055002212524414 973 | bench_projectq,10,0.005286216735839844 974 | bench_projectq,10,0.00810384750366211 975 | bench_projectq,10,0.04542851448059082 976 | bench_projectq,10,0.006291866302490234 977 | bench_qiskit,10,0.1569979190826416 978 | bench_projectq,10,0.010887384414672852 979 | bench_projectq,10,0.0497591495513916 980 | bench_qiskit,10,0.15435791015625 981 | bench_projectq,10,0.0070953369140625 982 | bench_qcgpu,10,0.009713888168334961 983 | bench_projectq,10,0.041103363037109375 984 | bench_qiskit,10,0.15612149238586426 985 | bench_qiskit,10,0.19171452522277832 986 | bench_projectq,10,0.017057418823242188 987 | bench_qcgpu,10,0.00992894172668457 988 | bench_projectq,10,0.0329432487487793 989 | bench_projectq,10,0.05427670478820801 990 | bench_projectq,10,0.005957126617431641 991 | bench_qiskit,10,0.16027402877807617 992 | bench_qiskit,10,0.15985679626464844 993 | bench_qcgpu,10,0.010299921035766602 994 | bench_qcgpu,10,0.010358333587646484 995 | bench_qiskit,10,0.15880870819091797 996 | bench_qcgpu,10,0.010177850723266602 997 | bench_qcgpu,10,0.009660959243774414 998 | bench_qiskit,10,0.15668749809265137 999 | bench_projectq,10,0.006350040435791016 1000 | bench_projectq,10,0.04222226142883301 1001 | bench_qiskit,10,0.16397380828857422 1002 | bench_qiskit,11,0.2181074619293213 1003 | bench_qiskit,11,0.18565678596496582 1004 | bench_projectq,11,0.00741887092590332 1005 | bench_qiskit,11,0.17430329322814941 1006 | bench_qiskit,11,0.18699026107788086 1007 | bench_projectq,11,0.007292985916137695 1008 | bench_qcgpu,11,0.011679887771606445 1009 | bench_qiskit,11,0.1732630729675293 1010 | bench_qcgpu,11,0.012158870697021484 1011 | bench_qcgpu,11,0.010788917541503906 1012 | bench_projectq,11,0.015404701232910156 1013 | bench_projectq,11,0.040312767028808594 1014 | bench_projectq,11,0.03250408172607422 1015 | bench_qcgpu,11,0.015012025833129883 1016 | bench_qiskit,11,0.2154862880706787 1017 | bench_qcgpu,11,0.015374183654785156 1018 | bench_qiskit,11,0.18988561630249023 1019 | bench_qcgpu,11,0.014657020568847656 1020 | bench_qiskit,11,0.20173430442810059 1021 | bench_qcgpu,11,0.013115167617797852 1022 | bench_qcgpu,11,0.014257192611694336 1023 | bench_qiskit,11,0.20279788970947266 1024 | bench_projectq,11,0.012744665145874023 1025 | bench_qcgpu,11,0.011738777160644531 1026 | bench_projectq,11,0.030225276947021484 1027 | bench_qiskit,11,0.19215726852416992 1028 | bench_projectq,11,0.01373147964477539 1029 | bench_projectq,11,0.03419899940490723 1030 | bench_projectq,11,0.05814504623413086 1031 | bench_qiskit,11,0.22726655006408691 1032 | bench_qcgpu,11,0.01374673843383789 1033 | bench_qiskit,11,0.19212126731872559 1034 | bench_qiskit,11,0.19903969764709473 1035 | bench_qiskit,11,0.20419549942016602 1036 | bench_qcgpu,11,0.011858701705932617 1037 | bench_qcgpu,11,0.01126861572265625 1038 | bench_qcgpu,11,0.011189937591552734 1039 | bench_projectq,11,0.009629487991333008 1040 | bench_qiskit,11,0.184586763381958 1041 | bench_qcgpu,11,0.012941122055053711 1042 | bench_projectq,11,0.008606195449829102 1043 | bench_projectq,11,0.051367998123168945 1044 | bench_projectq,11,0.038303375244140625 1045 | bench_projectq,11,0.01093292236328125 1046 | bench_qcgpu,11,0.01151275634765625 1047 | bench_qiskit,11,0.21460676193237305 1048 | bench_qiskit,11,0.20911550521850586 1049 | bench_qiskit,11,0.20168757438659668 1050 | bench_projectq,11,0.0640559196472168 1051 | bench_qcgpu,11,0.011975288391113281 1052 | bench_projectq,11,0.023253202438354492 1053 | bench_qiskit,11,0.17736411094665527 1054 | bench_projectq,11,0.0074634552001953125 1055 | bench_qiskit,11,0.18862080574035645 1056 | bench_qcgpu,11,0.014088869094848633 1057 | bench_projectq,11,0.018029212951660156 1058 | bench_projectq,11,0.036810874938964844 1059 | bench_qcgpu,11,0.014191389083862305 1060 | bench_projectq,11,0.024459362030029297 1061 | bench_qiskit,11,0.22074151039123535 1062 | bench_projectq,11,0.007063865661621094 1063 | bench_projectq,11,0.053247690200805664 1064 | bench_qcgpu,11,0.01211690902709961 1065 | bench_projectq,11,0.07111382484436035 1066 | bench_projectq,11,0.04215073585510254 1067 | bench_projectq,11,0.0428316593170166 1068 | bench_projectq,11,0.05341529846191406 1069 | bench_projectq,11,0.04200243949890137 1070 | bench_projectq,11,0.0399928092956543 1071 | bench_qcgpu,11,0.011327743530273438 1072 | bench_qcgpu,11,0.011144161224365234 1073 | bench_projectq,11,0.016415119171142578 1074 | bench_projectq,11,0.0411677360534668 1075 | bench_projectq,11,0.03919649124145508 1076 | bench_projectq,11,0.03833651542663574 1077 | bench_qcgpu,11,0.011609077453613281 1078 | bench_qcgpu,11,0.010653257369995117 1079 | bench_qcgpu,11,0.011137008666992188 1080 | bench_qiskit,11,0.17146039009094238 1081 | bench_qiskit,11,0.19354534149169922 1082 | bench_qcgpu,11,0.013012170791625977 1083 | bench_qcgpu,11,0.011439800262451172 1084 | bench_projectq,11,0.018229961395263672 1085 | bench_qcgpu,11,0.011013031005859375 1086 | bench_qiskit,11,0.17446041107177734 1087 | bench_qcgpu,11,0.015103578567504883 1088 | bench_qcgpu,11,0.01172018051147461 1089 | bench_qcgpu,11,0.010966777801513672 1090 | bench_qcgpu,11,0.013134002685546875 1091 | bench_projectq,11,0.007512331008911133 1092 | bench_qiskit,11,0.18960189819335938 1093 | bench_qiskit,11,0.23949241638183594 1094 | bench_projectq,11,0.010047674179077148 1095 | bench_projectq,11,0.03998112678527832 1096 | bench_projectq,11,0.007213115692138672 1097 | bench_qcgpu,11,0.012007474899291992 1098 | bench_qcgpu,11,0.011690139770507812 1099 | bench_qcgpu,11,0.01137852668762207 1100 | bench_qiskit,11,0.19019246101379395 1101 | bench_qiskit,11,0.1923511028289795 1102 | bench_qiskit,12,0.2214205265045166 1103 | bench_qiskit,12,0.22371554374694824 1104 | bench_qcgpu,12,0.018897294998168945 1105 | bench_projectq,12,0.008923053741455078 1106 | bench_qcgpu,12,0.012991189956665039 1107 | bench_projectq,12,0.026980161666870117 1108 | bench_projectq,12,0.030009031295776367 1109 | bench_qiskit,12,0.2552192211151123 1110 | bench_projectq,12,0.0157928466796875 1111 | bench_projectq,12,0.037899017333984375 1112 | bench_projectq,12,0.00793766975402832 1113 | bench_qiskit,12,0.2233715057373047 1114 | bench_projectq,12,0.008002042770385742 1115 | bench_projectq,12,0.04307436943054199 1116 | bench_projectq,12,0.0841681957244873 1117 | bench_qcgpu,12,0.013571739196777344 1118 | bench_qiskit,12,0.2264418601989746 1119 | bench_qcgpu,12,0.020552873611450195 1120 | bench_qiskit,12,0.2274470329284668 1121 | bench_qcgpu,12,0.020450115203857422 1122 | bench_qcgpu,12,0.012498855590820312 1123 | bench_projectq,12,0.008157968521118164 1124 | bench_qiskit,12,0.2510988712310791 1125 | bench_qiskit,12,0.2210676670074463 1126 | bench_qcgpu,12,0.0184628963470459 1127 | bench_projectq,12,0.008157968521118164 1128 | bench_qcgpu,12,0.013506412506103516 1129 | bench_qcgpu,12,0.013018131256103516 1130 | bench_qcgpu,12,0.013108968734741211 1131 | bench_qiskit,12,0.21768832206726074 1132 | bench_projectq,12,0.009814262390136719 1133 | bench_qcgpu,12,0.013869762420654297 1134 | bench_qiskit,12,0.21965408325195312 1135 | bench_projectq,12,0.02007317543029785 1136 | bench_qcgpu,12,0.01526498794555664 1137 | bench_qcgpu,12,0.013468742370605469 1138 | bench_qiskit,12,0.25673770904541016 1139 | bench_qcgpu,12,0.015498161315917969 1140 | bench_qcgpu,12,0.012697935104370117 1141 | bench_qiskit,12,0.22873353958129883 1142 | bench_projectq,12,0.041094064712524414 1143 | bench_qcgpu,12,0.014187097549438477 1144 | bench_qiskit,12,0.22955822944641113 1145 | bench_qcgpu,12,0.019940853118896484 1146 | bench_qcgpu,12,0.015660762786865234 1147 | bench_qcgpu,12,0.014194488525390625 1148 | bench_qiskit,12,0.24358224868774414 1149 | bench_projectq,12,0.06784915924072266 1150 | bench_projectq,12,0.05315136909484863 1151 | bench_projectq,12,0.03919529914855957 1152 | bench_qcgpu,12,0.014012336730957031 1153 | bench_qcgpu,12,0.013645410537719727 1154 | bench_projectq,12,0.024113893508911133 1155 | bench_qiskit,12,0.2728133201599121 1156 | bench_qiskit,12,0.23825764656066895 1157 | bench_qiskit,12,0.23049592971801758 1158 | bench_qiskit,12,0.22600674629211426 1159 | bench_qiskit,12,0.23538589477539062 1160 | bench_qiskit,12,0.2579331398010254 1161 | bench_projectq,12,0.01250314712524414 1162 | bench_qiskit,12,0.25946903228759766 1163 | bench_qiskit,12,0.27382683753967285 1164 | bench_projectq,12,0.01045370101928711 1165 | bench_qiskit,12,0.2590186595916748 1166 | bench_qcgpu,12,0.02030038833618164 1167 | bench_qiskit,12,0.30405092239379883 1168 | bench_qcgpu,12,0.01952505111694336 1169 | bench_qiskit,12,0.2733159065246582 1170 | bench_projectq,12,0.008962631225585938 1171 | bench_projectq,12,0.03879237174987793 1172 | bench_qcgpu,12,0.014563322067260742 1173 | bench_projectq,12,0.04173588752746582 1174 | bench_qcgpu,12,0.01428675651550293 1175 | bench_qiskit,12,0.27237749099731445 1176 | bench_qiskit,12,0.2839012145996094 1177 | bench_qcgpu,12,0.016869306564331055 1178 | bench_projectq,12,0.009769439697265625 1179 | bench_qcgpu,12,0.013666629791259766 1180 | bench_qcgpu,12,0.013077735900878906 1181 | bench_projectq,12,0.011949300765991211 1182 | bench_qiskit,12,0.29379725456237793 1183 | bench_projectq,12,0.0761556625366211 1184 | bench_qcgpu,12,0.014147758483886719 1185 | bench_projectq,12,0.05583071708679199 1186 | bench_projectq,12,0.08430600166320801 1187 | bench_qiskit,12,0.29280519485473633 1188 | bench_qcgpu,12,0.015404939651489258 1189 | bench_qiskit,12,0.2687983512878418 1190 | bench_projectq,12,0.016403913497924805 1191 | bench_qcgpu,12,0.013936281204223633 1192 | bench_qcgpu,12,0.013182640075683594 1193 | bench_qcgpu,12,0.013309001922607422 1194 | bench_qiskit,12,0.27568864822387695 1195 | bench_qiskit,12,0.31144189834594727 1196 | bench_qiskit,12,0.2351067066192627 1197 | bench_qcgpu,12,0.01581597328186035 1198 | bench_qiskit,12,0.23219704627990723 1199 | bench_projectq,12,0.012891530990600586 1200 | bench_projectq,12,0.05060625076293945 1201 | bench_qiskit,12,0.22533392906188965 1202 | bench_qcgpu,13,0.021219730377197266 1203 | bench_qiskit,13,0.30449461936950684 1204 | bench_qiskit,13,0.276547908782959 1205 | bench_qcgpu,13,0.018611669540405273 1206 | bench_projectq,13,0.015178203582763672 1207 | bench_projectq,13,0.06333327293395996 1208 | bench_projectq,13,0.056699275970458984 1209 | bench_projectq,13,0.07295751571655273 1210 | bench_qcgpu,13,0.01615595817565918 1211 | bench_projectq,13,0.02157139778137207 1212 | bench_qcgpu,13,0.015668153762817383 1213 | bench_projectq,13,0.015062808990478516 1214 | bench_qiskit,13,0.2738068103790283 1215 | bench_qiskit,13,0.28713536262512207 1216 | bench_qiskit,13,0.31552934646606445 1217 | bench_qiskit,13,0.27462267875671387 1218 | bench_qcgpu,13,0.01936960220336914 1219 | bench_projectq,13,0.009457826614379883 1220 | bench_qcgpu,13,0.015623092651367188 1221 | bench_qiskit,13,0.2569241523742676 1222 | bench_qiskit,13,0.30672216415405273 1223 | bench_projectq,13,0.018339872360229492 1224 | bench_qcgpu,13,0.015866994857788086 1225 | bench_qiskit,13,0.2700374126434326 1226 | bench_qcgpu,13,0.022357463836669922 1227 | bench_qcgpu,13,0.015900850296020508 1228 | bench_qcgpu,13,0.014740228652954102 1229 | bench_projectq,13,0.009679555892944336 1230 | bench_qcgpu,13,0.01619124412536621 1231 | bench_qiskit,13,0.2662391662597656 1232 | bench_qcgpu,13,0.019478797912597656 1233 | bench_qcgpu,13,0.016046524047851562 1234 | bench_qiskit,13,0.2719147205352783 1235 | bench_qcgpu,13,0.019450664520263672 1236 | bench_qiskit,13,0.29981255531311035 1237 | bench_projectq,13,0.018308162689208984 1238 | bench_projectq,13,0.035695791244506836 1239 | bench_qiskit,13,0.2773704528808594 1240 | bench_projectq,13,0.015772342681884766 1241 | bench_qiskit,13,0.26462388038635254 1242 | bench_projectq,13,0.013938426971435547 1243 | bench_projectq,13,0.03745698928833008 1244 | bench_qcgpu,13,0.015934467315673828 1245 | bench_qcgpu,13,0.014916181564331055 1246 | bench_qcgpu,13,0.015274524688720703 1247 | bench_qiskit,13,0.301105260848999 1248 | bench_qiskit,13,0.2805521488189697 1249 | bench_qcgpu,13,0.022599458694458008 1250 | bench_qcgpu,13,0.015253067016601562 1251 | bench_qiskit,13,0.26810193061828613 1252 | bench_qiskit,13,0.2774500846862793 1253 | bench_qcgpu,13,0.021543025970458984 1254 | bench_qcgpu,13,0.015444040298461914 1255 | bench_projectq,13,0.009966611862182617 1256 | bench_projectq,13,0.035985469818115234 1257 | bench_projectq,13,0.03032207489013672 1258 | bench_qcgpu,13,0.015588760375976562 1259 | bench_qcgpu,13,0.014896869659423828 1260 | bench_qiskit,13,0.29593944549560547 1261 | bench_qcgpu,13,0.021701574325561523 1262 | bench_projectq,13,0.009808540344238281 1263 | bench_projectq,13,0.04437422752380371 1264 | bench_qcgpu,13,0.01592540740966797 1265 | bench_qiskit,13,0.27387022972106934 1266 | bench_qcgpu,13,0.019060850143432617 1267 | bench_qiskit,13,0.2870500087738037 1268 | bench_projectq,13,0.01781010627746582 1269 | bench_qiskit,13,0.3131532669067383 1270 | bench_projectq,13,0.017124652862548828 1271 | bench_qiskit,13,0.2969810962677002 1272 | bench_qcgpu,13,0.02303028106689453 1273 | bench_projectq,13,0.15361332893371582 1274 | bench_qiskit,13,0.3277013301849365 1275 | bench_projectq,13,0.03543376922607422 1276 | bench_qcgpu,13,0.016263246536254883 1277 | bench_projectq,13,0.04018235206604004 1278 | bench_projectq,13,0.027652502059936523 1279 | bench_projectq,13,0.03486275672912598 1280 | bench_qcgpu,13,0.017290830612182617 1281 | bench_projectq,13,0.018111228942871094 1282 | bench_qcgpu,13,0.01616811752319336 1283 | bench_projectq,13,0.021184682846069336 1284 | bench_qiskit,13,0.27611351013183594 1285 | bench_projectq,13,0.01521611213684082 1286 | bench_qcgpu,13,0.015691280364990234 1287 | bench_projectq,13,0.018110990524291992 1288 | bench_qcgpu,13,0.015599966049194336 1289 | bench_projectq,13,0.020688533782958984 1290 | bench_projectq,13,0.03693127632141113 1291 | bench_projectq,13,0.03416562080383301 1292 | bench_projectq,13,0.06179356575012207 1293 | bench_qiskit,13,0.30032920837402344 1294 | bench_qiskit,13,0.2777707576751709 1295 | bench_projectq,13,0.012942790985107422 1296 | bench_qiskit,13,0.26782727241516113 1297 | bench_qcgpu,13,0.0228884220123291 1298 | bench_projectq,13,0.00984048843383789 1299 | bench_qcgpu,13,0.015745878219604492 1300 | bench_qcgpu,13,0.015811443328857422 1301 | bench_projectq,13,0.008884668350219727 1302 | bench_projectq,14,0.08635973930358887 1303 | bench_qiskit,14,0.3654193878173828 1304 | bench_projectq,14,0.017806529998779297 1305 | bench_projectq,14,0.032704830169677734 1306 | bench_qcgpu,14,0.01772904396057129 1307 | bench_projectq,14,0.013358116149902344 1308 | bench_qiskit,14,0.33753228187561035 1309 | bench_projectq,14,0.031032323837280273 1310 | bench_projectq,14,0.03383827209472656 1311 | bench_qcgpu,14,0.018658161163330078 1312 | bench_projectq,14,0.013876914978027344 1313 | bench_projectq,14,0.04718303680419922 1314 | bench_projectq,14,0.05564284324645996 1315 | bench_projectq,14,0.06896615028381348 1316 | bench_qcgpu,14,0.021411657333374023 1317 | bench_projectq,14,0.01706552505493164 1318 | bench_projectq,14,0.041588544845581055 1319 | bench_qcgpu,14,0.02135157585144043 1320 | bench_projectq,14,0.011991500854492188 1321 | bench_qcgpu,14,0.01878976821899414 1322 | bench_qcgpu,14,0.018033504486083984 1323 | bench_projectq,14,0.01923370361328125 1324 | bench_qiskit,14,0.3834397792816162 1325 | bench_qiskit,14,0.41147565841674805 1326 | bench_projectq,14,0.027207374572753906 1327 | bench_qcgpu,14,0.017912864685058594 1328 | bench_projectq,14,0.0110931396484375 1329 | bench_qiskit,14,0.35667896270751953 1330 | bench_qcgpu,14,0.026177406311035156 1331 | bench_qcgpu,14,0.018293142318725586 1332 | bench_projectq,14,0.028066396713256836 1333 | bench_qcgpu,14,0.018844127655029297 1334 | bench_qcgpu,14,0.01802539825439453 1335 | bench_qiskit,14,0.33383798599243164 1336 | bench_qiskit,14,0.3812551498413086 1337 | bench_projectq,14,0.017428874969482422 1338 | bench_projectq,14,0.03252577781677246 1339 | bench_qiskit,14,0.3335294723510742 1340 | bench_projectq,14,0.015651226043701172 1341 | bench_projectq,14,0.030643701553344727 1342 | bench_qcgpu,14,0.017973661422729492 1343 | bench_qiskit,14,0.32762861251831055 1344 | bench_projectq,14,0.01251840591430664 1345 | bench_qiskit,14,0.36013007164001465 1346 | bench_qcgpu,14,0.02549910545349121 1347 | bench_qiskit,14,0.34797215461730957 1348 | bench_qcgpu,14,0.027276277542114258 1349 | bench_qiskit,14,0.3436241149902344 1350 | bench_qcgpu,14,0.025504589080810547 1351 | bench_qcgpu,14,0.018036365509033203 1352 | bench_qcgpu,14,0.017981767654418945 1353 | bench_projectq,14,0.016352415084838867 1354 | bench_qiskit,14,0.36389708518981934 1355 | bench_qcgpu,14,0.024439334869384766 1356 | bench_qcgpu,14,0.0171658992767334 1357 | bench_qcgpu,14,0.017447948455810547 1358 | bench_projectq,14,0.01308751106262207 1359 | bench_projectq,14,0.04695272445678711 1360 | bench_projectq,14,0.029120683670043945 1361 | bench_qiskit,14,0.3311624526977539 1362 | bench_qcgpu,14,0.027834653854370117 1363 | bench_qiskit,14,0.3485136032104492 1364 | bench_qiskit,14,0.3941941261291504 1365 | bench_projectq,14,0.017946720123291016 1366 | bench_projectq,14,0.031868696212768555 1367 | bench_projectq,14,0.03008556365966797 1368 | bench_qcgpu,14,0.021722793579101562 1369 | bench_projectq,14,0.017338275909423828 1370 | bench_projectq,14,0.03092646598815918 1371 | bench_qiskit,14,0.34264183044433594 1372 | bench_projectq,14,0.0210416316986084 1373 | bench_qiskit,14,0.3463306427001953 1374 | bench_qcgpu,14,0.024240732192993164 1375 | bench_qcgpu,14,0.01908254623413086 1376 | bench_qcgpu,14,0.01876688003540039 1377 | bench_projectq,14,0.02477884292602539 1378 | bench_qiskit,14,0.3638453483581543 1379 | bench_qiskit,14,0.3806922435760498 1380 | bench_projectq,14,0.015865087509155273 1381 | bench_qiskit,14,0.33898377418518066 1382 | bench_qcgpu,14,0.027730941772460938 1383 | bench_qiskit,14,0.4211752414703369 1384 | bench_qcgpu,14,0.026810884475708008 1385 | bench_projectq,14,0.0939028263092041 1386 | bench_qiskit,14,0.34624814987182617 1387 | bench_projectq,14,0.06781744956970215 1388 | bench_projectq,14,0.028323888778686523 1389 | bench_qiskit,14,0.36095643043518066 1390 | bench_qiskit,14,0.4421708583831787 1391 | bench_qcgpu,14,0.024037599563598633 1392 | bench_qcgpu,14,0.017868757247924805 1393 | bench_qiskit,14,0.3782081604003906 1394 | bench_qiskit,14,0.3828098773956299 1395 | bench_projectq,14,0.021001577377319336 1396 | bench_projectq,14,0.04487800598144531 1397 | bench_qiskit,14,0.42194628715515137 1398 | bench_projectq,14,0.021082401275634766 1399 | bench_qiskit,14,0.3892805576324463 1400 | bench_qcgpu,14,0.025011062622070312 1401 | bench_qiskit,14,0.40253639221191406 1402 | bench_projectq,15,0.05634570121765137 1403 | bench_projectq,15,0.04118990898132324 1404 | bench_qiskit,15,0.5146567821502686 1405 | bench_qiskit,15,0.4855003356933594 1406 | bench_projectq,15,0.02893829345703125 1407 | bench_projectq,15,0.032296180725097656 1408 | bench_qiskit,15,0.4804670810699463 1409 | bench_qiskit,15,0.5136523246765137 1410 | bench_projectq,15,0.02077770233154297 1411 | bench_projectq,15,0.020896434783935547 1412 | bench_qcgpu,15,0.020725727081298828 1413 | bench_projectq,15,0.01355290412902832 1414 | bench_qcgpu,15,0.020793914794921875 1415 | bench_qcgpu,15,0.020500898361206055 1416 | bench_qiskit,15,0.4776289463043213 1417 | bench_qiskit,15,0.5059609413146973 1418 | bench_qcgpu,15,0.02760791778564453 1419 | bench_qcgpu,15,0.020002126693725586 1420 | bench_qiskit,15,0.44890856742858887 1421 | bench_projectq,15,0.058553457260131836 1422 | bench_qcgpu,15,0.02131032943725586 1423 | bench_qcgpu,15,0.020282268524169922 1424 | bench_projectq,15,0.02228093147277832 1425 | bench_qcgpu,15,0.0220184326171875 1426 | bench_projectq,15,0.03354024887084961 1427 | bench_projectq,15,0.07501482963562012 1428 | bench_qiskit,15,0.456737756729126 1429 | bench_projectq,15,0.020859479904174805 1430 | bench_qiskit,15,0.4811363220214844 1431 | bench_projectq,15,0.018915653228759766 1432 | bench_qcgpu,15,0.02149677276611328 1433 | bench_qcgpu,15,0.019927263259887695 1434 | bench_projectq,15,0.013713836669921875 1435 | bench_qiskit,15,0.45680761337280273 1436 | bench_projectq,15,0.030279874801635742 1437 | bench_qcgpu,15,0.023693084716796875 1438 | bench_projectq,15,0.1024324893951416 1439 | bench_qiskit,15,0.4818904399871826 1440 | bench_qiskit,15,0.4998898506164551 1441 | bench_projectq,15,0.025674104690551758 1442 | bench_qcgpu,15,0.02104806900024414 1443 | bench_qcgpu,15,0.02010488510131836 1444 | bench_qcgpu,15,0.01961231231689453 1445 | bench_projectq,15,0.016082048416137695 1446 | bench_qiskit,15,0.4486398696899414 1447 | bench_qcgpu,15,0.023664236068725586 1448 | bench_projectq,15,0.04134869575500488 1449 | bench_projectq,15,0.09050226211547852 1450 | bench_qiskit,15,0.5030925273895264 1451 | bench_qcgpu,15,0.02723383903503418 1452 | bench_qiskit,15,0.45465922355651855 1453 | bench_qiskit,15,0.46683645248413086 1454 | bench_qiskit,15,0.5064871311187744 1455 | bench_qcgpu,15,0.03355526924133301 1456 | bench_qcgpu,15,0.03357362747192383 1457 | bench_qcgpu,15,0.021883487701416016 1458 | bench_projectq,15,0.015727996826171875 1459 | bench_qiskit,15,0.46407365798950195 1460 | bench_projectq,15,0.024652481079101562 1461 | bench_qcgpu,15,0.022102832794189453 1462 | bench_qcgpu,15,0.020744800567626953 1463 | bench_projectq,15,0.022942066192626953 1464 | bench_qiskit,15,0.48270273208618164 1465 | bench_projectq,15,0.02485346794128418 1466 | bench_projectq,15,0.07440400123596191 1467 | bench_qiskit,15,0.4372425079345703 1468 | bench_qiskit,15,0.49085044860839844 1469 | bench_qcgpu,15,0.027045249938964844 1470 | bench_projectq,15,0.14083433151245117 1471 | bench_qiskit,15,0.47631120681762695 1472 | bench_qcgpu,15,0.027617931365966797 1473 | bench_qcgpu,15,0.020671844482421875 1474 | bench_projectq,15,0.01713275909423828 1475 | bench_qcgpu,15,0.021103382110595703 1476 | bench_qcgpu,15,0.02072763442993164 1477 | bench_qcgpu,15,0.02095818519592285 1478 | bench_qcgpu,15,0.020610570907592773 1479 | bench_qiskit,15,0.44147348403930664 1480 | bench_projectq,15,0.01972031593322754 1481 | bench_qcgpu,15,0.021183490753173828 1482 | bench_projectq,15,0.01382899284362793 1483 | bench_qcgpu,15,0.021271467208862305 1484 | bench_projectq,15,0.014020681381225586 1485 | bench_projectq,15,0.02990412712097168 1486 | bench_qiskit,15,0.43088388442993164 1487 | bench_qiskit,15,0.5043389797210693 1488 | bench_projectq,15,0.018695354461669922 1489 | bench_qcgpu,15,0.0204617977142334 1490 | bench_projectq,15,0.020537614822387695 1491 | bench_qcgpu,15,0.02145075798034668 1492 | bench_qcgpu,15,0.019564151763916016 1493 | bench_qiskit,15,0.4741654396057129 1494 | bench_qcgpu,15,0.02724933624267578 1495 | bench_projectq,15,0.016078948974609375 1496 | bench_qcgpu,15,0.021228790283203125 1497 | bench_projectq,15,0.057268381118774414 1498 | bench_qcgpu,15,0.02096080780029297 1499 | bench_projectq,15,0.013924837112426758 1500 | bench_qcgpu,15,0.020214557647705078 1501 | bench_qiskit,15,0.49557018280029297 1502 | bench_qiskit,16,0.6014845371246338 1503 | bench_qiskit,16,0.6238312721252441 1504 | bench_projectq,16,0.029675960540771484 1505 | bench_projectq,16,0.03000617027282715 1506 | bench_qiskit,16,0.6505906581878662 1507 | bench_qcgpu,16,0.025858402252197266 1508 | bench_qiskit,16,0.59922194480896 1509 | bench_qcgpu,16,0.030710220336914062 1510 | bench_qiskit,16,0.6484599113464355 1511 | bench_projectq,16,0.06455802917480469 1512 | bench_qiskit,16,0.6219847202301025 1513 | bench_projectq,16,0.15228748321533203 1514 | bench_projectq,16,0.06762337684631348 1515 | bench_projectq,16,0.03825497627258301 1516 | bench_projectq,16,0.20836448669433594 1517 | bench_qiskit,16,0.6577482223510742 1518 | bench_projectq,16,0.023873329162597656 1519 | bench_projectq,16,0.024747371673583984 1520 | bench_qcgpu,16,0.02328634262084961 1521 | bench_qiskit,16,0.6217536926269531 1522 | bench_qiskit,16,0.7016170024871826 1523 | bench_projectq,16,0.051419734954833984 1524 | bench_projectq,16,0.026728153228759766 1525 | bench_qcgpu,16,0.023889780044555664 1526 | bench_qiskit,16,0.6162631511688232 1527 | bench_projectq,16,0.1759178638458252 1528 | bench_qiskit,16,0.6176269054412842 1529 | bench_projectq,16,0.03830122947692871 1530 | bench_qcgpu,16,0.02861309051513672 1531 | bench_qiskit,16,0.6371452808380127 1532 | bench_qcgpu,16,0.025554656982421875 1533 | bench_qiskit,16,0.6194465160369873 1534 | bench_qcgpu,16,0.03043985366821289 1535 | bench_qcgpu,16,0.022820711135864258 1536 | bench_qiskit,16,0.6615447998046875 1537 | bench_projectq,16,0.0428006649017334 1538 | bench_qcgpu,16,0.024104833602905273 1539 | bench_qcgpu,16,0.023788928985595703 1540 | bench_projectq,16,0.02477741241455078 1541 | bench_projectq,16,0.03141331672668457 1542 | bench_qcgpu,16,0.023785829544067383 1543 | bench_qiskit,16,0.6544449329376221 1544 | bench_qiskit,16,0.7242097854614258 1545 | bench_qcgpu,16,0.033736467361450195 1546 | bench_qiskit,16,0.6097543239593506 1547 | bench_qcgpu,16,0.029305219650268555 1548 | bench_qiskit,16,0.6272614002227783 1549 | bench_projectq,16,0.0253603458404541 1550 | bench_qcgpu,16,0.02269768714904785 1551 | bench_qiskit,16,0.6355648040771484 1552 | bench_projectq,16,0.025216341018676758 1553 | bench_qiskit,16,0.6049704551696777 1554 | bench_qiskit,16,0.6611106395721436 1555 | bench_projectq,16,0.025307416915893555 1556 | bench_qcgpu,16,0.026109933853149414 1557 | bench_projectq,16,0.016903400421142578 1558 | bench_qiskit,16,0.6389021873474121 1559 | bench_qcgpu,16,0.02525472640991211 1560 | bench_qcgpu,16,0.028130292892456055 1561 | bench_qcgpu,16,0.02409529685974121 1562 | bench_qcgpu,16,0.02433609962463379 1563 | bench_qcgpu,16,0.024576902389526367 1564 | bench_qcgpu,16,0.024326562881469727 1565 | bench_qiskit,16,0.6745061874389648 1566 | bench_projectq,16,0.06090593338012695 1567 | bench_projectq,16,0.016352415084838867 1568 | bench_qiskit,16,0.6117329597473145 1569 | bench_projectq,16,0.02623271942138672 1570 | bench_qiskit,16,0.622490406036377 1571 | bench_projectq,16,0.05186057090759277 1572 | bench_projectq,16,0.052893877029418945 1573 | bench_projectq,16,0.03407716751098633 1574 | bench_qiskit,16,0.6695818901062012 1575 | bench_qiskit,16,0.6321935653686523 1576 | bench_qiskit,16,0.6646685600280762 1577 | bench_qcgpu,16,0.0264132022857666 1578 | bench_qcgpu,16,0.023939847946166992 1579 | bench_qiskit,16,0.6559803485870361 1580 | bench_projectq,16,0.11917281150817871 1581 | bench_projectq,16,0.028414011001586914 1582 | bench_qcgpu,16,0.024036169052124023 1583 | bench_qiskit,16,0.6557374000549316 1584 | bench_qiskit,16,0.634207010269165 1585 | bench_qiskit,16,0.6390488147735596 1586 | bench_qiskit,16,0.6497058868408203 1587 | bench_qcgpu,16,0.03247523307800293 1588 | bench_qcgpu,16,0.0234224796295166 1589 | bench_qcgpu,16,0.023926258087158203 1590 | bench_qiskit,16,0.6180028915405273 1591 | bench_qiskit,16,0.6987664699554443 1592 | bench_qiskit,16,0.6561517715454102 1593 | bench_qiskit,16,0.6209862232208252 1594 | bench_qcgpu,16,0.02566361427307129 1595 | bench_qcgpu,16,0.02359771728515625 1596 | bench_projectq,16,0.021901369094848633 1597 | bench_qcgpu,16,0.023634910583496094 1598 | bench_projectq,16,0.021101951599121094 1599 | bench_qiskit,16,0.6117138862609863 1600 | bench_projectq,16,0.030214548110961914 1601 | bench_projectq,16,0.040557861328125 1602 | bench_qcgpu,17,0.027265071868896484 1603 | bench_projectq,17,0.03274226188659668 1604 | bench_projectq,17,0.05986642837524414 1605 | bench_projectq,17,0.023328304290771484 1606 | bench_projectq,17,0.0488741397857666 1607 | bench_qcgpu,17,0.02625727653503418 1608 | bench_qiskit,17,0.8169639110565186 1609 | bench_projectq,17,0.03086400032043457 1610 | bench_qiskit,17,0.7655501365661621 1611 | bench_qiskit,17,0.856203556060791 1612 | bench_qcgpu,17,0.03186607360839844 1613 | bench_qcgpu,17,0.026642560958862305 1614 | bench_qcgpu,17,0.02644038200378418 1615 | bench_qiskit,17,0.9289770126342773 1616 | bench_projectq,17,0.05605196952819824 1617 | bench_qiskit,17,1.735534906387329 1618 | bench_qcgpu,17,0.03329110145568848 1619 | bench_projectq,17,0.30747079849243164 1620 | bench_qiskit,17,0.800095796585083 1621 | bench_projectq,17,0.07396888732910156 1622 | bench_projectq,17,0.04837799072265625 1623 | bench_qiskit,17,1.0527002811431885 1624 | bench_qcgpu,17,0.03289365768432617 1625 | bench_qcgpu,17,0.026253938674926758 1626 | bench_qiskit,17,0.834265947341919 1627 | bench_qiskit,17,0.8693263530731201 1628 | bench_qcgpu,17,0.03188776969909668 1629 | bench_qiskit,17,0.8428244590759277 1630 | bench_qiskit,17,0.8730587959289551 1631 | bench_qiskit,17,0.8312938213348389 1632 | bench_projectq,17,0.02628493309020996 1633 | bench_qiskit,17,0.830303430557251 1634 | bench_qcgpu,17,0.033895015716552734 1635 | bench_projectq,17,0.13815712928771973 1636 | bench_qcgpu,17,0.026387453079223633 1637 | bench_qcgpu,17,0.025379180908203125 1638 | bench_qiskit,17,0.8153588771820068 1639 | bench_qcgpu,17,0.032073020935058594 1640 | bench_qiskit,17,0.8296563625335693 1641 | bench_qiskit,17,0.8476383686065674 1642 | bench_qiskit,17,0.8400862216949463 1643 | bench_projectq,17,0.043039560317993164 1644 | bench_projectq,17,0.039269208908081055 1645 | bench_qcgpu,17,0.026614665985107422 1646 | bench_qiskit,17,0.8527669906616211 1647 | bench_projectq,17,0.03881120681762695 1648 | bench_qiskit,17,0.8400249481201172 1649 | bench_qcgpu,17,0.03327226638793945 1650 | bench_projectq,17,0.02662491798400879 1651 | bench_projectq,17,0.020493507385253906 1652 | bench_projectq,17,0.024904251098632812 1653 | bench_projectq,17,0.06768941879272461 1654 | bench_projectq,17,0.046300649642944336 1655 | bench_qiskit,17,0.8458318710327148 1656 | bench_qcgpu,17,0.03748726844787598 1657 | bench_projectq,17,0.0435636043548584 1658 | bench_qiskit,17,0.778395414352417 1659 | bench_qcgpu,17,0.03606581687927246 1660 | bench_qcgpu,17,0.028169870376586914 1661 | bench_projectq,17,0.027582406997680664 1662 | bench_projectq,17,0.022598981857299805 1663 | bench_qiskit,17,0.7946670055389404 1664 | bench_qiskit,17,0.8115279674530029 1665 | bench_qcgpu,17,0.0336146354675293 1666 | bench_qcgpu,17,0.026804685592651367 1667 | bench_projectq,17,0.023247241973876953 1668 | bench_qiskit,17,0.8354451656341553 1669 | bench_projectq,17,0.03306269645690918 1670 | bench_qiskit,17,0.8275740146636963 1671 | bench_qcgpu,17,0.03177022933959961 1672 | bench_qiskit,17,0.8101954460144043 1673 | bench_qcgpu,17,0.030338525772094727 1674 | bench_projectq,17,0.023375511169433594 1675 | bench_qiskit,17,0.8080728054046631 1676 | bench_qiskit,17,0.8808095455169678 1677 | bench_qcgpu,17,0.032917022705078125 1678 | bench_qcgpu,17,0.026702404022216797 1679 | bench_projectq,17,0.02998638153076172 1680 | bench_qcgpu,17,0.025425434112548828 1681 | bench_qiskit,17,0.829153299331665 1682 | bench_qcgpu,17,0.03219199180603027 1683 | bench_qiskit,17,0.7684967517852783 1684 | bench_qcgpu,17,0.032271385192871094 1685 | bench_projectq,17,0.023234128952026367 1686 | bench_qcgpu,17,0.026231050491333008 1687 | bench_qiskit,17,0.7674777507781982 1688 | bench_qcgpu,17,0.03383684158325195 1689 | bench_qcgpu,17,0.027158260345458984 1690 | bench_qiskit,17,0.871610164642334 1691 | bench_qcgpu,17,0.03251934051513672 1692 | bench_qiskit,17,0.7854738235473633 1693 | bench_projectq,17,0.03286242485046387 1694 | bench_qiskit,17,0.8068499565124512 1695 | bench_qiskit,17,0.859675407409668 1696 | bench_projectq,17,0.07507467269897461 1697 | bench_qcgpu,17,0.026757478713989258 1698 | bench_qcgpu,17,0.026108503341674805 1699 | bench_qcgpu,17,0.02605128288269043 1700 | bench_qcgpu,17,0.026474475860595703 1701 | bench_qcgpu,17,0.025598764419555664 1702 | bench_qiskit,18,1.3080570697784424 1703 | bench_qiskit,18,1.2743356227874756 1704 | bench_qiskit,18,1.1773591041564941 1705 | bench_projectq,18,0.039635419845581055 1706 | bench_qcgpu,18,0.030635833740234375 1707 | bench_qcgpu,18,0.03030848503112793 1708 | bench_qiskit,18,1.2590587139129639 1709 | bench_qiskit,18,1.1699111461639404 1710 | bench_projectq,18,0.04152250289916992 1711 | bench_qcgpu,18,0.02943277359008789 1712 | bench_qiskit,18,1.1796073913574219 1713 | bench_qcgpu,18,0.034960269927978516 1714 | bench_projectq,18,0.03536081314086914 1715 | bench_projectq,18,0.03854513168334961 1716 | bench_projectq,18,0.03340458869934082 1717 | bench_qcgpu,18,0.032540082931518555 1718 | bench_qcgpu,18,0.029835224151611328 1719 | bench_qcgpu,18,0.029816627502441406 1720 | bench_qcgpu,18,0.029528379440307617 1721 | bench_qiskit,18,1.30916428565979 1722 | bench_projectq,18,0.03950238227844238 1723 | bench_projectq,18,0.05318903923034668 1724 | bench_qiskit,18,1.1769590377807617 1725 | bench_projectq,18,0.04226493835449219 1726 | bench_qiskit,18,1.1556830406188965 1727 | bench_projectq,18,0.03658723831176758 1728 | bench_qcgpu,18,0.030538558959960938 1729 | bench_qcgpu,18,0.029993057250976562 1730 | bench_qcgpu,18,0.029640913009643555 1731 | bench_qiskit,18,1.162926197052002 1732 | bench_qcgpu,18,0.03699064254760742 1733 | bench_projectq,18,0.03254103660583496 1734 | bench_qcgpu,18,0.029659032821655273 1735 | bench_projectq,18,0.030223369598388672 1736 | bench_projectq,18,0.04389071464538574 1737 | bench_projectq,18,0.05081915855407715 1738 | bench_projectq,18,0.18485164642333984 1739 | bench_projectq,18,0.04604959487915039 1740 | bench_projectq,18,0.05925893783569336 1741 | bench_qiskit,18,1.2643604278564453 1742 | bench_projectq,18,0.040235042572021484 1743 | bench_projectq,18,0.07312393188476562 1744 | bench_qcgpu,18,0.03033447265625 1745 | bench_qcgpu,18,0.030015945434570312 1746 | bench_qiskit,18,1.1896710395812988 1747 | bench_qiskit,18,1.263768196105957 1748 | bench_qcgpu,18,0.04017305374145508 1749 | bench_qcgpu,18,0.03146791458129883 1750 | bench_qcgpu,18,0.029313325881958008 1751 | bench_qiskit,18,1.2071969509124756 1752 | bench_qcgpu,18,0.032814741134643555 1753 | bench_qiskit,18,1.2258102893829346 1754 | bench_qiskit,18,1.1858811378479004 1755 | bench_qiskit,18,1.1886107921600342 1756 | bench_qcgpu,18,0.03667140007019043 1757 | bench_qcgpu,18,0.030676603317260742 1758 | bench_qcgpu,18,0.029620647430419922 1759 | bench_qcgpu,18,0.03059983253479004 1760 | bench_qcgpu,18,0.031213760375976562 1761 | bench_qcgpu,18,0.03697681427001953 1762 | bench_projectq,18,0.03062582015991211 1763 | bench_projectq,18,0.03440117835998535 1764 | bench_qiskit,18,1.1866605281829834 1765 | bench_qiskit,18,1.1262485980987549 1766 | bench_qiskit,18,1.1710333824157715 1767 | bench_qcgpu,18,0.029026269912719727 1768 | bench_qcgpu,18,0.02953028678894043 1769 | bench_qiskit,18,1.160991907119751 1770 | bench_qcgpu,18,0.03736114501953125 1771 | bench_qiskit,18,1.1570580005645752 1772 | bench_qiskit,18,1.1751484870910645 1773 | bench_qcgpu,18,0.038773536682128906 1774 | bench_projectq,18,0.07564401626586914 1775 | bench_projectq,18,0.04659461975097656 1776 | bench_projectq,18,0.04720878601074219 1777 | bench_qiskit,18,1.2337231636047363 1778 | bench_qcgpu,18,0.036594390869140625 1779 | bench_qcgpu,18,0.030192852020263672 1780 | bench_projectq,18,0.06354498863220215 1781 | bench_qiskit,18,1.1825141906738281 1782 | bench_qiskit,18,1.2334611415863037 1783 | bench_qcgpu,18,0.0355069637298584 1784 | bench_projectq,18,0.03361368179321289 1785 | bench_projectq,18,0.031433820724487305 1786 | bench_projectq,18,0.032486677169799805 1787 | bench_qiskit,18,1.2540943622589111 1788 | bench_qiskit,18,1.2619221210479736 1789 | bench_projectq,18,0.04906797409057617 1790 | bench_projectq,18,0.02847576141357422 1791 | bench_qiskit,18,1.1776313781738281 1792 | bench_qcgpu,18,0.0370938777923584 1793 | bench_projectq,18,0.03546023368835449 1794 | bench_projectq,18,0.034911394119262695 1795 | bench_projectq,18,0.03312492370605469 1796 | bench_projectq,18,0.03329944610595703 1797 | bench_qiskit,18,1.1678006649017334 1798 | bench_qcgpu,18,0.03666853904724121 1799 | bench_qiskit,18,1.2121059894561768 1800 | bench_qcgpu,18,0.034424781799316406 1801 | bench_qiskit,18,1.1377720832824707 1802 | bench_projectq,19,0.05411338806152344 1803 | bench_projectq,19,0.045763254165649414 1804 | bench_qiskit,19,1.9535677433013916 1805 | bench_qiskit,19,1.9513397216796875 1806 | bench_projectq,19,0.05536150932312012 1807 | bench_qcgpu,19,0.03359079360961914 1808 | bench_projectq,19,0.04993915557861328 1809 | bench_projectq,19,0.0555570125579834 1810 | bench_projectq,19,0.04787921905517578 1811 | bench_projectq,19,0.04840373992919922 1812 | bench_projectq,19,0.0758047103881836 1813 | bench_qcgpu,19,0.03230643272399902 1814 | bench_qcgpu,19,0.032453060150146484 1815 | bench_qiskit,19,2.016850709915161 1816 | bench_qcgpu,19,0.04160165786743164 1817 | bench_qiskit,19,2.060124397277832 1818 | bench_projectq,19,0.0581355094909668 1819 | bench_projectq,19,0.05284380912780762 1820 | bench_qiskit,19,1.9279406070709229 1821 | bench_projectq,19,0.06320571899414062 1822 | bench_qcgpu,19,0.033444881439208984 1823 | bench_qcgpu,19,0.03312492370605469 1824 | bench_qcgpu,19,0.03405141830444336 1825 | bench_qcgpu,19,0.033324241638183594 1826 | bench_projectq,19,0.05125570297241211 1827 | bench_qcgpu,19,0.035413503646850586 1828 | bench_projectq,19,0.15507769584655762 1829 | bench_qcgpu,19,0.03315281867980957 1830 | bench_qiskit,19,1.9214837551116943 1831 | bench_projectq,19,0.08540129661560059 1832 | bench_qiskit,19,1.9075324535369873 1833 | bench_qcgpu,19,0.03886914253234863 1834 | bench_qcgpu,19,0.03192257881164551 1835 | bench_projectq,19,0.05176544189453125 1836 | bench_qcgpu,19,0.03260970115661621 1837 | bench_projectq,19,0.08071613311767578 1838 | bench_projectq,19,0.0506744384765625 1839 | bench_projectq,19,0.0491330623626709 1840 | bench_qiskit,19,1.8659732341766357 1841 | bench_qcgpu,19,0.03923177719116211 1842 | bench_qiskit,19,1.9345667362213135 1843 | bench_qcgpu,19,0.03986239433288574 1844 | bench_qcgpu,19,0.03351092338562012 1845 | bench_qcgpu,19,0.03346991539001465 1846 | bench_qiskit,19,1.9848718643188477 1847 | bench_qiskit,19,2.0001308917999268 1848 | bench_qiskit,19,1.8933651447296143 1849 | bench_qiskit,19,1.833829402923584 1850 | bench_projectq,19,0.06961178779602051 1851 | bench_qiskit,19,1.7666714191436768 1852 | bench_projectq,19,0.057985782623291016 1853 | bench_projectq,19,0.0488131046295166 1854 | bench_projectq,19,0.04764747619628906 1855 | bench_qiskit,19,1.8626306056976318 1856 | bench_projectq,19,0.05250859260559082 1857 | bench_qiskit,19,1.8202996253967285 1858 | bench_qcgpu,19,0.034932851791381836 1859 | bench_qiskit,19,1.9377436637878418 1860 | bench_projectq,19,0.0631563663482666 1861 | bench_projectq,19,0.061834096908569336 1862 | bench_qcgpu,19,0.03440713882446289 1863 | bench_qcgpu,19,0.03387641906738281 1864 | bench_qiskit,19,2.078476667404175 1865 | bench_qcgpu,19,0.03804612159729004 1866 | bench_qcgpu,19,0.03259134292602539 1867 | bench_qcgpu,19,0.031184673309326172 1868 | bench_qiskit,19,1.839733362197876 1869 | bench_qiskit,19,1.868656873703003 1870 | bench_qiskit,19,1.8746631145477295 1871 | bench_qcgpu,19,0.038330078125 1872 | bench_qcgpu,19,0.03257584571838379 1873 | bench_projectq,19,0.0501861572265625 1874 | bench_qiskit,19,1.7947304248809814 1875 | bench_projectq,19,0.05802178382873535 1876 | bench_qiskit,19,1.8861322402954102 1877 | bench_qiskit,19,1.796888828277588 1878 | bench_qcgpu,19,0.03862452507019043 1879 | bench_qiskit,19,1.829606533050537 1880 | bench_qcgpu,19,0.03930234909057617 1881 | bench_projectq,19,0.05117940902709961 1882 | bench_qiskit,19,1.8196308612823486 1883 | bench_projectq,19,0.06156802177429199 1884 | bench_qcgpu,19,0.03204965591430664 1885 | bench_qcgpu,19,0.031325578689575195 1886 | bench_qcgpu,19,0.03123307228088379 1887 | bench_qiskit,19,1.7798049449920654 1888 | bench_qcgpu,19,0.037485599517822266 1889 | bench_projectq,19,0.04811906814575195 1890 | bench_qcgpu,19,0.03266024589538574 1891 | bench_qiskit,19,1.8426949977874756 1892 | bench_qcgpu,19,0.03616666793823242 1893 | bench_projectq,19,0.050434112548828125 1894 | bench_projectq,19,0.048485755920410156 1895 | bench_projectq,19,0.04848456382751465 1896 | bench_qcgpu,19,0.03271126747131348 1897 | bench_qiskit,19,1.8327100276947021 1898 | bench_qiskit,19,1.8863568305969238 1899 | bench_qcgpu,19,0.04286813735961914 1900 | bench_projectq,19,0.050820112228393555 1901 | bench_qiskit,19,1.8764958381652832 1902 | bench_qiskit,20,3.1904163360595703 1903 | bench_qiskit,20,3.3404154777526855 1904 | bench_qiskit,20,3.1844310760498047 1905 | bench_qiskit,20,3.173192024230957 1906 | bench_qcgpu,20,0.04124045372009277 1907 | bench_qcgpu,20,0.036930084228515625 1908 | bench_qiskit,20,3.1533453464508057 1909 | bench_qcgpu,20,0.04136371612548828 1910 | bench_qiskit,20,3.113541841506958 1911 | bench_qcgpu,20,0.042043447494506836 1912 | bench_projectq,20,0.08829307556152344 1913 | bench_qcgpu,20,0.037430524826049805 1914 | bench_qiskit,20,3.0998642444610596 1915 | bench_qcgpu,20,0.04185366630554199 1916 | bench_qiskit,20,3.229581594467163 1917 | bench_qiskit,20,3.597661018371582 1918 | bench_qiskit,20,3.672116994857788 1919 | bench_projectq,20,0.10138988494873047 1920 | bench_qcgpu,20,0.03762316703796387 1921 | bench_projectq,20,0.0976552963256836 1922 | bench_qiskit,20,3.385244607925415 1923 | bench_projectq,20,0.16540884971618652 1924 | bench_qiskit,20,3.1378414630889893 1925 | bench_qiskit,20,3.1679513454437256 1926 | bench_qcgpu,20,0.0372920036315918 1927 | bench_qcgpu,20,0.03803873062133789 1928 | bench_qcgpu,20,0.0373072624206543 1929 | bench_projectq,20,0.10135054588317871 1930 | bench_projectq,20,0.10593438148498535 1931 | bench_qcgpu,20,0.03822493553161621 1932 | bench_qiskit,20,3.1874144077301025 1933 | bench_projectq,20,0.09371328353881836 1934 | bench_projectq,20,0.09297657012939453 1935 | bench_projectq,20,0.09529232978820801 1936 | bench_qiskit,20,3.1797890663146973 1937 | bench_qiskit,20,3.417884588241577 1938 | bench_qiskit,20,3.4352540969848633 1939 | bench_projectq,20,0.11852788925170898 1940 | bench_projectq,20,0.10093808174133301 1941 | bench_projectq,20,0.09306693077087402 1942 | bench_qiskit,20,3.2734410762786865 1943 | bench_projectq,20,0.09332680702209473 1944 | bench_qiskit,20,3.4577369689941406 1945 | bench_qcgpu,20,0.044501304626464844 1946 | bench_qcgpu,20,0.037039756774902344 1947 | bench_projectq,20,0.09266781806945801 1948 | bench_qcgpu,20,0.03720235824584961 1949 | bench_qcgpu,20,0.03725790977478027 1950 | bench_qcgpu,20,0.03617429733276367 1951 | bench_qcgpu,20,0.03584909439086914 1952 | bench_projectq,20,0.0938715934753418 1953 | bench_projectq,20,0.09560990333557129 1954 | bench_qiskit,20,3.6430890560150146 1955 | bench_projectq,20,0.18615150451660156 1956 | bench_qcgpu,20,0.039650678634643555 1957 | bench_qiskit,20,3.8982839584350586 1958 | bench_projectq,20,0.0936422348022461 1959 | bench_qiskit,20,3.488755702972412 1960 | bench_projectq,20,0.17406439781188965 1961 | bench_projectq,20,0.09353160858154297 1962 | bench_projectq,20,0.223527193069458 1963 | bench_qiskit,20,3.5044736862182617 1964 | bench_qiskit,20,3.280292272567749 1965 | bench_projectq,20,0.1585710048675537 1966 | bench_qcgpu,20,0.04050564765930176 1967 | bench_qiskit,20,3.639838218688965 1968 | bench_projectq,20,0.12282061576843262 1969 | bench_projectq,20,0.09840655326843262 1970 | bench_qcgpu,20,0.03889822959899902 1971 | bench_qiskit,20,3.588425636291504 1972 | bench_projectq,20,0.17850208282470703 1973 | bench_qcgpu,20,0.038344383239746094 1974 | bench_qcgpu,20,0.03866147994995117 1975 | bench_qiskit,20,3.4031484127044678 1976 | bench_qcgpu,20,0.046523094177246094 1977 | bench_qiskit,20,3.692772388458252 1978 | bench_qiskit,20,3.6053225994110107 1979 | bench_projectq,20,0.2636086940765381 1980 | bench_qiskit,20,3.471877336502075 1981 | bench_qcgpu,20,0.046559810638427734 1982 | bench_qcgpu,20,0.0386195182800293 1983 | bench_projectq,20,0.1055605411529541 1984 | bench_projectq,20,0.1904923915863037 1985 | bench_qcgpu,20,0.041570186614990234 1986 | bench_projectq,20,0.20888781547546387 1987 | bench_qiskit,20,3.3799633979797363 1988 | bench_qcgpu,20,0.04273271560668945 1989 | bench_qiskit,20,3.477922201156616 1990 | bench_projectq,20,0.0966184139251709 1991 | bench_qcgpu,20,0.03728461265563965 1992 | bench_qcgpu,20,0.037201642990112305 1993 | bench_qcgpu,20,0.03588461875915527 1994 | bench_qiskit,20,3.138179063796997 1995 | bench_qcgpu,20,0.04091358184814453 1996 | bench_projectq,20,0.09046459197998047 1997 | bench_projectq,20,0.09528040885925293 1998 | bench_qcgpu,20,0.03725290298461914 1999 | bench_qiskit,20,3.1040711402893066 2000 | bench_projectq,20,0.10479164123535156 2001 | bench_qiskit,20,3.1717939376831055 2002 | bench_qiskit,21,7.293048858642578 2003 | bench_qcgpu,21,0.05089306831359863 2004 | bench_qcgpu,21,0.04931473731994629 2005 | bench_projectq,21,0.3562173843383789 2006 | bench_qiskit,21,7.7554919719696045 2007 | bench_projectq,21,0.352494478225708 2008 | bench_projectq,21,0.3648190498352051 2009 | bench_qcgpu,21,0.045919179916381836 2010 | bench_qiskit,21,7.755162000656128 2011 | bench_qiskit,21,8.841559410095215 2012 | bench_projectq,21,0.24204421043395996 2013 | bench_qiskit,21,7.140638589859009 2014 | bench_projectq,21,0.2741732597351074 2015 | bench_projectq,21,0.2435626983642578 2016 | bench_qiskit,21,8.047188997268677 2017 | bench_qiskit,21,7.594796180725098 2018 | bench_qcgpu,21,0.052855491638183594 2019 | bench_qiskit,21,7.953874349594116 2020 | bench_qcgpu,21,0.04960942268371582 2021 | bench_qcgpu,21,0.04390120506286621 2022 | bench_projectq,21,0.26700448989868164 2023 | bench_qiskit,21,7.809756517410278 2024 | bench_qiskit,21,9.393650770187378 2025 | bench_projectq,21,0.4884474277496338 2026 | bench_qcgpu,21,0.0455784797668457 2027 | bench_qiskit,21,7.696934938430786 2028 | bench_qiskit,21,7.5924906730651855 2029 | bench_qcgpu,21,0.04685401916503906 2030 | bench_projectq,21,0.3132662773132324 2031 | bench_qiskit,21,7.472575426101685 2032 | bench_projectq,21,0.27771663665771484 2033 | bench_qcgpu,21,0.04613184928894043 2034 | bench_projectq,21,0.26512789726257324 2035 | bench_qiskit,21,7.538678884506226 2036 | bench_projectq,21,0.3065664768218994 2037 | bench_projectq,21,0.3680107593536377 2038 | bench_qcgpu,21,0.04513669013977051 2039 | bench_qiskit,21,7.9084084033966064 2040 | bench_qiskit,21,7.713884353637695 2041 | bench_projectq,21,0.34854841232299805 2042 | bench_qcgpu,21,0.049375295639038086 2043 | bench_qiskit,21,8.168900728225708 2044 | bench_projectq,21,0.2897214889526367 2045 | bench_qiskit,21,7.95352029800415 2046 | bench_qcgpu,21,0.04817914962768555 2047 | bench_qcgpu,21,0.04432559013366699 2048 | bench_qcgpu,21,0.04401421546936035 2049 | bench_qcgpu,21,0.043921470642089844 2050 | bench_qcgpu,21,0.04388856887817383 2051 | bench_qiskit,21,7.451730728149414 2052 | bench_qiskit,21,6.994240999221802 2053 | bench_projectq,21,0.2420206069946289 2054 | bench_projectq,21,0.28327322006225586 2055 | bench_qcgpu,21,0.04428291320800781 2056 | bench_qcgpu,21,0.04386568069458008 2057 | bench_qcgpu,21,0.04383373260498047 2058 | bench_projectq,21,0.2724158763885498 2059 | bench_qcgpu,21,0.044908761978149414 2060 | bench_projectq,21,0.24237728118896484 2061 | bench_projectq,21,0.2387409210205078 2062 | bench_projectq,21,0.24196505546569824 2063 | bench_qiskit,21,8.056659936904907 2064 | bench_projectq,21,0.31514453887939453 2065 | bench_qcgpu,21,0.04536700248718262 2066 | bench_projectq,21,0.43641138076782227 2067 | bench_qiskit,21,7.320923328399658 2068 | bench_qiskit,21,7.549778938293457 2069 | bench_projectq,21,0.25455188751220703 2070 | bench_qcgpu,21,0.043955326080322266 2071 | bench_qcgpu,21,0.04353833198547363 2072 | bench_qcgpu,21,0.04344630241394043 2073 | bench_projectq,21,0.2514383792877197 2074 | bench_projectq,21,0.24776697158813477 2075 | bench_qiskit,21,7.537883520126343 2076 | bench_qcgpu,21,0.049207448959350586 2077 | bench_qiskit,21,7.046714782714844 2078 | bench_qcgpu,21,0.050222158432006836 2079 | bench_qcgpu,21,0.04409337043762207 2080 | bench_qiskit,21,7.381012916564941 2081 | bench_qcgpu,21,0.04769253730773926 2082 | bench_qcgpu,21,0.04414844512939453 2083 | bench_qcgpu,21,0.043935537338256836 2084 | bench_qcgpu,21,0.04399728775024414 2085 | bench_projectq,21,0.2676246166229248 2086 | bench_qcgpu,21,0.04594731330871582 2087 | bench_qcgpu,21,0.047635555267333984 2088 | bench_projectq,21,0.3391125202178955 2089 | bench_qiskit,21,7.675698518753052 2090 | bench_qiskit,21,7.614162445068359 2091 | bench_qcgpu,21,0.053180694580078125 2092 | bench_qcgpu,21,0.04480481147766113 2093 | bench_projectq,21,0.2566564083099365 2094 | bench_projectq,21,0.31463623046875 2095 | bench_qiskit,21,7.691249847412109 2096 | bench_projectq,21,0.2646021842956543 2097 | bench_qcgpu,21,0.047597646713256836 2098 | bench_qiskit,21,7.98919939994812 2099 | bench_qiskit,21,8.328286409378052 2100 | bench_qcgpu,21,0.04825282096862793 2101 | bench_qcgpu,21,0.05016803741455078 2102 | bench_projectq,22,0.9309444427490234 2103 | bench_qcgpu,22,0.09557533264160156 2104 | bench_projectq,22,0.8500709533691406 2105 | bench_projectq,22,0.8288760185241699 2106 | bench_qcgpu,22,0.09201502799987793 2107 | bench_qiskit,22,15.869019985198975 2108 | bench_projectq,22,0.9904711246490479 2109 | bench_qcgpu,22,0.09053349494934082 2110 | bench_qiskit,22,15.585783243179321 2111 | bench_qcgpu,22,0.09543180465698242 2112 | bench_qcgpu,22,0.09118247032165527 2113 | bench_qiskit,22,17.467591285705566 2114 | bench_projectq,22,0.9373605251312256 2115 | bench_qcgpu,22,0.09557342529296875 2116 | bench_qiskit,22,16.208741664886475 2117 | bench_qiskit,22,16.94544506072998 2118 | bench_qiskit,22,16.254603624343872 2119 | bench_qiskit,22,16.904183626174927 2120 | bench_projectq,22,0.9096949100494385 2121 | bench_qcgpu,22,0.09134793281555176 2122 | bench_qiskit,22,16.152572870254517 2123 | bench_qcgpu,22,0.09739089012145996 2124 | bench_qiskit,22,16.7340726852417 2125 | bench_projectq,22,0.9841017723083496 2126 | bench_qcgpu,22,0.0904378890991211 2127 | bench_projectq,22,0.8785405158996582 2128 | bench_qcgpu,22,0.09386682510375977 2129 | bench_qcgpu,22,0.0941305160522461 2130 | bench_qiskit,22,17.180036306381226 2131 | bench_qiskit,22,16.950554132461548 2132 | bench_qcgpu,22,0.1014091968536377 2133 | bench_qcgpu,22,0.09676861763000488 2134 | bench_projectq,22,0.9500350952148438 2135 | bench_projectq,22,0.9508929252624512 2136 | bench_projectq,22,1.1249313354492188 2137 | bench_projectq,22,0.8959352970123291 2138 | bench_qcgpu,22,0.08937311172485352 2139 | bench_projectq,22,0.8076488971710205 2140 | bench_qcgpu,22,0.09293723106384277 2141 | bench_qiskit,22,17.262608766555786 2142 | bench_qcgpu,22,0.09443259239196777 2143 | bench_qiskit,22,15.237451076507568 2144 | bench_qcgpu,22,0.09579181671142578 2145 | bench_projectq,22,1.049741506576538 2146 | bench_qcgpu,22,0.08896183967590332 2147 | bench_qiskit,22,16.71212387084961 2148 | bench_projectq,22,0.8359897136688232 2149 | bench_qiskit,22,15.690726041793823 2150 | bench_qcgpu,22,0.0982201099395752 2151 | bench_qiskit,22,16.241837978363037 2152 | bench_projectq,22,0.9942386150360107 2153 | bench_qiskit,22,16.274646043777466 2154 | bench_projectq,22,0.7796387672424316 2155 | bench_qcgpu,22,0.09385991096496582 2156 | bench_qcgpu,22,0.09066653251647949 2157 | bench_qcgpu,22,0.08995294570922852 2158 | bench_qcgpu,22,0.09038257598876953 2159 | bench_qcgpu,22,0.09010195732116699 2160 | bench_projectq,22,0.783158540725708 2161 | bench_projectq,22,0.7762293815612793 2162 | bench_qcgpu,22,0.08909034729003906 2163 | bench_projectq,22,0.7630538940429688 2164 | bench_qiskit,22,14.824341535568237 2165 | bench_qiskit,22,14.687798500061035 2166 | bench_projectq,22,0.802232027053833 2167 | bench_qcgpu,22,0.08996820449829102 2168 | bench_qcgpu,22,0.08914899826049805 2169 | bench_qiskit,22,15.926914930343628 2170 | bench_projectq,22,0.8474793434143066 2171 | bench_qcgpu,22,0.09172725677490234 2172 | bench_qiskit,22,15.401997804641724 2173 | bench_projectq,22,1.0346598625183105 2174 | bench_qcgpu,22,0.09653759002685547 2175 | bench_qcgpu,22,0.09661483764648438 2176 | bench_qcgpu,22,0.0965433120727539 2177 | bench_projectq,22,1.2399005889892578 2178 | bench_projectq,22,1.194091558456421 2179 | bench_qcgpu,22,0.0948481559753418 2180 | bench_qiskit,22,15.846442699432373 2181 | bench_projectq,22,0.876758337020874 2182 | bench_qcgpu,22,0.08922457695007324 2183 | bench_qcgpu,22,0.08913946151733398 2184 | bench_projectq,22,0.9294102191925049 2185 | bench_qcgpu,22,0.09375405311584473 2186 | bench_qcgpu,22,0.09533333778381348 2187 | bench_qcgpu,22,0.09516572952270508 2188 | bench_projectq,22,0.8773164749145508 2189 | bench_qcgpu,22,0.0901482105255127 2190 | bench_qiskit,22,15.271836519241333 2191 | bench_qcgpu,22,0.09521961212158203 2192 | bench_qcgpu,22,0.0909883975982666 2193 | bench_projectq,22,0.7940630912780762 2194 | bench_projectq,22,0.8456053733825684 2195 | bench_qcgpu,22,0.09514212608337402 2196 | bench_projectq,22,0.7735245227813721 2197 | bench_qcgpu,22,0.09419631958007812 2198 | bench_qiskit,22,15.706685543060303 2199 | bench_qcgpu,22,0.09386754035949707 2200 | bench_qcgpu,22,0.08904814720153809 2201 | bench_qiskit,22,15.697227716445923 2202 | bench_qcgpu,23,0.21158719062805176 2203 | bench_projectq,23,1.8577556610107422 2204 | bench_qiskit,23,32.011905908584595 2205 | bench_qcgpu,23,0.19928288459777832 2206 | bench_qcgpu,23,0.19272851943969727 2207 | bench_projectq,23,1.8934435844421387 2208 | bench_qcgpu,23,0.192108154296875 2209 | bench_projectq,23,1.9916889667510986 2210 | bench_qcgpu,23,0.19285368919372559 2211 | bench_qiskit,23,31.04399275779724 2212 | bench_projectq,23,1.8839685916900635 2213 | bench_qiskit,23,31.153724908828735 2214 | bench_qcgpu,23,0.20392918586730957 2215 | bench_projectq,23,1.8964776992797852 2216 | bench_projectq,23,1.8048381805419922 2217 | bench_projectq,23,1.854602336883545 2218 | bench_qcgpu,23,0.20276188850402832 2219 | bench_qiskit,23,31.514207124710083 2220 | bench_projectq,23,1.7128894329071045 2221 | bench_projectq,23,1.675943374633789 2222 | bench_projectq,23,1.6725056171417236 2223 | bench_qcgpu,23,0.1934816837310791 2224 | bench_qcgpu,23,0.19652509689331055 2225 | bench_qiskit,23,30.7232882976532 2226 | bench_projectq,23,1.7876596450805664 2227 | bench_projectq,23,1.899702548980713 2228 | bench_qcgpu,23,0.19591593742370605 2229 | bench_projectq,23,1.647583246231079 2230 | bench_projectq,23,1.6539852619171143 2231 | bench_qcgpu,23,0.2021162509918213 2232 | bench_qcgpu,23,0.19725251197814941 2233 | bench_qiskit,23,32.09992170333862 2234 | bench_qiskit,23,31.670243501663208 2235 | bench_projectq,23,1.7127344608306885 2236 | bench_qiskit,23,31.04057288169861 2237 | bench_projectq,23,1.6911323070526123 2238 | bench_projectq,23,1.6706798076629639 2239 | bench_projectq,23,1.6730570793151855 2240 | bench_qiskit,23,30.061192989349365 2241 | bench_qiskit,23,29.758788108825684 2242 | bench_qiskit,23,29.761525869369507 2243 | bench_qiskit,23,30.03110980987549 2244 | bench_qcgpu,23,0.1993122100830078 2245 | bench_qiskit,23,29.686609506607056 2246 | bench_projectq,23,1.6839287281036377 2247 | bench_qiskit,23,29.903725385665894 2248 | bench_qiskit,23,30.156851530075073 2249 | bench_projectq,23,1.6623525619506836 2250 | bench_qcgpu,23,0.19699811935424805 2251 | bench_projectq,23,1.6618638038635254 2252 | bench_qcgpu,23,0.19257450103759766 2253 | bench_qcgpu,23,0.19232773780822754 2254 | bench_qiskit,23,29.804208517074585 2255 | bench_qcgpu,23,0.1984107494354248 2256 | bench_qcgpu,23,0.1930375099182129 2257 | bench_projectq,23,1.6876895427703857 2258 | bench_qiskit,23,29.726905584335327 2259 | bench_projectq,23,1.7158093452453613 2260 | bench_qcgpu,23,0.19469451904296875 2261 | bench_projectq,23,1.7120215892791748 2262 | bench_qiskit,23,29.840946674346924 2263 | bench_qiskit,23,29.695417881011963 2264 | bench_qiskit,23,30.046760320663452 2265 | bench_qiskit,23,29.489609718322754 2266 | bench_qiskit,23,29.810806274414062 2267 | bench_qcgpu,23,0.19817256927490234 2268 | bench_qiskit,23,29.900213479995728 2269 | bench_qiskit,23,29.704719066619873 2270 | bench_projectq,23,1.8047478199005127 2271 | bench_qiskit,23,31.47317099571228 2272 | bench_qiskit,23,29.69676947593689 2273 | bench_qiskit,23,29.581740856170654 2274 | bench_projectq,23,1.6647498607635498 2275 | bench_projectq,23,1.6617140769958496 2276 | bench_qiskit,23,29.386486291885376 2277 | bench_qiskit,23,29.80206847190857 2278 | bench_qiskit,23,30.27300477027893 2279 | bench_qcgpu,23,0.20267891883850098 2280 | bench_projectq,23,1.6653435230255127 2281 | bench_qiskit,23,30.15570831298828 2282 | bench_qcgpu,23,0.20354914665222168 2283 | bench_projectq,23,1.6772856712341309 2284 | bench_qiskit,23,31.099350690841675 2285 | bench_qiskit,23,30.567037105560303 2286 | bench_qcgpu,23,0.20341014862060547 2287 | bench_qiskit,23,29.644806146621704 2288 | bench_qcgpu,23,0.2015690803527832 2289 | bench_qcgpu,23,0.19542169570922852 2290 | bench_qcgpu,23,0.19238948822021484 2291 | bench_projectq,23,1.6695888042449951 2292 | bench_qcgpu,23,0.1923372745513916 2293 | bench_projectq,23,1.8098900318145752 2294 | bench_qiskit,23,31.01140069961548 2295 | bench_qiskit,23,31.19685697555542 2296 | bench_qiskit,23,31.10517907142639 2297 | bench_projectq,23,2.0027084350585938 2298 | bench_projectq,23,1.9021353721618652 2299 | bench_qiskit,23,31.367589950561523 2300 | bench_qiskit,23,31.521010160446167 2301 | bench_projectq,23,1.7630555629730225 2302 | bench_qcgpu,24,0.42841649055480957 2303 | bench_qcgpu,24,0.4150524139404297 2304 | bench_projectq,24,4.001940727233887 2305 | bench_qcgpu,24,0.435288667678833 2306 | bench_qcgpu,24,0.4379868507385254 2307 | bench_projectq,24,3.890151023864746 2308 | bench_qcgpu,24,0.4241480827331543 2309 | bench_projectq,24,3.9346683025360107 2310 | bench_qcgpu,24,0.4373462200164795 2311 | bench_qiskit,24,65.58626079559326 2312 | bench_qcgpu,24,0.4476957321166992 2313 | bench_qcgpu,24,0.4144742488861084 2314 | bench_qcgpu,24,0.4145090579986572 2315 | bench_qiskit,24,63.93841075897217 2316 | -------------------------------------------------------------------------------- /docs/_templates/util/footer.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Configuration file for the Sphinx documentation builder. 4 | # 5 | # This file does only contain a selection of the most common options. For a 6 | # full list see the documentation: 7 | # http://www.sphinx-doc.org/en/master/config 8 | 9 | # -- Path setup -------------------------------------------------------------- 10 | 11 | # If extensions (or modules to document with autodoc) are in another directory, 12 | # add these directories to sys.path here. If the directory is relative to the 13 | # documentation root, use os.path.abspath to make it absolute, like shown here. 14 | # 15 | import os 16 | import sys 17 | sys.path.insert(0, os.path.abspath('../')) 18 | 19 | 20 | # -- Project information ----------------------------------------------------- 21 | 22 | project = u'QCGPU' 23 | copyright = u'2018, Adam Kelly' 24 | author = u'Adam Kelly' 25 | 26 | # The short X.Y version 27 | version = u'' 28 | # The full version, including alpha/beta/rc tags 29 | release = u'0.1.0' 30 | 31 | 32 | # -- General configuration --------------------------------------------------- 33 | 34 | # If your documentation needs a minimal Sphinx version, state it here. 35 | # 36 | # needs_sphinx = '1.0' 37 | 38 | # Add any Sphinx extension module names here, as strings. They can be 39 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 40 | # ones. 41 | extensions = [ 42 | 'sphinx.ext.autodoc', 43 | 'sphinx.ext.intersphinx', 44 | 'sphinx.ext.mathjax', 45 | 'sphinx.ext.ifconfig', 46 | 'sphinx.ext.githubpages', 47 | 'sphinx.ext.napoleon' 48 | ] 49 | 50 | # Add any paths that contain templates here, relative to this directory. 51 | templates_path = ['_templates'] 52 | 53 | # The suffix(es) of source filenames. 54 | # You can specify multiple suffix as a list of string: 55 | # 56 | # source_suffix = ['.rst', '.md'] 57 | source_suffix = '.rst' 58 | 59 | # The master toctree document. 60 | master_doc = 'index' 61 | 62 | # The language for content autogenerated by Sphinx. Refer to documentation 63 | # for a list of supported languages. 64 | # 65 | # This is also used if you do content translation via gettext catalogs. 66 | # Usually you set "language" from the command line for these cases. 67 | language = None 68 | 69 | # List of patterns, relative to source directory, that match files and 70 | # directories to ignore when looking for source files. 71 | # This pattern also affects html_static_path and html_extra_path. 72 | exclude_patterns = [] 73 | 74 | # The name of the Pygments (syntax highlighting) style to use. 75 | pygments_style = None 76 | 77 | 78 | # -- Options for HTML output ------------------------------------------------- 79 | 80 | # The theme to use for HTML and HTML Help pages. See the documentation for 81 | # a list of builtin themes. 82 | # 83 | html_theme = 'press' 84 | 85 | # Theme options are theme-specific and customize the look and feel of a theme 86 | # further. For a list of options available for each theme, see the 87 | # documentation. 88 | # 89 | # html_theme_options = {} 90 | 91 | # Add any paths that contain custom static files (such as style sheets) here, 92 | # relative to this directory. They are copied after the builtin static files, 93 | # so a file named "default.css" will overwrite the builtin "default.css". 94 | # html_static_path = ['_static'] 95 | 96 | # Custom sidebar templates, must be a dictionary that maps document names 97 | # to template names. 98 | # 99 | # The default sidebars (for documents that don't match any pattern) are 100 | # defined by theme itself. Builtin themes are using these templates by 101 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', 102 | # 'searchbox.html']``. 103 | # 104 | # html_sidebars = {} 105 | 106 | 107 | # -- Options for HTMLHelp output --------------------------------------------- 108 | 109 | # Output file base name for HTML help builder. 110 | htmlhelp_basename = 'QCGPUdoc' 111 | 112 | 113 | # -- Options for LaTeX output ------------------------------------------------ 114 | 115 | latex_elements = { 116 | # The paper size ('letterpaper' or 'a4paper'). 117 | # 118 | # 'papersize': 'letterpaper', 119 | 120 | # The font size ('10pt', '11pt' or '12pt'). 121 | # 122 | # 'pointsize': '10pt', 123 | 124 | # Additional stuff for the LaTeX preamble. 125 | # 126 | # 'preamble': '', 127 | 128 | # Latex figure (float) alignment 129 | # 130 | # 'figure_align': 'htbp', 131 | } 132 | 133 | # Grouping the document tree into LaTeX files. List of tuples 134 | # (source start file, target name, title, 135 | # author, documentclass [howto, manual, or own class]). 136 | latex_documents = [ 137 | (master_doc, 'QCGPU.tex', u'QCGPU Documentation', 138 | u'Adam Kelly', 'manual'), 139 | ] 140 | 141 | 142 | # -- Options for manual page output ------------------------------------------ 143 | 144 | # One entry per manual page. List of tuples 145 | # (source start file, name, description, authors, manual section). 146 | man_pages = [ 147 | (master_doc, 'qcgpu', u'QCGPU Documentation', 148 | [author], 1) 149 | ] 150 | 151 | 152 | # -- Options for Texinfo output ---------------------------------------------- 153 | 154 | # Grouping the document tree into Texinfo files. List of tuples 155 | # (source start file, target name, title, author, 156 | # dir menu entry, description, category) 157 | texinfo_documents = [ 158 | (master_doc, 'QCGPU', u'QCGPU Documentation', 159 | author, 'QCGPU', 'One line description of project.', 160 | 'Miscellaneous'), 161 | ] 162 | 163 | 164 | # -- Options for Epub output ------------------------------------------------- 165 | 166 | # Bibliographic Dublin Core info. 167 | epub_title = project 168 | 169 | # The unique identifier of the text. This can be a ISBN number 170 | # or the project homepage. 171 | # 172 | # epub_identifier = '' 173 | 174 | # A unique identification for the text. 175 | # 176 | # epub_uid = '' 177 | 178 | # A list of files that should not be packed into the epub file. 179 | epub_exclude_files = ['search.html'] 180 | 181 | 182 | # -- Extension configuration ------------------------------------------------- 183 | 184 | # -- Options for intersphinx extension --------------------------------------- 185 | 186 | # Example configuration for intersphinx: refer to the Python standard library. 187 | intersphinx_mapping = {'https://docs.python.org/': None} -------------------------------------------------------------------------------- /docs/gates.rst: -------------------------------------------------------------------------------- 1 | Quantum Gates 2 | ============= 3 | 4 | In quantum computing, gates are used to manipulate quantum registers and 5 | to implement quantum algorithms. 6 | 7 | Built-In Gates 8 | -------------- 9 | 10 | There are a number of gates built into QCGPU. They can all be applied 11 | the same way: 12 | 13 | .. code:: python 14 | 15 | import qcgpu 16 | 17 | register = qcgpu.State(2) 18 | 19 | state.h(0) # Applies the Hadamard (H) gate to the first qubit. 20 | state.x(1) # Applies a pauli-x (NOT) gate to the second qubit. 21 | 22 | ``h`` and ``x`` can be replaced with any of the following: 23 | 24 | - The Hadamard gate: **h** - ``state.h(0)`` 25 | - The S gate: **s** - ``state.s(0)`` 26 | - The T gate: **t** - ``state.t(0)`` 27 | - The Pauli-X / NOT gate: **x** - ``state.x(0)`` 28 | - The Pauli-Y gate: **y** - ``state.y(0)`` 29 | - The Pauli-Z gate: **z** - ``state.z(0)`` 30 | - The CNOT gate: **cx** - 31 | ``state.cx(0, 1) # CNOT with control = 0, target = 1`` 32 | - The SWAP gate: **swap** - 33 | ``state.swap(0,1) # Swaps the 0th and 1st qubit`` 34 | - The Toffoli gate: **toffoli** - 35 | ``state.toffoli(0, 1, 2) # Toffoli with controls = (0, 1), target = 2`` 36 | 37 | These are all shorthand methods for the application of arbitrary gates. 38 | For example, the application of a Hadamard gate above is shorthand for 39 | 40 | .. code:: python 41 | 42 | import qcgpu 43 | 44 | h = qcgpu.gate.h() 45 | 46 | register = qcgpu.State(5) 47 | register.apply_gate(h, 0) 48 | 49 | You can also use any of the gates as controlled gates. For example, the 50 | application of the CNOT gate above is shorthand for 51 | 52 | .. code:: python 53 | 54 | import qcgpu 55 | 56 | x = qcgpu.gate.x() 57 | 58 | register = qcgpu.State(5) 59 | register.apply_controlled_gate(x, 0, 1) 60 | 61 | Applying A Gate To A Whole Register 62 | ---------------------------------- 63 | 64 | There is a convenience method to apply a gate to every qubit in the register. 65 | The following applies a Hadamard gate to the whole register, 66 | 67 | .. code:: python 68 | 69 | import qcgpu 70 | 71 | h = qcgpu.gate.h() 72 | 73 | register = qcgpu.State(5) 74 | register.apply_all(h) 75 | 76 | 77 | User Defined Gates 78 | ------------------ 79 | 80 | Gates in QCGPU are represented by the ``qcgpu.Gate`` class. 81 | 82 | The only gates that can be defined by the user are single qubit gates. 83 | 84 | The process of creating a gate is 85 | 86 | .. code:: python 87 | 88 | import qcgpu 89 | import numpy as np 90 | 91 | gate_matrix = np.array([ 92 | [1, 0], 93 | [0, np.exp(1j * np.pi / 4)] 94 | ]) 95 | 96 | gate = qcgpu.Gate(gate_matrix) 97 | 98 | The input to the ``Gate`` constructor is checked to be a 2x2 unitary 99 | matrix. 100 | 101 | This newly created gate can then be applied the long hand way, 102 | 103 | .. code:: python 104 | 105 | import qcgpu 106 | 107 | register = qcgpu.State(2) 108 | register.apply_gate(gate, 0) -------------------------------------------------------------------------------- /docs/guide.rst: -------------------------------------------------------------------------------- 1 | ========== 2 | User Guide 3 | ========== 4 | 5 | This section covers the full usage of QCGPU. 6 | It will also contain some information about what each part represents. 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | registers 12 | gates 13 | operations 14 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | ===== 2 | QCGPU 3 | ===== 4 | 5 | .. image:: https://img.shields.io/travis/QCGPU/qcgpu.svg?style=for-the-badge 6 | :alt: Travis (.org) 7 | :target: https://travis-ci.org/QCGPU/qcgpu 8 | .. image:: https://img.shields.io/pypi/v/qcgpu.svg?style=for-the-badge 9 | :target: https://pypi.python.org/pypi/qcgpu 10 | :alt: PyPi Version 11 | .. image:: https://img.shields.io/pypi/l/qcgpu.svg?style=for-the-badge 12 | :target: https://pypi.python.org/pypi/qcgpu/ 13 | :alt: License 14 | .. image:: https://img.shields.io/github/stars/qcgpu/qcgpu.svg?style=for-the-badge&label=Stars 15 | :alt: GitHub stars 16 | :target: https://github.com/QCGPU/qcgpu 17 | 18 | QCGPU is an open source, high performance library for simulating 19 | quantum circuits. 20 | It takes advantage of hardware acceleration with 21 | OpenCL. 22 | Read the `research paper`_. 23 | 24 | .. _`research paper`: https://arxiv.org/abs/1805.00988 25 | 26 | 27 | Table of Contents 28 | ================== 29 | 30 | .. toctree:: 31 | :maxdepth: 3 32 | 33 | install 34 | quickstart 35 | guide 36 | 37 | 38 | .. Python Modules 39 | ============== 40 | .. autosummary:: 41 | :nosignatures: 42 | qcgpu 43 | :ref:`modindex` -------------------------------------------------------------------------------- /docs/install.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Installation 3 | ============ 4 | 5 | Prerequisites 6 | ------------- 7 | 8 | To use QCGPU you will need to be using `Python 2.7 or later `_. 9 | You will also need to ensure that you have an `OpenCL `_ implementation installed. 10 | This is done by default on MacOS, but you shuld check that ``clinfo`` or some other diagnostic command will run. 11 | 12 | You can also use `Anaconda 3 `_, which will have many of the required dependencies already installed. 13 | 14 | Installing from PyPI 15 | -------------------- 16 | 17 | This library is distributed on `PyPI `_ and can be installed using pip: 18 | 19 | .. code:: sh 20 | 21 | $ pip install qcgpu 22 | 23 | If you run into any issues, you should try installing from source. 24 | 25 | Installing from Source 26 | ---------------------- 27 | 28 | You can install QCGPU from the source. First, clone the repository off 29 | GitHub: 30 | 31 | .. code:: sh 32 | 33 | $ git clone https://github.com/qcgpu/qcgpu 34 | 35 | Then you will need to ``cd`` into the directory, and install the 36 | requirements. 37 | 38 | .. code:: sh 39 | 40 | $ pip install -r requirements.txt 41 | 42 | And finally you can install: 43 | 44 | .. code:: sh 45 | 46 | $ python setup.py install 47 | -------------------------------------------------------------------------------- /docs/operations.rst: -------------------------------------------------------------------------------- 1 | Quantum Operations 2 | ================== 3 | 4 | There are a number of operations you can perform on quantum registers 5 | with QCGPU. 6 | 7 | Measurement 8 | ----------- 9 | 10 | Measurement of a register in QCGPU doesn’t collapse the state (although 11 | this may be added in the future). When you measure the state, you can 12 | specify the number of times to sample. The output of this ``measure`` 13 | function is a dictionary with the bitstrings of the outputs, along with 14 | the number of times they were measured. 15 | 16 | You can measure a register as follows, 17 | 18 | .. code:: python 19 | 20 | import qcgpu 21 | 22 | register = qcgpu.State(5) 23 | 24 | register.measure(samples=1000) 25 | # {'00000': 1000} 26 | 27 | There is also a convenience method to measure only a single qubit. 28 | Again, the state is not collapsed 29 | 30 | .. code:: python 31 | 32 | import qcgpu 33 | 34 | register = qcgpu.State(5) 35 | 36 | register.h(0) 37 | 38 | register.measure_qubit(0, samples=1000) 39 | # {'1': 523, '0': 477} 40 | 41 | Probability 42 | ----------- 43 | 44 | QCGPU provides another method for getting the probability of each 45 | outcome. 46 | 47 | The probability of getting an outcome :math:`j` from a state 48 | :math:`\lvert \psi \rangle = \sum_{j = 0}^{2^n - 1} \alpha_j \lvert j \rangle` 49 | is 50 | 51 | .. math:: 52 | 53 | 54 | P(j) = \lvert \alpha_j \lvert^2 55 | 56 | The method ``probabilities`` returns a numpy array with each of the 57 | values corresponding to :math:`\lvert \alpha_j \lvert ^2` for each index 58 | :math:`j`. 59 | 60 | .. code:: python 61 | 62 | import qcgpu 63 | 64 | register = qcgpu.State(1) 65 | register.h(0) 66 | 67 | register.probabilities() # [0.5, 0.5] 68 | 69 | This method is particularly useful to plot the probabilities of each 70 | outcome. -------------------------------------------------------------------------------- /docs/quickstart.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | Getting Started 3 | =============== 4 | 5 | When using this library, you will most likely be using the :class:`~qiskit.State` class. 6 | This class represents the state of a quantum register. 7 | Using this class you can apply gates to the register, measure, get the state vector and things like that. 8 | 9 | To run a simple quantum circuit, you can use something like this, 10 | 11 | .. code-block:: python 12 | 13 | # Import QCGPU 14 | import qcgpu 15 | 16 | # Create a new quantum register with 2 qubits 17 | register = qcgpu.State(2) 18 | 19 | # Apply a hadamard (H) gate to the first qubit. 20 | # You should note that the qubits are zero indexed 21 | register.h(0) 22 | 23 | # Add a controlled not (CNOT/CX) gate, with the control as 24 | # the first qubit and target as the second. 25 | # The register will now be in the bell state. 26 | register.cx(0, 1) 27 | 28 | # Perform a measurement with 1000 samples 29 | results = register.measure(samples=1000) 30 | 31 | # Show the results 32 | print(results) 33 | 34 | The output of a measurement gives a dictionary of measurement outcomes, 35 | along with how often they occurred. 36 | 37 | .. code-block:: python 38 | 39 | {'00': 486, '11': 514} 40 | 41 | There are a few different ways to do things using QCGPU, 42 | so you should check out the rest of the documentation too -------------------------------------------------------------------------------- /docs/registers.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | Quantum Registers 3 | ================= 4 | 5 | QCGPU provides a class to represent the register, ``qcgpu.State``. The 6 | register class stores (on the OpenCL device) a state vector. This state 7 | vector is a chunk of memory, the size of which is: 8 | 9 | .. math:: 10 | 11 | 12 | 64 \cdot 2^n \text{ bits}. 13 | 14 | This means you would need just 2kb of memory to have a 5 qubit register, 15 | a 30 qubit register would take up 9gb of memory. 16 | 17 | This is something to be aware of, as the state vector must fit in the 18 | memory of the device you wish to use. 19 | 20 | Using the ``State`` class 21 | ------------------------- 22 | 23 | To create a new register, you can use 24 | 25 | .. code:: python 26 | 27 | import qcgpu 28 | 29 | register = qcgpu.State(5) 30 | 31 | This will create a 5 qubit register. 32 | 33 | When you run this, you may be prompted to choose a device. This is 34 | normal, as you can have more than 1 device that supports OpenCL in your 35 | computer. Just choose the one you want. 36 | 37 | Mathematical Description 38 | ------------------------- 39 | 40 | This class represents a state vector :math:`\lvert \psi \rangle` with 41 | 42 | .. math:: 43 | 44 | 45 | \lvert \psi \rangle = \sum_{j = 0}^{2^n - 1} \alpha_j \lvert j \rangle 46 | 47 | where :math:`n` is the number of qubits, :math:`\alpha_j` is the 48 | amplitude and the state is :math:`j` runs overall :math:`2^n` basis 49 | states. -------------------------------------------------------------------------------- /examples/bell_state.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Bell State / EPR Pair 5 | ===================== 6 | 7 | The Bell State, also known as the EPR pair (after Einstein, Podosky and Rosen) 8 | is the simplest example of entanglement. 9 | 10 | The Bell State is defined as the maximally entangled quantum state of two qubits. 11 | """ 12 | 13 | def bell_state(): 14 | import qcgpu 15 | 16 | print("Creating Bell State") 17 | 18 | state = qcgpu.State(2) 19 | 20 | state.h(0) 21 | state.cx(0, 1) 22 | 23 | print("Measurement Results:") 24 | print(state.measure(samples = 1000)) 25 | 26 | if __name__== "__main__": 27 | bell_state() -------------------------------------------------------------------------------- /examples/bernstein_vazirani.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Bernstein-Vazirani Algorithm 5 | ============================ 6 | 7 | This algorithm finds a hidden integer :math:`a \in \{ 0, 1\}^n` from 8 | an oracle :math:`f_a` which returns a bit :math:`a \cdot x \equiv \sum_i a_i x_i \mod 2` 9 | for an input :math:`x \in \{0,1\}^n`. 10 | 11 | A classical oracle returns :math:`f_a(x) = a \dot x \mod 2`, while the quantum oracle 12 | must be queried with superpositions of input :math:`x`'s. 13 | 14 | To solve this problem classically, the hidden integer can be found by checking the 15 | oracle with the inputs :math:`x = 1,2,\dots,2^i,2^{n-1}`, where each 16 | query reveals the :math:`i`th bit of :math:`a` (:math:`a_i`). 17 | This is the optimal classical solution, and is :math:`O(n)`. Using a quantum oracle and the 18 | Bernstein-Vazirani algorithm, :math:`a` can be found with just one query to the oracle. 19 | 20 | The Algorithm 21 | ------------- 22 | 23 | 1. Initialize :math:`n` qubits in the state :math:`\lvert 0, \dots, 0\rangle`. 24 | 2. Apply the Hadamard gate :math:`H` to each qubit. 25 | 3. Apply the inner product oracle. 26 | 4. Apply the Hadamard gate :math:`H` to each qubit. 27 | 5. Measure the register 28 | 29 | From this procedure, we find that the registers measured value is equal to that of 30 | the original hidden integer. 31 | """ 32 | 33 | def bernstein_vazirani(): 34 | import qcgpu 35 | 36 | num_qubits = 7 # The number of qubits to use 37 | a = 101 # The hidden integer, bitstring is 1100101 38 | 39 | register = qcgpu.State(num_qubits) # Create a new quantum register 40 | 41 | register.apply_all(qcgpu.gate.h()) # Apply a hadamard gate to each qubit 42 | 43 | # Apply the inner products oracle 44 | for i in range(num_qubits): 45 | if a & (1 << i) != 0: 46 | register.z(i) 47 | 48 | register.apply_all(qcgpu.gate.h()) # Apply a hadamard gate to each qubit 49 | 50 | results = register.measure(samples=1000) # Measure the register (sample 1000 times) 51 | print(results) 52 | 53 | if __name__== "__main__": 54 | bernstein_vazirani() -------------------------------------------------------------------------------- /examples/deutsch-jozsa.py: -------------------------------------------------------------------------------- 1 | import qcgpu 2 | 3 | # 3 qubits, f(x) = x_0 NOT x_1 x_2 4 | # Balanced 5 | balanced_state = qcgpu.State(3) 6 | 7 | balanced_state.apply_all(qcgpu.gate.h()) 8 | 9 | # Oracle U_f 10 | balanced_state.h(2) 11 | balanced_state.z(0) 12 | balanced_state.cx(1, 2) 13 | balanced_state.h(2) 14 | 15 | balanced_state.apply_all(qcgpu.gate.h()) 16 | 17 | outcomes = balanced_state.measure(samples = 1000) 18 | 19 | if int(max(outcomes, key=outcomes.get)) == 0: 20 | print('constant') 21 | else: 22 | print('balanced') 23 | 24 | 25 | # 3 qubits, f(x) = 0 26 | # Constant 27 | constant_state = qcgpu.State(3) 28 | 29 | constant_state.apply_all(qcgpu.gate.h()) 30 | 31 | # Oracle is equivalent to the identity gate, 32 | # thus has no effect on the state 33 | 34 | constant_state.apply_all(qcgpu.gate.h()) 35 | 36 | outcomes = constant_state.measure(samples = 1000) 37 | 38 | if int(max(outcomes, key=outcomes.get)) == 0: 39 | print('constant') 40 | else: 41 | print('balanced') -------------------------------------------------------------------------------- /examples/qft.py: -------------------------------------------------------------------------------- 1 | """ 2 | QFT 3 | ===================== 4 | 5 | This is an implementation of the quantum Fourier transform. 6 | """ 7 | 8 | import qcgpu 9 | import math 10 | 11 | def qft(): 12 | print('start') 13 | state = qcgpu.State(24) 14 | num_qubits = state.num_qubits 15 | 16 | for j in range(num_qubits): 17 | for k in range(j): 18 | state.cu1(j, k, math.pi/float(2**(j-k))) 19 | state.h(j) 20 | 21 | if __name__== "__main__": 22 | qft() -------------------------------------------------------------------------------- /make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=docs 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /qcgpu/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | QCGPU Base module 3 | """ 4 | 5 | import qcgpu.gate 6 | from qcgpu.state import State 7 | from qcgpu.gate import Gate -------------------------------------------------------------------------------- /qcgpu/backend.py: -------------------------------------------------------------------------------- 1 | import os 2 | import random 3 | import numpy as np 4 | import pyopencl as cl 5 | import pyopencl.array as pycl_array 6 | from pyopencl.reduction import ReductionKernel 7 | from collections import defaultdict 8 | 9 | # Get the OpenCL kernel 10 | kernel = """ 11 | #include 12 | 13 | /* 14 | * Returns the nth number where a given digit 15 | * is cleared in the binary representation of the number 16 | */ 17 | static int nth_cleared(int n, int target) 18 | { 19 | int mask = (1 << target) - 1; 20 | int not_mask = ~mask; 21 | 22 | return (n & mask) | ((n & not_mask) << 1); 23 | } 24 | 25 | /////////////////////////////////////////////// 26 | // KERNELS 27 | /////////////////////////////////////////////// 28 | 29 | /* 30 | * Applies a single qubit gate to the register. 31 | * The gate matrix must be given in the form: 32 | * 33 | * A B 34 | * C D 35 | */ 36 | __kernel void apply_gate( 37 | __global cfloat_t *amplitudes, 38 | int target, 39 | cfloat_t A, 40 | cfloat_t B, 41 | cfloat_t C, 42 | cfloat_t D) 43 | { 44 | int const global_id = get_global_id(0); 45 | 46 | int const zero_state = nth_cleared(global_id, target); 47 | 48 | // int const zero_state = state & (~(1 << target)); // Could just be state 49 | int const one_state = zero_state | (1 << target); 50 | 51 | cfloat_t const zero_amp = amplitudes[zero_state]; 52 | cfloat_t const one_amp = amplitudes[one_state]; 53 | 54 | amplitudes[zero_state] = cfloat_add(cfloat_mul(A, zero_amp), cfloat_mul(B, one_amp)); 55 | amplitudes[one_state] = cfloat_add(cfloat_mul(D, one_amp), cfloat_mul(C, zero_amp)); 56 | } 57 | 58 | /* 59 | * Applies a controlled single qubit gate to the register. 60 | */ 61 | __kernel void apply_controlled_gate( 62 | __global cfloat_t *amplitudes, 63 | int control, 64 | int target, 65 | cfloat_t A, 66 | cfloat_t B, 67 | cfloat_t C, 68 | cfloat_t D) 69 | { 70 | int const global_id = get_global_id(0); 71 | int const zero_state = nth_cleared(global_id, target); 72 | int const one_state = zero_state | (1 << target); // Set the target bit 73 | 74 | int const control_val_zero = (((1 << control) & zero_state) > 0) ? 1 : 0; 75 | int const control_val_one = (((1 << control) & one_state) > 0) ? 1 : 0; 76 | 77 | cfloat_t const zero_amp = amplitudes[zero_state]; 78 | cfloat_t const one_amp = amplitudes[one_state]; 79 | 80 | if (control_val_zero == 1) 81 | { 82 | amplitudes[zero_state] = cfloat_add(cfloat_mul(A, zero_amp), cfloat_mul(B, one_amp)); 83 | } 84 | 85 | if (control_val_one == 1) 86 | { 87 | amplitudes[one_state] = cfloat_add(cfloat_mul(D, one_amp), cfloat_mul(C, zero_amp)); 88 | } 89 | } 90 | 91 | /* 92 | * Applies a controlled-controlled single qubit gate to the register. 93 | */ 94 | __kernel void apply_controlled_controlled_gate( 95 | __global cfloat_t *amplitudes, 96 | int control, 97 | int control_2, 98 | int target, 99 | cfloat_t A, 100 | cfloat_t B, 101 | cfloat_t C, 102 | cfloat_t D) 103 | { 104 | int const global_id = get_global_id(0); 105 | int const zero_state = nth_cleared(global_id, target); 106 | int const one_state = zero_state | (1 << target); // Set the target bit 107 | 108 | int const control_val_zero = (((1 << control) & zero_state) > 0) ? 1 : 0; 109 | int const control_val_one = (((1 << control) & one_state) > 0) ? 1 : 0; 110 | int const control_val_two_zero = (((1 << control_2) & zero_state) > 0) ? 1 : 0; 111 | int const control_val_two_one = (((1 << control_2) & one_state) > 0) ? 1 : 0; 112 | 113 | cfloat_t const zero_amp = amplitudes[zero_state]; 114 | cfloat_t const one_amp = amplitudes[one_state]; 115 | 116 | if (control_val_zero == 1 && control_val_two_zero == 1) 117 | { 118 | amplitudes[zero_state] = cfloat_add(cfloat_mul(A, zero_amp), cfloat_mul(B, one_amp)); 119 | } 120 | 121 | if (control_val_one == 1 && control_val_two_one == 1) 122 | { 123 | amplitudes[one_state] = cfloat_add(cfloat_mul(D, one_amp), cfloat_mul(C, zero_amp)); 124 | } 125 | } 126 | 127 | /* 128 | * Swaps the states of two qubits in the register 129 | * NOT MIGRATED 130 | */ 131 | // __kernel void swap( 132 | // __global cfloat_t *const amplitudes, 133 | // __global cfloat_t *amps, 134 | // int first_qubit, 135 | // int second_qubit) 136 | // { 137 | // int const state = get_global_id(0); 138 | 139 | // int const first_bit_mask = 1 << first_qubit; 140 | // int const second_bit_mask = 1 << second_qubit; 141 | 142 | // int const new_second_bit = ((state & first_bit_mask) >> first_qubit) << second_qubit; 143 | // int const new_first_bit = ((state & second_bit_mask) >> second_qubit) << first_qubit; 144 | 145 | // int const new_state = (state & !first_bit_mask & !second_bit_mask) | new_first_bit | new_second_bit; 146 | 147 | // amps[new_state] = amplitudes[state]; 148 | // } 149 | 150 | 151 | /** 152 | * Get a single amplitude 153 | */ 154 | __kernel void get_single_amplitude( 155 | __global cfloat_t *const amplitudes, 156 | __global cfloat_t *out, 157 | int i) 158 | { 159 | out[0] = amplitudes[i]; 160 | } 161 | 162 | /** 163 | * Calculates The Probabilities Of A State Vector 164 | */ 165 | __kernel void calculate_probabilities( 166 | __global cfloat_t *const amplitudes, 167 | __global float *probabilities) 168 | { 169 | int const state = get_global_id(0); 170 | cfloat_t amp = amplitudes[state]; 171 | 172 | probabilities[state] = cfloat_abs(cfloat_mul(amp, amp)); 173 | } 174 | 175 | /** 176 | * Initializes a register to the value 1|0..100...0> 177 | * ^ target 178 | */ 179 | __kernel void initialize_register( 180 | __global cfloat_t *amplitudes, 181 | int const target) 182 | { 183 | int const state = get_global_id(0); 184 | if (state == target) 185 | { 186 | amplitudes[state] = cfloat_new(1, 0); 187 | } 188 | else 189 | { 190 | amplitudes[state] = cfloat_new(0, 0); 191 | } 192 | } 193 | 194 | /** 195 | * Collapses a qubit in the register 196 | */ 197 | __kernel void collapse( 198 | __global cfloat_t *amplitudes, 199 | int const target, 200 | int const outcome, 201 | float const norm) 202 | { 203 | int const state = get_global_id(0); 204 | 205 | if (((state >> target) & 1) == outcome) { 206 | amplitudes[state] = cfloat_mul(amplitudes[state], cfloat_new(norm, 0.0)); 207 | } 208 | else 209 | { 210 | amplitudes[state] = cfloat_new(0.0, 0.0); 211 | } 212 | } 213 | """ 214 | 215 | # Setup the OpenCL Context here to not prompt every execution 216 | context = None 217 | program = None 218 | 219 | 220 | class Backend: 221 | """ 222 | A class for the OpenCL backend to the simulator. 223 | 224 | This class shouldn't be used directly, as many of the 225 | methods don't have the same input checking as the State 226 | class. 227 | """ 228 | 229 | # @profile 230 | def __init__(self, num_qubits, dtype=np.complex64): 231 | if not context: 232 | create_context() 233 | 234 | """ 235 | Initialize a new OpenCL Backend 236 | 237 | Takes an argument of the number of qubits to use 238 | in the register, and returns the backend. 239 | """ 240 | self.num_qubits = num_qubits 241 | self.dtype = dtype 242 | 243 | self.queue = cl.CommandQueue(context) 244 | 245 | # Buffer for the state vector 246 | self.buffer = pycl_array.to_device( 247 | self.queue, 248 | np.eye(1, 2**num_qubits, dtype=dtype) 249 | ) 250 | 251 | def apply_gate(self, gate, target): 252 | """Applies a gate to the quantum register""" 253 | program.apply_gate( 254 | self.queue, 255 | [int(2**self.num_qubits / 2)], 256 | None, 257 | self.buffer.data, 258 | np.int32(target), 259 | self.dtype(gate.a), 260 | self.dtype(gate.b), 261 | self.dtype(gate.c), 262 | self.dtype(gate.d) 263 | ) 264 | 265 | def apply_controlled_gate(self, gate, control, target): 266 | """Applies a controlled gate to the quantum register""" 267 | 268 | program.apply_controlled_gate( 269 | self.queue, 270 | [int(2**self.num_qubits / 2)], 271 | None, 272 | self.buffer.data, 273 | np.int32(control), 274 | np.int32(target), 275 | self.dtype(gate.a), 276 | self.dtype(gate.b), 277 | self.dtype(gate.c), 278 | self.dtype(gate.d) 279 | ) 280 | 281 | def apply_controlled_controlled_gate(self, gate, control1, control2, target): 282 | """Applies a controlled controlled gate (such as a toffoli gate) to the quantum register""" 283 | 284 | program.apply_controlled_controlled_gate( 285 | self.queue, 286 | [int(2**self.num_qubits / 2)], 287 | None, 288 | self.buffer.data, 289 | np.int32(control1), 290 | np.int32(control2), 291 | np.int32(target), 292 | self.dtype(gate.a), 293 | self.dtype(gate.b), 294 | self.dtype(gate.c), 295 | self.dtype(gate.d) 296 | ) 297 | 298 | def seed(self, val): 299 | random.seed(val) 300 | 301 | def measure(self, samples=1): 302 | """Measure the state of a register""" 303 | # This is a really horrible method that needs a rewrite - the memory 304 | # is attrocious 305 | 306 | probabilities = self.probabilities() 307 | # print(probabilities) 308 | # print(np.sum(self.amplitudes())) 309 | choices = np.random.choice( 310 | np.arange(0, 2**self.num_qubits), 311 | samples, 312 | p=probabilities 313 | ) 314 | 315 | results = defaultdict(int) 316 | for i in choices: 317 | results[np.binary_repr(i, width=self.num_qubits)] += 1 318 | 319 | return dict(results) 320 | 321 | def measure_first(self, num, samples): 322 | probabilities = self.probabilities() 323 | # print(probabilities) 324 | # print(np.sum(self.amplitudes())) 325 | choices = np.random.choice( 326 | np.arange(0, 2**self.num_qubits), 327 | samples, 328 | p=probabilities 329 | ) 330 | 331 | results = defaultdict(int) 332 | for i in choices: 333 | key = np.binary_repr(i, width=self.num_qubits)[-num:] 334 | results[key] += 1 335 | 336 | return dict(results) 337 | 338 | 339 | def qubit_probability(self, target): 340 | """Get the probability of a single qubit begin measured as '0'""" 341 | 342 | preamble = """ 343 | #include 344 | 345 | float probability(int target, int i, cfloat_t amp) { 346 | if ((i & (1 << target )) != 0) { 347 | return 0; 348 | } 349 | // return 6.0; 350 | float abs = cfloat_abs(amp); 351 | return abs * abs; 352 | } 353 | """ 354 | 355 | 356 | kernel = ReductionKernel( 357 | context, 358 | np.float, 359 | neutral = "0", 360 | reduce_expr="a + b", 361 | map_expr="probability(target, i, amps[i])", 362 | arguments="__global cfloat_t *amps, __global int target", 363 | preamble=preamble 364 | ) 365 | 366 | return kernel(self.buffer, target).get() 367 | 368 | def reset(self, target): 369 | probability_of_0 = self.qubit_probability(target) 370 | norm = 1 / np.sqrt(probability_of_0) 371 | 372 | program.collapse( 373 | self.queue, 374 | [int(2**self.num_qubits)], 375 | # 2**self.num_qubits, 376 | None, 377 | self.buffer.data, 378 | np.int32(target), 379 | np.int32(0), 380 | np.float32(norm) 381 | ) 382 | 383 | def measure_collapse(self, target): 384 | probability_of_0 = self.qubit_probability(target) 385 | random_number = random.random() 386 | 387 | if random_number <= probability_of_0: 388 | outcome = '0' 389 | norm = 1 / np.sqrt(probability_of_0) 390 | else: 391 | outcome = '1' 392 | norm = 1 / np.sqrt(1 - probability_of_0) 393 | 394 | program.collapse( 395 | self.queue, 396 | [int(2**self.num_qubits)], 397 | # 2**self.num_qubits, 398 | None, 399 | self.buffer.data, 400 | np.int32(target), 401 | np.int32(outcome), 402 | np.float32(norm) 403 | ) 404 | return outcome 405 | 406 | def measure_qubit(self, target, samples): 407 | probability_of_0 = self.qubit_probability(target) 408 | 409 | choices = np.random.choice( 410 | [0, 1], 411 | samples, 412 | p=[probability_of_0, 1-probability_of_0] 413 | ) 414 | 415 | results = defaultdict(int) 416 | for i in choices: 417 | results[np.binary_repr(i, width=1)] += 1 418 | 419 | return dict(results) 420 | 421 | def single_amplitude(self, i): 422 | """Gets a single probability amplitude""" 423 | out = pycl_array.to_device( 424 | self.queue, 425 | np.empty(1, dtype=np.complex64) 426 | ) 427 | 428 | program.get_single_amplitude( 429 | self.queue, 430 | (1, ), 431 | None, 432 | self.buffer.data, 433 | out.data, 434 | np.int32(i) 435 | ) 436 | 437 | return out[0] 438 | 439 | def amplitudes(self): 440 | """Gets the probability amplitudes""" 441 | return self.buffer.get() 442 | 443 | def probabilities(self): 444 | """Gets the squared absolute value of each of the amplitudes""" 445 | out = pycl_array.to_device( 446 | self.queue, 447 | np.zeros(2**self.num_qubits, dtype=np.float32) 448 | ) 449 | 450 | program.calculate_probabilities( 451 | self.queue, 452 | out.shape, 453 | None, 454 | self.buffer.data, 455 | out.data 456 | ) 457 | 458 | return out.get() 459 | 460 | def release(self): 461 | self.buffer.base_data.release() 462 | 463 | def create_context(): 464 | global context 465 | global program 466 | context = cl.create_some_context() 467 | program = cl.Program(context, kernel).build(options="-cl-no-signed-zeros -cl-mad-enable -cl-fast-relaxed-math") 468 | -------------------------------------------------------------------------------- /qcgpu/gate.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import functools 3 | 4 | def memoize(func): 5 | cache = func.cache = {} 6 | 7 | @functools.wraps(func) 8 | def memoized_func(): 9 | key = 'a' 10 | if key not in cache: 11 | cache[key] = func() 12 | return cache[key] 13 | 14 | return memoized_func 15 | 16 | class Gate: 17 | def __init__(self, gate, unitary=True): 18 | gate = np.array(gate) 19 | 20 | if gate.shape != (2, 2): 21 | raise ValueError( 22 | "Gate is not a 2x2 matrix. " + 23 | "For larger gates, please decompose into 2x2 matrices " + 24 | "and/or use the controlled gate functionality." 25 | ) 26 | 27 | # Check the gate is unitary 28 | if unitary: 29 | if (not np.allclose(np.eye(gate.shape[0]), np.dot(gate.conjugate().transpose(), gate))): 30 | raise ValueError("gate is not unitary.") 31 | 32 | self.a = complex(gate[0, 0]) 33 | self.b = complex(gate[0, 1]) 34 | self.c = complex(gate[1, 0]) 35 | self.d = complex(gate[1, 1]) 36 | 37 | def __repr__(self): 38 | return '[{:.4f}, {:.4f}]\n[{:.4f}, {:.4f}]'.format(self.a, self.b, self.c, self.d) 39 | 40 | @memoize 41 | def h(): 42 | return Gate(np.array([[1, 1], [1, -1]]) / np.sqrt(2)) 43 | 44 | @memoize 45 | def x(): 46 | return Gate(np.array([[0, 1], [1, 0]])) 47 | 48 | @memoize 49 | def y(): 50 | return Gate(np.array([[0, -1j], [1j, 0]])) 51 | 52 | @memoize 53 | def z(): 54 | return Gate(np.array([[1, 0], [0, -1]])) 55 | 56 | @memoize 57 | def s(): 58 | return Gate(np.array([[1, 0], [0, 1j]])) 59 | 60 | @memoize 61 | def t(): 62 | return Gate(np.array([[1, 0], [0, np.exp(np.pi * 1j / 4)]])) 63 | 64 | @memoize 65 | def sqrt_x(): 66 | return Gate(0.5 * np.array([[1+1j, 1-1j], [1-1j, 1+1j]])) 67 | 68 | -------------------------------------------------------------------------------- /qcgpu/state.py: -------------------------------------------------------------------------------- 1 | """ 2 | Quantum Register Object 3 | """ 4 | import qcgpu 5 | from qcgpu.backend import Backend 6 | import pyopencl as cl 7 | import numpy as np 8 | 9 | class State: 10 | """A class for representing quantum registers. 11 | 12 | The State class is the QCGPU representation of a quantum 13 | register / state vector. 14 | 15 | This class is what should be used to perform the simulations, 16 | and has method for things such as applying gates, measurements, 17 | getting probabilities and such. 18 | 19 | As QCGPU uses OpenCL, you may be queried about which OpenCL device 20 | to use. This will only happen when running things such a python repl, 21 | or running a script using QCGPU from the command line. Otherwise, a 22 | device will be chosen heuristically. 23 | 24 | When the register is created, it will be left in the state 25 | 26 | .. math:: 27 | 28 | \\lvert 000 \\dots 0 \\rangle 29 | 30 | With the given number of qubits. 31 | 32 | Args: 33 | num_qubits (int): The number of qubits to create in the register. 34 | This must be greater then zero. 35 | 36 | Returns: 37 | State: A representation of the quantum register. 38 | 39 | Examples 40 | >>> qcgpu.State(3) 41 | Choose platform: 42 | [0] 43 | Choice [0]:0 44 | Set the environment variable PYOPENCL_CTX='0' to avoid being asked again. 45 | [[array(1.+0.j, dtype=complex64)] 46 | [array(0.+0.j, dtype=complex64)] 47 | [array(0.+0.j, dtype=complex64)] 48 | [array(0.+0.j, dtype=complex64)]] 49 | """ 50 | def __init__(self, num_qubits): 51 | 52 | if not isinstance(num_qubits, int): 53 | raise ValueError("num_qubits must be an int") 54 | if num_qubits <= 0: 55 | raise ValueError("num_qubits must be a positive integer") 56 | 57 | #: The number of qubits that are in the register 58 | self.num_qubits = num_qubits 59 | self.backend = Backend(num_qubits) 60 | 61 | def apply_gate(self, gate, target): 62 | """Applies a single qubit unitary gate to the register. 63 | 64 | Args: 65 | gate (~qcgpu.Gate): The gate to be applied to the register 66 | target (int): The index of the qubit in the register that the gate 67 | is to be applied to. 68 | """ 69 | if not isinstance(target, int) or target < 0: 70 | print(target) 71 | raise ValueError("target must be an int >= 0") 72 | 73 | # TODO: Check that gate is correct 74 | 75 | self.backend.apply_gate(gate, target) 76 | 77 | def apply_all(self, gate): 78 | # TODO: Check that gate is correct 79 | for i in range(self.num_qubits): 80 | self.apply_gate(gate, i) 81 | 82 | def apply_controlled_gate(self, gate, control, target): 83 | if not isinstance(target, int) or target < 0: 84 | raise ValueError("target must be an int >= 0") 85 | 86 | if not isinstance(control, int) or control < 0: 87 | raise ValueError("control must be an int >= 0") 88 | 89 | # TODO: Check that gate is correct 90 | 91 | self.backend.apply_controlled_gate(gate, control, target) 92 | 93 | def apply_controlled_controlled_gate(self, gate, control, control2, target): 94 | if not isinstance(target, int) or target < 0: 95 | raise ValueError("target must be an int >= 0") 96 | 97 | if not isinstance(control, int) or control < 0: 98 | raise ValueError("control must be an int >= 0") 99 | 100 | if not isinstance(control2, int) or control2 < 0: 101 | raise ValueError("control must be an int >= 0") 102 | 103 | # TODO: Check that gate is correct 104 | 105 | self.backend.apply_controlled_controlled_gate(gate, control, control2, target) 106 | 107 | def measure_qubit(self, target, samples=1): 108 | return self.backend.measure_qubit(target, samples) 109 | 110 | def measure_collapse(self, target): 111 | return self.backend.measure_collapse(target) 112 | 113 | def measure(self, samples=1): 114 | return self.backend.measure(samples) 115 | 116 | def measure_first(self, num=1, samples=1): 117 | return self.backend.measure_first(num, samples) 118 | 119 | def amplitudes(self): 120 | return self.backend.amplitudes()[0] 121 | 122 | def probabilities(self): 123 | return self.backend.probabilities()[0] 124 | 125 | def __repr__(self): 126 | """A string representation of the state""" 127 | 128 | # TODO: Finish this method 129 | return np.array_str(self.backend.buffer) 130 | 131 | 132 | # Gates 133 | def h(self, target): 134 | self.apply_gate(qcgpu.gate.h(), target) 135 | 136 | def x(self, target): 137 | self.apply_gate(qcgpu.gate.x(), target) 138 | 139 | def y(self, target): 140 | self.apply_gate(qcgpu.gate.y(), target) 141 | 142 | def z(self, target): 143 | self.apply_gate(qcgpu.gate.z(), target) 144 | 145 | def s(self, target): 146 | self.apply_gate(qcgpu.gate.s(), target) 147 | 148 | def t(self, target): 149 | self.apply_gate(qcgpu.gate.t(), target) 150 | 151 | def sqrt_x(self, target): 152 | self.apply_gate(qcgpu.gate.sqrt_x(), target) 153 | 154 | def cx(self, control, target): 155 | self.apply_controlled_gate(qcgpu.gate.x(), control, target) 156 | 157 | def cnot(self, control, target): 158 | self.apply_controlled_gate(qcgpu.gate.x(), control, target) 159 | 160 | def toffoli(self, control, control2, target): 161 | self.apply_controlled_controlled_gate(qcgpu.gate.x(), control, control2, target) 162 | 163 | def u(self, target, theta, phi, lda): 164 | a = np.exp(-1j * (phi + lda) / 2) * np.cos(theta / 2) 165 | b = - np.exp(-1j * (phi - lda) / 2) * np.sin(theta / 2) 166 | c = np.exp(1j * (phi - lda) / 2) * np.sin(theta / 2) 167 | d = np.exp(1j * (phi + lda) / 2) * np.cos(theta / 2) 168 | 169 | gate_matrix = np.array([ 170 | [a, b], 171 | [c, d] 172 | ]) 173 | self.apply_gate(qcgpu.Gate(gate_matrix), target) 174 | 175 | def u1(self, target, lda): 176 | self.u(target, 0, 0, lda) 177 | 178 | def u2(self, target, phi, lda): 179 | self.u(target, np.pi / 2, phi, lda) 180 | 181 | def u3(self, target, theta, phi, lda): 182 | self.u(target, theta, phi, lda) 183 | 184 | def cu(self, control, target, theta, phi, lda): 185 | a = np.exp(-1j * (phi + lda) / 2) * np.cos(theta / 2) 186 | b = - np.exp(-1j * (phi - lda) / 2) * np.sin(theta / 2) 187 | c = np.exp(1j * (phi - lda) / 2) * np.sin(theta / 2) 188 | d = np.exp(1j * (phi + lda) / 2) * np.cos(theta / 2) 189 | 190 | gate_matrix = np.array([ 191 | [a, b], 192 | [c, d] 193 | ]) 194 | self.apply_controlled_gate(qcgpu.Gate(gate_matrix), control, target) 195 | 196 | 197 | def cu1(self, control, target, lda): 198 | self.cu(control, target, 0, 0, lda) 199 | 200 | def cu2(self, control, target, phi, lda): 201 | self.cu(control, target, np.pi / 2, phi, lda) 202 | 203 | def cu3(self, control, target, theta, phi, lda): 204 | self.cu(control, target, theta, phi, lda) -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Mako==1.0.7 2 | numpy==1.15.2 3 | pybind11==2.2.4 4 | pyopencl==2018.2 5 | scipy==1.1.0 6 | Sphinx==1.8.1 7 | sphinx-press-theme -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [aliases] 2 | test=pytest 3 | 4 | [tool:pytest] 5 | addopts = --verbose -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | with open("README.md", "r") as fh: 4 | long_description = fh.read() 5 | 6 | setuptools.setup( 7 | name="qcgpu", 8 | version="0.0.4", 9 | author="Adam Kelly", 10 | author_email="adamkelly2201@gmail.com", 11 | description="An OpenCL based quantum computer simulator", 12 | long_description=long_description, 13 | long_description_content_type="text/markdown", 14 | url="https://github.com/qcgpu/qcgpu", 15 | packages=setuptools.find_packages(), 16 | classifiers=[ 17 | "Programming Language :: Python :: 3", 18 | "License :: OSI Approved :: MIT License", 19 | "Operating System :: OS Independent", 20 | ], 21 | setup_requires=['pytest-runner'], 22 | install_requires=['mako', 'pyopencl', 'pybind11', 'numpy'], 23 | tests_require=["pytest"] 24 | ) 25 | -------------------------------------------------------------------------------- /tests/test_gate.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from qcgpu.gate import Gate, h, x, y, z, s, t, sqrt_x 3 | import numpy as np 4 | 5 | def test_gate_creation(): 6 | Gate(np.array([[0, 1], [1, 0]])) # A clearly unitary gate 7 | h() 8 | x() 9 | y() 10 | z() 11 | s() 12 | t() 13 | sqrt_x() 14 | 15 | def test_using_list(): 16 | return Gate([[1, 0], [0, 1]]) 17 | 18 | def test_non_unitary_gate_creation_fails(): 19 | # A clearly non unitary gate 20 | with pytest.raises(Exception): 21 | return Gate(np.array([[12, 33], [-7j, 1]])) 22 | 23 | def test_large_gate_creation_fails(): 24 | # A gate that is not 2x2 25 | with pytest.raises(Exception): 26 | return Gate(np.ones(4)) 27 | 28 | def test_using_scalar_fails(): 29 | with pytest.raises(Exception): 30 | return Gate(2) 31 | 32 | def test_using_string_fails(): 33 | with pytest.raises(Exception): 34 | return Gate("this should fail") 35 | -------------------------------------------------------------------------------- /tests/test_gate_application.py: -------------------------------------------------------------------------------- 1 | import qcgpu 2 | from qcgpu import State 3 | import pytest 4 | import numpy as np 5 | 6 | def test_application_x(): 7 | s = State(3) 8 | 9 | x = qcgpu.gate.x() 10 | s.apply_gate(x, 0) 11 | 12 | res = np.array([0,1,0,0,0,0,0,0]).astype(np.complex64).transpose() 13 | amps = s.amplitudes() 14 | 15 | assert np.allclose(res, amps) 16 | 17 | def test_apply_all_x(): 18 | s = State(3) 19 | 20 | x = qcgpu.gate.x() 21 | s.apply_all(x) 22 | 23 | res = np.array([0,0,0,0,0,0,0,1]).astype(np.complex64).transpose() 24 | amps = s.amplitudes() 25 | 26 | assert np.allclose(res, amps) 27 | 28 | def test_application_h(): 29 | s = State(3) 30 | 31 | h = qcgpu.gate.h() 32 | s.apply_gate(h, 1) 33 | 34 | res = (1/np.sqrt(2)) * np.array([1,0,1,0,0,0,0,0]).astype(np.complex64).transpose() 35 | amps = s.amplitudes() 36 | 37 | assert np.allclose(res, amps) 38 | 39 | def test_apply_all_h(): 40 | s = State(8) 41 | 42 | h = qcgpu.gate.h() 43 | s.apply_all(h) 44 | 45 | res = (1 / np.sqrt(2**8)) * np.ones((1, 2**8), dtype=np.complex64) 46 | amps = s.amplitudes() 47 | 48 | assert np.allclose(res, amps) 49 | 50 | def test_apply_cnot_1(): 51 | s = State(2) 52 | 53 | x = qcgpu.gate.x() 54 | s.apply_controlled_gate(x, 0, 1) 55 | 56 | res = np.array([1,0,0,0]).astype(np.complex64).transpose() 57 | amps = s.amplitudes() 58 | 59 | assert np.allclose(res, amps) 60 | 61 | def test_apply_cnot_2(): 62 | s = State(2) 63 | 64 | x = qcgpu.gate.x() 65 | s.apply_gate(x, 0) 66 | s.apply_controlled_gate(x, 0, 1) 67 | 68 | res = np.array([0,0,0,1]).astype(np.complex64).transpose() 69 | amps = s.amplitudes() 70 | 71 | assert np.allclose(res, amps) -------------------------------------------------------------------------------- /tests/test_state.py: -------------------------------------------------------------------------------- 1 | from qcgpu import State 2 | import pytest 3 | 4 | def test_state_creation(): 5 | # Any machine should be able to handle 14 qubits 6 | for i in range(1, 15): 7 | State(i) 8 | 9 | def test_state_with_no_qubits_fails(): 10 | with pytest.raises(Exception): 11 | State(0) 12 | 13 | -------------------------------------------------------------------------------- /working.py: -------------------------------------------------------------------------------- 1 | import qcgpu 2 | import time 3 | 4 | s = qcgpu.State(28) 5 | h = qcgpu.gate.h() 6 | 7 | s.apply_all(h) 8 | 9 | 10 | 11 | print(s.measure(1000)) 12 | # print(s.backend.measure(samples=10000)) --------------------------------------------------------------------------------