Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Package Installable #5

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
*.pyc
/vqf-venv/*
.venv/
build/
dist/
vqf.egg-info/
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

62 changes: 32 additions & 30 deletions pip_freeze.txt
Original file line number Diff line number Diff line change
@@ -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
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
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sympy==1.4
pandas==0.24.2
pytest==4.6.2
sympy
pandas
pytest
18 changes: 18 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
],
)