From e5169f79fcc29c8ec0d0d034d2379ff8ad8b18b7 Mon Sep 17 00:00:00 2001 From: Dan Mills <52407433+daniel-mills-cqc@users.noreply.github.com> Date: Mon, 2 Dec 2024 09:49:33 +0000 Subject: [PATCH] docs: Refresh readme (#177) * Refresh readme * Minor additions --- README.md | 81 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 96b8adef..5bd0e735 100644 --- a/README.md +++ b/README.md @@ -2,58 +2,77 @@ [![PyPI version](https://badge.fury.io/py/qermit.svg)](https://badge.fury.io/py/qermit) -`qermit` is a python module for running error-mitigation protocols on quantum processors using the [pytket](https://docs.quantinuum.com/tket) quantum computing toolkit. +Qermit is a python module for running error-mitigation protocols on quantum processors. +It is an extension to the [pytket](https://docs.quantinuum.com/tket) quantum computing toolkit. -This repo contains API documentation, a user manual for getting started with `qermit` and source code. +This repository contains source code and API documentation. +For details on building the docs please see `docs/README.md` ## Getting Started -`qermit` is compatible with the `pytket` 1.0 release and so is available for Python 3.9, 3.10 and 3.11 on Linux, MacOS and Windows. To install, run: +``` +pip install qermit +``` +You may also wish to install the package from source: +``` +pip install -e . +``` +A `poetry.lock` file is included for use with [poetry](https://python-poetry.org/docs/cli/#install). -``pip install qermit`` - -API documentation can be found at [cqcl.github.io/Qermit](https://cqcl.github.io/Qermit). - -To get a more in depth explanation of Qermit and its features including how to construct custom methods see the [manual](https://cqcl.github.io/Qermit/manual/) which includes examples. - - +API documentation can be found at [qerm.it](https://qerm.it). ## Bugs Please file bugs on the Github [issue tracker](https://github.com/CQCL/Qermit/issues). -## How to cite +## Contributing -If you wish to cite Qermit in any academic publications, we generally recommend citing our [benchmarking paper](https://doi.org/10.48550/arXiv.2204.09725) for most cases. +Pull requests or feature suggestions are very welcome. +To make a PR, first fork the repository, make your proposed changes, and open a PR from your fork. -## Contributing +## Code style -Pull requests or feature suggestions are very welcome. To make a PR, first fork the repo, make your proposed -changes on the `main` branch, and open a PR from your fork. If it passes -tests and is accepted after review, it will be merged in. +Style checks are run by continuous integration. +To install the dependencies required to run them locally run: +``` +pip install qermit[tests] +``` -### Code style +### Formatting -#### Formatting +This repository uses [ruff](https://docs.astral.sh/ruff/) for formatting and linting. +To check if your changes meet these standards run: +``` +ruff check +ruff format --check +``` -All code should adhere to [flake8](https://flake8.pycqa.org/en/latest/) -formatting, ignoring only E501 and W503 +### Type annotation -#### Type annotation +[mypy](https://mypy.readthedocs.io/en/stable/) is used as a static type checker. +``` +mypy -p qermit +``` -On the CI, [mypy](https://mypy.readthedocs.io/en/stable/) is used as a static -type checker and all submissions must pass its checks. You should therefore run -`mypy` locally on any changed files before submitting a PR. +## Tests -### Tests +Tests are run by continuous integration. +To install the dependencies required to run them locally run: +``` +pip install qermit[tests] +``` -To run the tests: +To run tests use: +``` +cd tests +pytest +``` -1. `cd` into the `tests` directory; -2. ensure you have installed `pytest`; -3. run `pytest`. +When adding a new feature, please add a test for it. +When fixing a bug, please add a test that demonstrates the fix. + +## How to cite -When adding a new feature, please add a test for it. When fixing a bug, please -add a test that demonstrates the fix. +If you wish to cite Qermit, we recommend citing our [benchmarking paper](https://quantum-journal.org/papers/q-2023-07-13-1059/) where possible.