diff --git a/.gitignore b/.gitignore index 50e17d5..6f627da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ *.pyc /vqf-venv/* +.venv/ +build/ +dist/ +vqf.egg-info/ diff --git a/README.md b/README.md index 95b31b3..175d7e1 100644 --- a/README.md +++ b/README.md @@ -63,3 +63,14 @@ I do not claim that the preprocessing part is perfect, though from manual inspec - Current version of code doesn't produce correct results for number 1465 (factors: 293 and 5). This doesn't happen always (see note about randomness above). - There are still some additional rules to add / cases to fix (see TODO in `preprocessing.py`). - In cases exhibiting some form of symmetry (as described [here](https://arxiv.org/pdf/1411.6758.pdf)), procedure of calculating squared overlap might give wrong results. The fix for numbers 56153 and 291311, has been hardcoded, but it's far from being elegant and general solution. + +## Installation + +To install this package, run the following command: + +``` +pip install git+https://github.com/mstechly/vqf.git +``` + +Please note that the installation requires the correct versions of `pyquil` and `grove` as specified in the `setup.py` file. + diff --git a/pip_freeze.txt b/pip_freeze.txt index b9ed869..9c8cead 100644 --- a/pip_freeze.txt +++ b/pip_freeze.txt @@ -1,30 +1,32 @@ -antlr4-python3-runtime==4.7.2 -certifi==2019.3.9 -chardet==3.0.4 -cycler==0.10.0 -decorator==4.4.0 -funcsigs==1.0.2 -future==0.17.1 -idna==2.8 -immutables==0.6 -kiwisolver==1.1.0 -matplotlib==3.1.0rc2 -mock==3.0.5 -mpmath==1.1.0 -msgpack==0.6.1 -networkx==2.3 -numpy==1.16.3 -pyparsing==2.4.0 -pyquil==2.6.0 -python-dateutil==2.8.0 -python-rapidjson==0.7.1 -pyzmq==18.0.1 -quantum-grove==2.0.0b0 -requests==2.21.0 -rpcq==2.5.1 -ruamel.yaml==0.15.94 -scipy==1.3.0rc2 -six==1.12.0 -sympy==1.4 -typing==3.6.6 -urllib3==1.24.3 \ No newline at end of file +antlr4-python3-runtime +certifi +chardet +cycler +decorator +funcsigs +future +idna +immutables +kiwisolver +matplotlib +mock +mpmath +msgpack +networkx +numpy +pyparsing +pyquil +python-dateutil +python-rapidjson +pyzmq +quantum-grove +requests +rpcq +ruamel.yaml +scipy +six +sympy +typing +urllib3 +poetry +setuptools \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..758516c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[tool.poetry] +name = "vqf" +version = "0.1.0" +description = "This repository contains implementation of the algorithm presented in the article \"Variational Quantum Factoring\", by Eric R. Anschuetz, Jonathan P. Olson, Alán Aspuru-Guzik, Yudong Cao." +authors = ["Michal Stechly"] +license = "Apache" +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.10" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/requirements.txt b/requirements.txt index ee3cc8c..2705e8d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -sympy==1.4 -pandas==0.24.2 -pytest==4.6.2 \ No newline at end of file +sympy +pandas +pytest diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..51cb323 --- /dev/null +++ b/setup.py @@ -0,0 +1,18 @@ +from setuptools import setup, find_packages + +setup( + name="vqf", + version="0.1.0", + description="This repository contains an implementation of the algorithm presented in the article \"Variational Quantum Factoring\", by Eric R. Anschuetz, Jonathan P. Olson, Alán Aspuru-Guzik, Yudong Cao.", + author="Michal Stechly", + license="Apache", + packages=find_packages(), + python_requires=">=3.10", + install_requires=open("requirements.txt").readlines(), + classifiers=[ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: Apache License", + "Operating System :: OS Independent", + ], +)