-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from cirKITers/cx
Cx
- Loading branch information
Showing
15 changed files
with
465 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Publish | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
permissions: | ||
contents: write | ||
jobs: | ||
test: | ||
name: Trigger Tests | ||
uses: ./.github/workflows/test.yml | ||
quality: | ||
name: Trigger Quality | ||
uses: ./.github/workflows/quality.yml | ||
documentation: | ||
needs: test | ||
name: Trigger Documentation | ||
uses: ./.github/workflows/docs.yml | ||
with: | ||
test-run-id: ${{ github.run_id }} | ||
release: | ||
needs: [test, quality, documentation] | ||
name: Release | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
cache: 'poetry' | ||
- name: Compare tag and version | ||
run: | | ||
if [ "$(git tag)" = "$(poetry version --short)" ]; then | ||
echo "The tag and the version are the same, nothing to do." | ||
echo "DORELEASE=false" >> $GITHUB_ENV | ||
else | ||
echo "DORELEASE=true" >> $GITHUB_ENV | ||
fi | ||
- name: Create Release & Tag | ||
if: env.DORELEASE == 'true' | ||
run: | | ||
gh release create "$(poetry version --short)" \ | ||
--repo="$GITHUB_REPOSITORY" \ | ||
--title="${GITHUB_REPOSITORY#*/} $(poetry version --short)" \ | ||
--generate-notes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish to PyPI | ||
if: env.DORELEASE == 'true' | ||
run: | | ||
poetry install --with dev | ||
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | ||
poetry build | ||
poetry publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,38 @@ | ||
name: Testing | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_call: | ||
permissions: | ||
contents: read | ||
contents: write | ||
jobs: | ||
build: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: Install Act dependencies | ||
# if: ${{ env.ACT }} | ||
# run: | | ||
# apt update -qq > /dev/null | ||
# apt install apt-utils -y -qq > /dev/null | ||
# apt remove python3 | ||
# apt install python3.11 python3-venv pipx -y | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
cache: 'poetry' # caching pip dependencies | ||
cache: 'poetry' | ||
- name: Install dependencies | ||
run: poetry install --with dev | ||
- name: Test with pytest | ||
run: | | ||
poetry run coverage run -m pytest | ||
poetry run coverage report -m | ||
poetry run coverage html | ||
- name: Share coverage report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-report | ||
path: htmlcov/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
# QML Essentials | ||
|
||
[![version](https://img.shields.io/badge/version-0.1.12-green.svg)](https://ea3a0fbb-599f-4d83-86f1-0e71abe27513.ka.bw-cloud-instance.org/lc3267/quantum/) [![Pipx Status](https://servers.stroblme.de/api/badge/3/uptime/72?color=%2331c754&labelColor=%233f4850)](https://servers.stroblme.de/status/open) [![Quality](https://github.com/cirKITers/qml-essentials/actions/workflows/quality.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/quality.yml) [![Testing](https://github.com/cirKITers/qml-essentials/actions/workflows/test.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/test.yml) [![Documentation](https://github.com/cirKITers/qml-essentials/actions/workflows/docs.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/docs.yml) | ||
[![version](https://img.shields.io/badge/version-0.1.12-green.svg)](https://ea3a0fbb-599f-4d83-86f1-0e71abe27513.ka.bw-cloud-instance.org/lc3267/quantum/) [![Quality](https://github.com/cirKITers/qml-essentials/actions/workflows/quality.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/quality.yml) [![Testing](https://github.com/cirKITers/qml-essentials/actions/workflows/test.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/test.yml) [![Documentation](https://github.com/cirKITers/qml-essentials/actions/workflows/docs.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/docs.yml) | ||
|
||
## :scroll: About | ||
## 📜 About | ||
|
||
This repo contains some of the commonly used Ansaetze and coding stuff required for working with QML and Data-Reuploading models. | ||
There are also dedicated classes to calculate entanglement and expressiblity of a provided model as well as its Fourier coefficients. | ||
|
||
## :rocket: Getting Started | ||
## 🚀 Getting Started | ||
|
||
You can find installation instructions and documentation on the corresponding [Github Page](https://cirkiters.github.io/qml-essentials/). | ||
``` | ||
pip install qml-essentials | ||
``` | ||
or | ||
``` | ||
poetry add qml-essentials | ||
``` | ||
|
||
## :construction: Contributing | ||
To install our package from [PyPI](https://pypi.org/project/qml-essentials/). | ||
You can find details on how to use it and further documentation on the corresponding [Github Page](https://cirkiters.github.io/qml-essentials/). | ||
|
||
## 🚧 Contributing | ||
|
||
Contributions are very welcome! See [Contribution Guidelines](https://github.com/cirKITers/qml-essentials/blob/main/CONTRIBUTING.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
[![Pipx Status](https://servers.stroblme.de/api/badge/3/uptime/72?color=%2331c754&labelColor=%233f4850)](https://servers.stroblme.de/status/open) [![Lint and Pytest](https://github.com/cirKITers/qml-essentials/actions/workflows/python-app.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/python-app.yml) [![Page Build](https://github.com/cirKITers/qml-essentials/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/pages/pages-build-deployment) | ||
[![version](https://img.shields.io/badge/version-0.1.12-green.svg)](https://ea3a0fbb-599f-4d83-86f1-0e71abe27513.ka.bw-cloud-instance.org/lc3267/quantum/) [![Quality](https://github.com/cirKITers/qml-essentials/actions/workflows/quality.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/quality.yml) [![Testing](https://github.com/cirKITers/qml-essentials/actions/workflows/test.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/test.yml) [![Documentation](https://github.com/cirKITers/qml-essentials/actions/workflows/docs.yml/badge.svg)](https://github.com/cirKITers/qml-essentials/actions/workflows/docs.yml) | ||
|
||
|
||
This repo contains some of the commonly used Ansaetze and coding stuff required for working with QML and Data-Reuploading models. | ||
There are also dedicated classes to calculate entanglement and expressiblity of a provided model as well as its Fourier coefficients. | ||
There are also dedicated classes to calculate entanglement and expressiblity of a provided model as well as its Fourier coefficients. | ||
|
||
Curious? :rocket: Get started by heading to the [setup page](setup.md). | ||
|
||
If you want to contribute, please refer to our [CONTRIBUTING guide](https://github.com/cirKITers/qml-essentials/blob/main/CONTRIBUTING.md) on Github. | ||
Oh and if you want to know what's being tested, checkout our [coverage report](coverage/index.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Setup | ||
|
||
The package is available at [this index](https://ea3a0fbb-599f-4d83-86f1-0e71abe27513.ka.bw-cloud-instance.org/lc3267/quantum). | ||
This package is available via [PyPi](https://pypi.org/project/qml-essentials/). | ||
Installing this package is as simple as with any other package: | ||
|
||
There are two installation methods: | ||
`pip install qml-essentials` | ||
|
||
### [Poetry](https://python-poetry.org/) | ||
Or, if you prefer poetry: | ||
|
||
- `poetry source add --priority=supplemental quantum https://ea3a0fbb-599f-4d83-86f1-0e71abe27513.ka.bw-cloud-instance.org/lc3267/quantum/+simple/` | ||
- `poetry add --source quantum qml-essentials` | ||
`poetry add qml-essentials` | ||
|
||
### pip | ||
Once you set things up, go ahead and checkout [how to use qml-essentials](usage.md). | ||
|
||
- `pip install --index-url https://ea3a0fbb-599f-4d83-86f1-0e71abe27513.ka.bw-cloud-instance.org/lc3267/quantum/+simple/ qml-essentials` | ||
If you want to contribute to this project, a more detailled explaination is available in the [CONTRIBUTING guide](https://github.com/cirKITers/qml-essentials/blob/main/CONTRIBUTING.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.