Metadata-Version: 2.1
Name: haqc
Version: 0.1.1
Summary: A Heuristic Algorithm Framework for Quantum Algorithms
Author: Vivek Katial
Author-email: vivekkatial@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: Jinja2 (==3.1.2)
Requires-Dist: Mako (==1.2.3)
Requires-Dist: MarkupSafe (==2.1.1)
Requires-Dist: PyYAML (==6.0.1)
Requires-Dist: SQLAlchemy (==1.4.42)
Requires-Dist: black (==22.10.0)
Requires-Dist: boto3 (==1.24.91)
Requires-Dist: botocore (==1.27.91)
Requires-Dist: build (>=1.0.3,<2.0.0)
Requires-Dist: certifi (==2022.9.24)
Requires-Dist: cffi (==1.15.1)
Requires-Dist: charset-normalizer (==2.1.1)
Requires-Dist: click (==8.1.3)
Requires-Dist: iniconfig (==1.1.1)
Requires-Dist: ipykernel (==6.16.0)
Requires-Dist: ipython (==8.4.0)
Requires-Dist: ipywidgets (==8.0.2)
Requires-Dist: itsdangerous (==2.1.2)
Requires-Dist: jedi (==0.18.1)
Requires-Dist: jmespath (==1.0.1)
Requires-Dist: kiwisolver (==1.4.4)
Requires-Dist: matplotlib (==3.6.1)
Requires-Dist: matplotlib-inline (==0.1.6)
Requires-Dist: mlflow (==2.9.2)
Requires-Dist: networkx (==2.8.7)
Requires-Dist: numpy (==1.23.4)
Requires-Dist: oauthlib (==3.2.1)
Requires-Dist: packaging (==21.3)
Requires-Dist: pandas (==1.5.0)
Requires-Dist: parso (==0.8.3)
Requires-Dist: plotly (>=5.18.0,<6.0.0)
Requires-Dist: pylatexenc (>=2.10,<3.0)
Requires-Dist: pynauty (>=2.8.6,<3.0.0)
Requires-Dist: pytest (==7.1.3)
Requires-Dist: python-dateutil (==2.8.2)
Requires-Dist: python-louvain (==0.16)
Requires-Dist: pytz (==2022.4)
Requires-Dist: pyzmq (==24.0.1)
Requires-Dist: qiskit (==0.39.0)
Requires-Dist: qiskit-aer (==0.11.0)
Requires-Dist: qiskit-ibmq-provider (==0.19.2)
Requires-Dist: qiskit-optimization (==0.4.0)
Requires-Dist: qiskit-terra (==0.22.0)
Requires-Dist: querystring-parser (==1.2.4)
Requires-Dist: requests (==2.28.1)
Requires-Dist: requests_ntlm (==1.1.0)
Requires-Dist: retworkx (==0.12.0)
Requires-Dist: rustworkx (==0.12.0)
Requires-Dist: s3transfer (==0.6.0)
Requires-Dist: scipy (>=1.5.0,<1.11.0)
Requires-Dist: seaborn (==0.12.0)
Requires-Dist: six (==1.16.0)
Requires-Dist: smmap (==5.0.0)
Requires-Dist: sympy (==1.11.1)
Requires-Dist: tqdm (>=4.66.1,<5.0.0)
Description-Content-Type: text/markdown

# HAQC -- Heuristic Algorithms for Quantum Computing Research Group

![build](https://github.com/vivekkatial/HAQC/actions/workflows/build-container-and-release.yml/badge.svg)

Research group to run optimisation algorithms on Quantum Computers at the University of Melbourne 

## Getting Started

Before getting started, ensure you have Python 3.7+. We use [poetry](https://python-poetry.org/) to manage the python environment (the .gitignore file should already ignore it).

```{shell}
$ poetry install
```

To add a package to your new project:

```{shell}
$ poetry install <package>
```

This will automatically edit your `pyproject.toml` file with the new package you provided.

Next, activate the `poetry` shell:

```{shell}
$ poetry shell
$ python --version
```

This will spawn a new shell subprocess, which can be deactivated by using exit.

## Contributing

### Testing 

For testing, we use `pytest`. To run the tests, just type the command `pytest`, or you can specify a file e.g. `pytest tests/test_graph_generator.py`.

We will use `black` as our code formatter. Simply run `black -S .` to run black over all the files before committing. The `-S` is to skip string normalisation, because we prefer single quotes/don't really care ([flame war, I know](https://github.com/psf/black/issues/118)).

### Before making a PR

In summary, before merging a PR, you should:

```bash
# Make sure all tests pass
cd src
pipenv run python -m pytest tests/*

# Format with black
pipenv run python -m black -S .
```

## MLFlow Tracking

To get the MLFlow tracking functionality to work you will need to setup `awscli` credentials, so MLFlow can properly log artifacts.

If you're keen to do this then please follow the instructions [here](https://wiki-rcs.unimelb.edu.au/display/RCS/AWS+CLI)

You can request the credentials for this experiment from Vivek at vkatial@student.unimelb.edu.au

## Running a test instance

To run a test instance try out the steps below:

```bash
python qaoa_vrp/main.py -f test -T False # -T tracking for MLFlow
```

### Jupyter Notebooks

First ensure that your Python is _not_ aliased in your `.bashrc` or `.zshrc` file.

After this launch your `poetry` by

```{shell}
poetry shell
```

Then do:

```{shell}
python -m ipykernel install --user --name=ENV_NAME
```

Then launch the notebook

```{shell}
jupyter notebook
```

In your notebook, Kernel -> Change Kernel. Your kernel should now be an option.

<img src='images/jupyter-install.png'/>

## Singularity

This project leverages [Singularity](https://github.com/singularityhub/) to ensure the code is reproducible and manage dependencies. 

You can find the recipe for our container in `SingularityFile.def`. There are various apps for each different type of experiment we run,


## CI/CD 

We use Github Actions for CI/CD. Everytime a PR is created, a test build of the singularity container runs. When merging into `main` we do a release of the container.

## Authors
- Vivek Katial

