qoolqit 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ > Thank you for submitting a change to this project!
2
+ >
3
+ > If you haven't done so yet, we suggest you read the (see docs/CONTRIBUTOR AGREEMENT.md). This is a legal document that details the legal rights and obligations of both Pasqal and you regarding your submission. Whenever you submit code, you accept this contributor licence agreement.
@@ -0,0 +1,32 @@
1
+ name: Linting
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request: {}
8
+ workflow_dispatch: {}
9
+
10
+ jobs:
11
+ lint:
12
+
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout QoolQit
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up Python 3.10
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: '3.10'
23
+
24
+ - name: Install pre-commit
25
+ run: |
26
+ pip install pre-commit
27
+ pre-commit install
28
+
29
+ - name: Check files
30
+ run: |
31
+ pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks
32
+ pre-commit run --all-files
@@ -0,0 +1,73 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types:
6
+ [published]
7
+
8
+ concurrency:
9
+ group: fast-${{ github.head_ref || github.run_id }}
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ publish_pypi:
14
+ name: Publish package to PyPI
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ # IMPORTANT: this permission is mandatory for trusted publishing
18
+ id-token: write
19
+ steps:
20
+ - name: Check out QoolQit
21
+ uses: actions/checkout@v4
22
+ with:
23
+ ref: ${{ github.ref }}
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.10"
28
+ - name: Install Python dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install hatch
32
+ - name: Build and publish package
33
+ run: |
34
+ hatch build
35
+ - name: Publish to PyPI
36
+ uses: pypa/gh-action-pypi-publish@release/v1
37
+ - name: Confirm deployment
38
+ timeout-minutes: 5
39
+ run: |
40
+ VERSION=${GITHUB_REF#refs/tags/v}
41
+ until pip download qoolqit==$VERSION
42
+ do
43
+ echo "Failed to download from PyPI, will wait for upload and retry."
44
+ sleep 1
45
+ done
46
+
47
+ publish_docs:
48
+ name: Publish docs to github pages
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - name: Checkout QoolQit
52
+ uses: actions/checkout@v4
53
+ - name: Install JetBrains Mono font
54
+ run: |
55
+ sudo apt install -y wget unzip fontconfig
56
+ wget https://download.jetbrains.com/fonts/JetBrainsMono-2.304.zip
57
+ unzip JetBrainsMono-2.304.zip -d JetBrainsMono
58
+ mkdir -p /usr/share/fonts/truetype/jetbrains
59
+ cp JetBrainsMono/fonts/ttf/*.ttf /usr/share/fonts/truetype/jetbrains/
60
+ fc-cache -f -v
61
+ - name: Set up Python 3.10
62
+ uses: actions/setup-python@v5
63
+ with:
64
+ python-version: '3.10'
65
+ - name: Install Hatch
66
+ run: |
67
+ pip install hatch
68
+ - name: Deploy docs
69
+ run: |
70
+ git config user.name "GitHub Actions"
71
+ git config user.email "actions@github.com"
72
+ git fetch origin gh-pages
73
+ hatch -v run docs:mike deploy --push --update-aliases ${{ github.ref_name }} latest
@@ -0,0 +1,44 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - 'v[0-9]+.[0-9]+.[0-9]+'
9
+ pull_request:
10
+ branches:
11
+ - main
12
+ workflow_dispatch: {}
13
+
14
+ concurrency:
15
+ group: fast-${{ github.head_ref || github.run_id }}
16
+ cancel-in-progress: true
17
+
18
+ jobs:
19
+ test_qoolqit:
20
+ name: Run unit/integration tests
21
+ strategy:
22
+ matrix:
23
+ os: [ubuntu-latest, windows-latest, macos-latest]
24
+ python-version: ["3.10", "3.11", "3.12"]
25
+ runs-on: ${{ matrix.os }}
26
+ steps:
27
+ - name: Checkout QoolQit
28
+ uses: actions/checkout@v4
29
+ - name: Set up Python ${{ matrix.python-version }}
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: ${{ matrix.python-version }}
33
+ - name: Install Hatch
34
+ run: |
35
+ pip install hatch
36
+ - name: Run tests
37
+ run: |
38
+ hatch -v run test
39
+ - name: Upload coverage data
40
+ uses: actions/upload-artifact@v4
41
+ with:
42
+ name: "coverage-data"
43
+ path: .coverage.*
44
+ if-no-files-found: ignore
@@ -0,0 +1,52 @@
1
+ *.DS_Store
2
+ test.png
3
+ *.swp
4
+ .python-version
5
+
6
+ # Default ignored files
7
+ /.idea/
8
+ /__pycache__/
9
+ .vscode/
10
+
11
+ # Byte-compiled / optimized / DLL files
12
+ __pycache__/
13
+ *.py[cod]
14
+ *$py.class
15
+
16
+ # Unit test / coverage reports
17
+ htmlcov/
18
+ .tox/
19
+ .coverage
20
+ .coverage.*
21
+ .cache
22
+ nosetests.xml
23
+ coverage.xml
24
+ *.cover
25
+ .hypothesis/
26
+ .pytest_cache/
27
+ .mypy_cache/
28
+
29
+ # Distribution / packaging
30
+ .Python
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ build/
35
+ dist/
36
+
37
+ # Jupyter Notebook
38
+ .ipynb_checkpoints
39
+
40
+ # specific
41
+ .*.db
42
+ *.db
43
+ *.eggs
44
+ *.env
45
+ Pipfile
46
+ runs/
47
+ *venv
48
+ *~
49
+ dataset/
50
+
51
+ # Mkdocs
52
+ site/
@@ -0,0 +1,32 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.6.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-added-large-files
9
+
10
+ # Reformat source code.
11
+ - repo: https://github.com/ambv/black
12
+ rev: 24.8.0
13
+ hooks:
14
+ - id: black
15
+
16
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
17
+ rev: "v0.6.2"
18
+ hooks:
19
+ - id: ruff
20
+ args: [--fix]
21
+
22
+ - repo: https://github.com/pre-commit/mirrors-mypy
23
+ rev: v1.11.1
24
+ hooks:
25
+ - id: mypy
26
+ exclude: examples|docs
27
+
28
+ # Cleanup jupyter notebooks
29
+ - repo: https://github.com/kynan/nbstripout
30
+ rev: 0.5.0
31
+ hooks:
32
+ - id: nbstripout
qoolqit-0.0.2/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ PASQAL OPEN-SOURCE SOFTWARE LICENSE AGREEMENT (MIT-derived)
2
+
3
+ The author of the License is:
4
+ Pasqal, a Société par Actions Simplifiée (Simplified Joint Stock Company) registered under number 849 441 522 at the Registre du commerce et des sociétés (Trade and Companies Register) of Evry – France, headquartered at 24 rue Émile Baudot – 91120 – Palaiseau – France, duly represented by its Président, M. Georges-Olivier REYMOND, Hereafter referred to as « the Licensor »
5
+
6
+ - Permission is hereby granted, free of charge, to any person obtaining a copy of this software (the “Licensee”) and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The Software is “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise arising from, out of or in connection with the Software or the use or other dealings in the Software.
8
+
9
+ - If use of the Software leads to the necessary use of any patent of the Licensor and/or any of its Affiliates (defined as a company owned or controlled by the Licensor), the Licensee is granted a royalty-free license, in any country where such patent is in force, to use the object of such patent; or use the process covered by such patent,
10
+
11
+ - Such a patent license is granted for internal research or academic use of the Licensee's, which includes use by employees and students of the Licensee, acting on behalf of the Licensee, for research purposes only.
12
+
13
+ - The License is governed by the laws of France. Any dispute relating to the License, notably its execution, performance and/or termination shall be brought to, heard and tried by the Tribunal Judiciaire de Paris, regardless of the rules of jurisdiction in the matter.
qoolqit-0.0.2/PKG-INFO ADDED
@@ -0,0 +1,26 @@
1
+ Metadata-Version: 2.4
2
+ Name: qoolqit
3
+ Version: 0.0.2
4
+ Summary: A Python library for developing algorithms in the Rydberg Analog Model.
5
+ Project-URL: Documentation, https://github.com/pasqal-io/qoolqit
6
+ Project-URL: Issues, https://github.com/pasqal-io/qoolqit/issues
7
+ Project-URL: Source, https://github.com/pasqal-io/qoolqit
8
+ Author-email: João Moutiho <joao.moutinho@pasqal.com>, Roland Guichard <roland.guichard@pasqal.com>, David Teller <david.teller@pasqal.com>
9
+ License: MIT-derived
10
+ License-File: LICENSE
11
+ Keywords: quantum
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: Implementation :: CPython
18
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
19
+ Requires-Python: <3.13,>=3.10
20
+ Requires-Dist: matplotlib
21
+ Requires-Dist: pulser
22
+ Provides-Extra: extras
23
+ Requires-Dist: jupyter; extra == 'extras'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # QoolQit
@@ -0,0 +1 @@
1
+ # QoolQit
@@ -0,0 +1,89 @@
1
+ site_name: QoolQit
2
+ repo_url: "https://github.com/pasqal-io/qoolqit"
3
+ repo_name: "QoolQit"
4
+
5
+ nav:
6
+ - Home: index.md
7
+ - Getting started:
8
+ - Installation: installation.md
9
+ - API Reference: $api/qoolqit.***
10
+ - Open-source:
11
+ - Licence (MIT-Derived): LICENSE.md
12
+ - Contributor Agreement: CONTRIBUTOR AGREEMENT.md
13
+
14
+ theme:
15
+ name: material
16
+ custom_dir: docs/extras/overrides/
17
+ logo: extras/assets/logo/qoolqit_symbol_white.svg
18
+ features:
19
+ - content.code.annotate
20
+ - content.action.view
21
+ - content.action.edit
22
+ - navigation.tabs
23
+ - navigation.indexes
24
+ - navigation.sections
25
+ - content.code.copy
26
+
27
+ palette:
28
+ - media: "(prefers-color-scheme: light)"
29
+ scheme: default
30
+ primary: custom
31
+ accent: custom
32
+ toggle:
33
+ icon: material/weather-sunny
34
+ name: Switch to dark mode
35
+ - media: "(prefers-color-scheme: dark)"
36
+ scheme: slate
37
+ primary: black
38
+ accent: light green
39
+ toggle:
40
+ icon: material/weather-night
41
+ name: Switch to light mode
42
+
43
+ markdown_extensions:
44
+ - admonition # for notes
45
+ - pymdownx.arithmatex: # for mathjax
46
+ generic: true
47
+ - pymdownx.highlight:
48
+ anchor_linenums: true
49
+ - pymdownx.inlinehilite
50
+ - pymdownx.snippets
51
+ - pymdownx.superfences
52
+
53
+ plugins:
54
+ - search
55
+ - section-index
56
+ - markdown-exec
57
+ - mkapi
58
+ - mkdocstrings:
59
+ default_handler: python
60
+ handlers:
61
+ python:
62
+ selection:
63
+ filters:
64
+ - "!^_" # exlude all members starting with _
65
+ - "^__init__$" # but always include __init__ modules and methods
66
+ options:
67
+ show_root_toc_entry: false
68
+ heading_level: 3
69
+ merge_init_into_class: true
70
+ docstring_section_style: spacy
71
+
72
+ watch:
73
+ - qoolqit
74
+
75
+ extra:
76
+ version:
77
+ provider: mike
78
+
79
+ # To get nice tabs
80
+ extra_css:
81
+ - extras/css/mkdocstrings.css
82
+ - extras/css/home.css
83
+ - extras/css/colors.css
84
+
85
+ # For mathjax
86
+ extra_javascript:
87
+ - extras/javascripts/mathjax.js
88
+ - https://polyfill.io/v3/polyfill.min.js?features=es6
89
+ - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
@@ -0,0 +1,167 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "qoolqit"
7
+ description = "A Python library for developing algorithms in the Rydberg Analog Model."
8
+ readme = "README.md"
9
+ version = "0.0.2"
10
+ requires-python = ">=3.10,<3.13"
11
+ license = { text = "MIT-derived" }
12
+ keywords = ["quantum"]
13
+ authors = [
14
+ { name = "João Moutiho", email = "joao.moutinho@pasqal.com" },
15
+ { name = "Roland Guichard", email = "roland.guichard@pasqal.com" },
16
+ { name = "David Teller", email = "david.teller@pasqal.com" },
17
+ ]
18
+ classifiers = [
19
+ "Development Status :: 3 - Alpha",
20
+ "Programming Language :: Python",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: Implementation :: CPython",
25
+ "Programming Language :: Python :: Implementation :: PyPy",
26
+ ]
27
+
28
+
29
+ dependencies = [
30
+ "pulser",
31
+ "matplotlib",
32
+ ]
33
+
34
+ [tool.hatch.metadata]
35
+ allow-direct-references = true
36
+ allow-ambiguous-features = true
37
+
38
+ [project.optional-dependencies]
39
+ extras = [
40
+ "jupyter",
41
+ ]
42
+
43
+ [project.urls]
44
+ Documentation = "https://github.com/pasqal-io/qoolqit" # FIXME
45
+ Issues = "https://github.com/pasqal-io/qoolqit/issues"
46
+ Source = "https://github.com/pasqal-io/qoolqit"
47
+
48
+ [tool.hatch.envs.default]
49
+ features = ["extras"]
50
+ dependencies = [
51
+ "pytest",
52
+ "pytest-cov",
53
+ "pytest-xdist",
54
+ "pytest-asyncio",
55
+ "pytest-markdown-docs",
56
+ "nbconvert",
57
+ "ipykernel",
58
+ "pre-commit",
59
+ "black",
60
+ "isort",
61
+ "ruff",
62
+ "pydocstringformatter",
63
+ ]
64
+
65
+ [tool.hatch.envs.default.scripts]
66
+ test = "pytest -n auto --cov-report=term-missing --cov-config=pyproject.toml --cov=qoolqit --cov=tests --markdown-docs {args}"
67
+ test_readme = "pytest --markdown-docs README.md"
68
+
69
+ [tool.pytest.ini_options]
70
+ testpaths = ["tests"]
71
+ addopts = """-vvv --cov-report=term-missing --cov-config=pyproject.toml --cov=qoolqit --cov=tests --markdown-docs"""
72
+ xfail_strict = true
73
+ filterwarnings = [
74
+ "ignore:Call to deprecated create function FieldDescriptor",
75
+ "ignore:Call to deprecated create function Descriptor",
76
+ "ignore:Call to deprecated create function EnumDescriptor",
77
+ "ignore:Call to deprecated create function EnumValueDescriptor",
78
+ "ignore:Call to deprecated create function FileDescriptor",
79
+ "ignore:Call to deprecated create function OneofDescriptor",
80
+ "ignore:distutils Version classes are deprecated.",
81
+ ]
82
+ asyncio_mode="auto"
83
+ asyncio_default_fixture_loop_scope="function"
84
+
85
+ [tool.hatch.envs.docs]
86
+ dependencies = [
87
+ "mkdocs",
88
+ "mkdocs-material",
89
+ "mkdocstrings",
90
+ "mkdocstrings-python",
91
+ "mkdocs-section-index",
92
+ "mkdocs-exclude",
93
+ "mkapi",
94
+ "markdown-exec",
95
+ "mike",
96
+ ]
97
+
98
+ [tool.hatch.envs.docs.scripts]
99
+ build = "mkdocs build --clean --strict {args}"
100
+ serve = "mkdocs serve --dev-addr localhost:8000"
101
+ test = "mkdocs build --clean --strict"
102
+
103
+ [[tool.hatch.envs.test.matrix]]
104
+ python = ["310", "311", "312"]
105
+
106
+ [tool.hatch.build.targets.sdist]
107
+ exclude = [
108
+ "/.gitignore",
109
+ "/.pre-commit-config.yml",
110
+ "/tests",
111
+ "/docs",
112
+ "/examples",
113
+ ]
114
+
115
+ [tool.hatch.build.targets.wheel]
116
+ packages = ["qoolqit"]
117
+
118
+ [tool.coverage.run]
119
+ branch = true
120
+ parallel = true
121
+ # uncomment to omit any file from the
122
+ # coverage. Regexps can be used
123
+ # to select all files from a folder
124
+ #omit = [
125
+ # "template_python/to_omit.py",
126
+ #]
127
+
128
+ [tool.coverage.report]
129
+ exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
130
+
131
+ [tool.ruff]
132
+ line-length = 100
133
+
134
+ [tool.ruff.lint]
135
+ select = ["E", "F", "I", "Q"]
136
+ extend-ignore = ["F841"]
137
+ isort.required-imports = ["from __future__ import annotations"]
138
+ mccabe.max-complexity = 15
139
+ flake8-quotes.docstring-quotes = "double"
140
+
141
+ [tool.ruff.lint.per-file-ignores]
142
+ "__init__.py" = ["F401"]
143
+
144
+ [tool.black]
145
+ line-length = 100
146
+ include = '\.pyi?$'
147
+ exclude = '''
148
+ /(
149
+ \.git
150
+ | \.hg
151
+ | \.mypy_cache
152
+ | \.tox
153
+ | \.venv
154
+ | _build
155
+ | buck-out
156
+ | build
157
+ | dist
158
+ )/
159
+ '''
160
+
161
+ [tool.mypy]
162
+ python_version = "3.11"
163
+ warn_return_any = true
164
+ warn_unused_configs = true
165
+ disallow_untyped_defs = true
166
+ no_implicit_optional = false
167
+ ignore_missing_imports = true
@@ -0,0 +1,3 @@
1
+ from __future__ import annotations
2
+
3
+ from .main import hello
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+
3
+
4
+ def hello(name: str) -> str:
5
+ """
6
+ Returns a greeting message.
7
+
8
+ Arguments:
9
+ name: The name to greet
10
+
11
+ Returns
12
+ The greeting message.
13
+ """
14
+ return "Hello " + name
qoolqit-0.0.2/setup.py ADDED
@@ -0,0 +1,5 @@
1
+ from __future__ import annotations
2
+
3
+ from setuptools import setup
4
+
5
+ setup()