HAQC -- Heuristic Algorithms for Quantum Computing Research Group
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
Metadata
Release files for haqc 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| haqc-1.0.3.tar.gz | 43.1 kB | Without provenance | Details for haqc-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| haqc-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for haqc-1.0.3-py3-none-any.whl |
Total release size: 103.6 kB
Release files / haqc-1.0.3.tar.gz
| Download URL | haqc-1.0.3.tar.gz |
|---|---|
| Size | 43.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2f85637163ff64dca92a8084ce8f27b5177660e4bd92aa492068570e8277ef8
|
|
BLAKE2b-256 checksum How to use checksums |
ec551b7a26cdbfb45e341164c521cf2d179f18f84b004909a55f841dfa27bec1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.6 Darwin/23.1.0
|
Release files / haqc-1.0.3-py3-none-any.whl
| Download URL | haqc-1.0.3-py3-none-any.whl |
|---|---|
| Size | 60.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d477de3299591b46f941021b0c81ae2b8f935e1ee0426cece2fcc6a9e8d4b4b
|
|
BLAKE2b-256 checksum How to use checksums |
305edc8e07486a315236fcb7ba278bb7bc35aa055b4bb6d59abf09ab99e3e97e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.6 Darwin/23.1.0
|
Security for haqc 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.