Skip to main content

A Heuristic Algorithm Framework for Quantum Algorithms

Project description

HAQC -- Heuristic Algorithms for Quantum Computing Research Group

build

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 to manage the python environment (the .gitignore file should already ignore it).

$ poetry install

To add a package to your new project:

$ poetry install <package>

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

Next, activate the poetry 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).

Before making a PR

In summary, before merging a PR, you should:

# 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

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:

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

poetry shell

Then do:

python -m ipykernel install --user --name=ENV_NAME

Then launch the notebook

jupyter notebook

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

Singularity

This project leverages Singularity 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

haqc-1.0.3.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

haqc-1.0.3-py3-none-any.whl (60.5 kB view details)

Uploaded Python 3

File details

Details for the file haqc-1.0.3.tar.gz.

File metadata

  • Download URL: haqc-1.0.3.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/23.1.0

File hashes

Hashes for haqc-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c2f85637163ff64dca92a8084ce8f27b5177660e4bd92aa492068570e8277ef8
MD5 b5196818a65e1b243b3a5e977b811056
BLAKE2b-256 ec551b7a26cdbfb45e341164c521cf2d179f18f84b004909a55f841dfa27bec1

See more details on using hashes here.

File details

Details for the file haqc-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: haqc-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 60.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/23.1.0

File hashes

Hashes for haqc-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8d477de3299591b46f941021b0c81ae2b8f935e1ee0426cece2fcc6a9e8d4b4b
MD5 b158ab055814e931839dd9374f772d93
BLAKE2b-256 305edc8e07486a315236fcb7ba278bb7bc35aa055b4bb6d59abf09ab99e3e97e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page