Welcome to the code repository for the paper "Integer Factorization through Func-QAOA." This repository contains the code necessary to reproduce the results and figures presented in the paper.
Before running the Jupyter notebooks, you need to install our modified vqf package. This is a forked version of the original package with a pyproject.toml and setup.py files for easy installation. To install it, run the following command in your terminal or command prompt:
pip install git+https://github.com/Mostafa-Atallah2020/vqf.git#egg=vqfAdditionally, make sure to install the required packages listed in requirements.txt:
pip install -r requirements.txtThe code in this repository was developed using Python 3.11.4 on Windows 10.
To use the code properly, follow these steps:
-
Start by installing the required packages and the modified
vqfpackage using the installation instructions provided above. -
Navigate to the
\examples\directory. Inside this directory, you will find two Jupyter notebooks:-
state preparation circuits.ipynb: This notebook is used for generating Figure 4 in the paper. It provides examples and demonstrates the reduction of space for the clauses. -
compression ratios.ipynb: This notebook is used for generating Figure 5 in the paper. It includes code for calculating compression ratios related to the topic of integer factorization.
-
If you have any questions, suggestions, or inquiries related to the code or this repository, please feel free to contact Mostafa Atallah at [email protected].