Skip to content

Commit 54643f5

Browse files
authored
[Doc] Contributor documentation (#109)
1 parent f3c4ed2 commit 54643f5

8 files changed

Lines changed: 152 additions & 6 deletions

File tree

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,28 @@ jobs:
4444
path: .coverage.*
4545
if-no-files-found: ignore
4646

47+
test_doc:
48+
name: Test that we can build the docs
49+
strategy:
50+
matrix:
51+
os: [ubuntu-latest]
52+
python-version: ["3.10"]
53+
runs-on: ${{ matrix.os }}
54+
steps:
55+
- name: Checkout QEK
56+
uses: actions/checkout@v4
57+
- name: Set up Python ${{ matrix.python-version }}
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
- name: Install Hatch
62+
run: |
63+
pip install hatch
64+
- name: Run tests
65+
run: |
66+
hatch -v run docs:build
67+
68+
4769
test_notebook:
4870
name: Run the Jupyter notebook tutorial (Unix)
4971
strategy:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
The Quantum Evolution Kernel is a Python library designed for the machine learning community to help users design quantum-driven similarity metrics for graphs and to use them inside kernel-based machine learning algorithms for graph data.
55

6-
The core of the library is focused on the development of a classification algorithm for molecular-graph dataset as it is presented in the published paper [Quantum feature maps for graph machine learning on a neutral atom quantum processor](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.107.042615).
6+
The core of the library is focused on the development of a classification algorithm for molecular-graph dataset as it is presented in the published paper _Quantum feature maps for graph machine learning on a neutral atom quantum processor_([Journal Paper](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.107.042615), [arXiv](https://arxiv.org/abs/2107.03247)).
77

88
Users setting their first steps into quantum computing will learn how to implement the core algorithm in a few simple steps and run it using the Pasqal Neutral Atom QPU. More experienced users will find this library to provide the right environment to explore new ideas - both in terms of methodologies and data domain - while always interacting with a simple and intuitive QPU interface.
99

docs/contributing/first contact.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# First contact
2+
3+
## Getting the code
4+
5+
The code is available on GitHub.
6+
7+
To clone it
8+
9+
```sh
10+
$ git clone git@github.com:pasqal-io/quantum-evolution-kernel.git
11+
```
12+
13+
or
14+
15+
```sh
16+
$ git clone https://github.com/pasqal-io/quantum-evolution-kernel
17+
```
18+
19+
## Hatch instructions
20+
21+
We use `hatch` and Python 3.10 for development.
22+
23+
### Setting up
24+
25+
With Python and pip installed, to setup the environment:
26+
27+
```sh
28+
$ pip install hatch
29+
$ hatch -v shell
30+
```
31+
32+
This will open a shell with all the dependencies installed.
33+
34+
### Running tests
35+
36+
To run the unit and integration tests
37+
38+
```sh
39+
$ hatch run test
40+
```
41+
42+
To run linters
43+
44+
```sh
45+
$ hatch run pre-commit run --all-files
46+
```
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# How to contribute
2+
3+
We're grateful for your interest in contributing to this library!
4+
5+
## Asking questions
6+
7+
If you have any question about this library, don't hesitate to ask!
8+
9+
For more information on how to get in touch, see our [Community Portal](https://community.pasqal.com/). In particular, we have a Community Chat, it's generally the best place to ask questions.
10+
11+
12+
## Providing feedback, requesting features and filing bugs
13+
14+
We're very interested in your feedback!
15+
16+
The best way to request a change, whether it's an improvement, a new feature or a bugfix, is through [GitHub issues](https://github.com/pasqal-io/quantum-evolution-kernel/issues). Before filing a new issue, don't forget to search if there's already an issue on the same topic.
17+
18+
If you're willing to help getting that issue resolved, that's even better! See the next section.
19+
20+
21+
## Opening Pull Requests
22+
23+
We're grateful for your [Pull Requests](https://github.com/pasqal-io/quantum-evolution-kernel/pulls) (i.e. submissions) to the code, documentation, tutorials, even this document!
24+
25+
Before your first Pull Request, you'll need to:
26+
27+
1. [Fork](https://github.com/pasqal-io/quantum-evolution-kernel/fork) the repository;
28+
2. Clone your forked repository locally, either through the GitHub console, or
29+
```sh
30+
$ git clone git@github.com:YOUR_USERNAME/quantum-evolution-kernel.git
31+
$ cd quantum-evolution-kernel
32+
$ git remote add upstream https://github.com/pasqal-io/qadence.git
33+
```
34+
3. [Setup your development environment](./first%20contact.md#hatch-instructions).
35+
36+
Before you open a Pull Request, please make sure that you have:
37+
38+
- read the [contributor agreement](../CONTRIBUTOR%20AGREEMENT.md)
39+
- followed [all the testing instructions](./first%20contact.md#running-tests).
40+
41+
42+
Our testing infrastructure will check whether your changes to the code or documentation break anything. If they don't, this will start the review cycle, during which we'll discuss with you to understand the purpose of your change, fix any issue and, hopefully, get your code merged!
43+
44+
45+
## One word about patents
46+
47+
The domain of Quantum Computing is heavily patented. If you contribute a new quantum algorithm (and not just an improvement to the library), please make sure that it's not covered by a patent!

docs/contributing/releasing.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Releasing a new version
2+
3+
You only need to read this document if you're a maintainer of this library.
4+
5+
Steps to release a new version:
6+
7+
1. Bump up the version number in pyproject.toml (e.g. `0.7.9`).
8+
2. Bump up the links in the `README.md` that point to specific versions of the documentation.
9+
3. Open a Pull Request.
10+
4. Get it merged.
11+
5. Optionally, test a pre-release
12+
1. Open the GitHub "draft new release" panel.
13+
2. Create a new tag (e.g. `v0.7.9rc1`).
14+
3. Mark the release as "pre-release".
15+
4. Confirm the release.
16+
5. Check in the Actions that the `publish` action has succeeded.
17+
6. Actually release.
18+
1. Open the GitHub "draft new release" panel.
19+
2. Create a new tag (e.g. `v0.7.9rc1`).
20+
3. Mark the release as "latest release".
21+
4. Confirm the release.
22+
5. Check in the Actions that the `publish` action has succeeded.

docs/index.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33

44
The Quantum Evolution Kernel is a Python library designed for the machine learning community to help users design quantum-driven similarity metrics for graphs and to use them inside kernel-based machine learning algorithms for graph data.
55

6-
The core of the library is focused on the development of a classification algorithm for molecular-graph dataset as it is presented in the published paper [Quantum feature maps for graph machine learning on a neutral atom quantum processor](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.107.042615).
6+
The core of the library is focused on the development of a classification algorithm for molecular-graph dataset as it is presented in the published paper _Quantum feature maps for graph machine learning on a neutral atom quantum processor_ [^1].
7+
8+
9+
[^1]: [Quantum feature maps for graph machine learning on a neutral atom quantum processor, Boris Albrecht, Constantin Dalyac, Lucas Leclerc, Luis Ortiz-Gutiérrez, Slimane Thabet, Mauro D'Arcangelo, Julia R. K. Cline, Vincent E. Elfving, Lucas Lassablière et al.](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.107.042615), [arXiv](https://arxiv.org/abs/2107.03247).
10+
711

812
Users setting their first steps into quantum computing will learn how to implement the core algorithm in a few simple steps and run it using the Pasqal Neutral Atom QPU. More experienced users will find this library to provide the right environment to explore new ideas - both in terms of methodologies and data domain - while always interacting with a simple and intuitive QPU interface.
913

1014
## Getting started
1115

12-
We provide several tutorials:
16+
You should probably start with [our Quickstart guide](./usage.md).
1317

14-
- [tutorial 1 - Using a Quantum Device to Extract Machine-Learning Features](tutorial 1 - Using a Quantum Device to Extract Machine-Learning Features.ipynb)
15-
- [tutorial 2 - Machine-Learning with the Quantum EvolutionKernel](tutorial 2 - Machine-Learning with the Quantum EvolutionKernel.ipynb)
18+
After that, we provide [several tutorials](./tutorial%201%20-%20Using%20a%20Quantum%20Device%20to%20Extract%20Machine-Learning%20Features.ipynb).
1619

1720

1821
## Getting in touch

mkdocs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ nav:
1616
- Open-source:
1717
- Licence (MIT-Derived): LICENSE.md
1818
- Contributor Agreement: CONTRIBUTOR AGREEMENT.md
19+
- Contributing:
20+
- First contact: contributing/first contact.md
21+
- How to contribute: contributing/how to contribute.md
22+
- Contributor Agreement: CONTRIBUTOR AGREEMENT.md
23+
- Release process: contributing/releasing.md
1924

2025
theme:
2126
name: material
@@ -54,6 +59,7 @@ markdown_extensions:
5459
- pymdownx.inlinehilite
5560
- pymdownx.snippets
5661
- pymdownx.superfences
62+
- footnotes
5763

5864
plugins:
5965
- search

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ dependencies = [
7676
[tool.hatch.envs.default.scripts]
7777
before_tests = "python scripts/before_tests.py"
7878
test = "pytest -n auto --cov-report=term-missing --cov-config=pyproject.toml --cov=qek --cov=tests --markdown-docs {args}"
79-
test_readme = "pytest --markdown-docs README.md"
79+
test_readme = "pytest --markdown-docs README.md docs/"
8080

8181
[tool.pytest.ini_options]
8282
testpaths = ["tests"]

0 commit comments

Comments
 (0)