qml-essentials 0.3.0__tar.gz → 0.3.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.
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/workflows/docs-publish.yml +11 -17
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/workflows/docs.yml +12 -18
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/workflows/publish.yml +13 -13
- qml_essentials-0.3.2/.github/workflows/quality-publish.yml +23 -0
- qml_essentials-0.3.2/.github/workflows/quality.yml +24 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/workflows/test-on-pr.yml +7 -8
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/workflows/test-on-publish.yml +7 -8
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/CITATION.cff +4 -2
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/PKG-INFO +4 -3
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/ansaetze.md +1 -1
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/entanglement.md +40 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/pyproject.toml +5 -4
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/ansaetze.py +16 -13
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/entanglement.py +76 -3
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/topologies.py +41 -1
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_ansaetze.py +98 -1
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_model.py +18 -0
- qml_essentials-0.3.2/uv.lock +2652 -0
- qml_essentials-0.3.0/.github/workflows/quality-publish.yml +0 -24
- qml_essentials-0.3.0/.github/workflows/quality.yml +0 -25
- qml_essentials-0.3.0/uv.lock +0 -1968
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/CODEOWNERS +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/ISSUE_TEMPLATE/code-health.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/dependabot.yml +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.github/workflows/dependabot-approve.yml +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.gitignore +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/.pre-commit-config.yaml +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/CONTRIBUTING.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/LICENSE +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/README.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/algebra.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/ansaetze.ipynb +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/coefficients.ipynb +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/coefficients.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/diagrams.drawio +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/expressibility.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/bloch-sphere.svg +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuit_tikz_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuit_tikz_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_10_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_10_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_13_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_13_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_14_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_14_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_15_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_15_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_16_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_16_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_17_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_17_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_18_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_18_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_19_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_19_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_1_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_1_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_20_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_20_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_2_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_2_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_3_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_3_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_4_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_4_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_5_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_5_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_6_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_6_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_7_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_7_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_8_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_8_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_9_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Circuit_9_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/GHZ_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/GHZ_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Hardware_Efficient_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Hardware_Efficient_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/No_Ansatz_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/No_Ansatz_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/No_Entangling_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/No_Entangling_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Strongly_Entangling_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_4q/Strongly_Entangling_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_10_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_10_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_13_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_13_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_14_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_14_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_15_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_15_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_16_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_16_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_17_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_17_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_18_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_18_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_19_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_19_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_1_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_1_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_20_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_20_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_2_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_2_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_3_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_3_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_4_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_4_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_5_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_5_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_6_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_6_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_7_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_7_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_8_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_8_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_9_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Circuit_9_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/GHZ_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/GHZ_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Hardware_Efficient_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Hardware_Efficient_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/No_Ansatz_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/No_Ansatz_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/No_Entangling_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/No_Entangling_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Strongly_Entangling_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_5q/Strongly_Entangling_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_10_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_10_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_13_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_13_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_14_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_14_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_15_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_15_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_16_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_16_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_17_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_17_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_18_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_18_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_19_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_19_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_1_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_1_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_20_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_20_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_2_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_2_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_3_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_3_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_4_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_4_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_5_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_5_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_6_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_6_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_7_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_7_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_8_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_8_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_9_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Circuit_9_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/GHZ_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/GHZ_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Hardware_Efficient_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Hardware_Efficient_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/No_Ansatz_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/No_Ansatz_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/No_Entangling_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/No_Entangling_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Strongly_Entangling_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/circuits_6q/Strongly_Entangling_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/code.svg +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/fourier_fingerprint_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/fourier_fingerprint_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/fourier_series_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/fourier_series_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/fourier_series_tf_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/fourier_series_tf_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/histogram.svg +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/invert_images.sh +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_2d_psd_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_2d_psd_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_fct_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_fct_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_fct_spectr_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_fct_spectr_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_fct_spectr_os_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_fct_spectr_os_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_fct_spectr_ours_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_fct_spectr_ours_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_psd_an_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_psd_an_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_psd_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/model_psd_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/rel-entropy.svg +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/trained_series_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/trained_series_dataset_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/trained_series_dataset_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/trained_series_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/trained_series_tf_dark.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/figures/trained_series_tf_light.png +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/generate_circuits.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/index.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/javascripts/mathjax.js +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/logo.svg +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/metrics.ipynb +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/noise.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/pulses.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/random_sampling.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/references.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/style.css +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/training.ipynb +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/training.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/usage.ipynb +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/docs/usage.md +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/mkdocs.yml +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/__init__.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/algebra.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/coefficients.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/expressibility.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/model.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/pauli.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/random_sampling.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/states.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/qml_essentials/trainability.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/__init__.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/conftest.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_algebra.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_coefficients.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_entanglement.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_expressiblity.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_matchgate_migration.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_math_model.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_pauli_circuit.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_random_sampling.py +0 -0
- {qml_essentials-0.3.0 → qml_essentials-0.3.2}/tests/test_states.py +0 -0
|
@@ -9,21 +9,18 @@ permissions:
|
|
|
9
9
|
contents: write
|
|
10
10
|
pages: write
|
|
11
11
|
id-token: write
|
|
12
|
+
env:
|
|
13
|
+
UV_PYTHON: "3.13"
|
|
12
14
|
jobs:
|
|
13
15
|
test:
|
|
14
16
|
runs-on: self-hosted
|
|
15
17
|
if: ${{ github.ref != 'refs/heads/main' }}
|
|
16
18
|
steps:
|
|
17
19
|
- uses: actions/checkout@v7
|
|
18
|
-
- name:
|
|
19
|
-
|
|
20
|
-
- name: Set up Python 3.13
|
|
21
|
-
uses: actions/setup-python@v7
|
|
22
|
-
with:
|
|
23
|
-
python-version: "3.13"
|
|
24
|
-
# cache: "uv"
|
|
20
|
+
- name: Set up uv
|
|
21
|
+
uses: astral-sh/setup-uv@v7
|
|
25
22
|
- name: Install dependencies
|
|
26
|
-
run:
|
|
23
|
+
run: uv sync --group docs
|
|
27
24
|
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
28
25
|
# - name: Setting up Cache
|
|
29
26
|
# uses: actions/cache@v4
|
|
@@ -33,7 +30,7 @@ jobs:
|
|
|
33
30
|
# restore-keys: |
|
|
34
31
|
# mkdocs-material-
|
|
35
32
|
- name: Build Docs
|
|
36
|
-
run:
|
|
33
|
+
run: uv run zensical build --strict
|
|
37
34
|
deploy:
|
|
38
35
|
runs-on: self-hosted
|
|
39
36
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
@@ -47,13 +44,10 @@ jobs:
|
|
|
47
44
|
run: |
|
|
48
45
|
git config user.name github-actions[bot]
|
|
49
46
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
50
|
-
- name: Set up
|
|
51
|
-
uses:
|
|
52
|
-
with:
|
|
53
|
-
python-version: "3.13"
|
|
54
|
-
# cache: "uv"
|
|
47
|
+
- name: Set up uv
|
|
48
|
+
uses: astral-sh/setup-uv@v7
|
|
55
49
|
- name: Install dependencies
|
|
56
|
-
run:
|
|
50
|
+
run: uv sync --group docs
|
|
57
51
|
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
58
52
|
# - name: Setting up Cache
|
|
59
53
|
# uses: actions/cache@v4
|
|
@@ -63,13 +57,13 @@ jobs:
|
|
|
63
57
|
# restore-keys: |
|
|
64
58
|
# mkdocs-material-
|
|
65
59
|
- name: Download a single artifact
|
|
66
|
-
uses: actions/download-artifact@
|
|
60
|
+
uses: actions/download-artifact@v8
|
|
67
61
|
with:
|
|
68
62
|
name: coverage-report
|
|
69
63
|
run-id: ${{ inputs.test-run-id }}
|
|
70
64
|
path: docs/coverage/
|
|
71
65
|
- name: Build Docs
|
|
72
|
-
run:
|
|
66
|
+
run: uv run zensical build --strict --clean
|
|
73
67
|
- uses: actions/upload-pages-artifact@v5
|
|
74
68
|
with:
|
|
75
69
|
path: site
|
|
@@ -9,21 +9,18 @@ on:
|
|
|
9
9
|
type: string
|
|
10
10
|
permissions:
|
|
11
11
|
contents: write
|
|
12
|
+
env:
|
|
13
|
+
UV_PYTHON: "3.13"
|
|
12
14
|
jobs:
|
|
13
15
|
test:
|
|
14
16
|
runs-on: self-hosted
|
|
15
17
|
if: ${{ github.ref != 'refs/heads/main' }}
|
|
16
18
|
steps:
|
|
17
19
|
- uses: actions/checkout@v7
|
|
18
|
-
- name:
|
|
19
|
-
|
|
20
|
-
- name: Set up Python 3.13
|
|
21
|
-
uses: actions/setup-python@v7
|
|
22
|
-
with:
|
|
23
|
-
python-version: "3.13"
|
|
24
|
-
# cache: "uv"
|
|
20
|
+
- name: Set up uv
|
|
21
|
+
uses: astral-sh/setup-uv@v7
|
|
25
22
|
- name: Install dependencies
|
|
26
|
-
run:
|
|
23
|
+
run: uv sync --group docs
|
|
27
24
|
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
28
25
|
# - name: Setting up Cache
|
|
29
26
|
# uses: actions/cache@v4
|
|
@@ -33,7 +30,7 @@ jobs:
|
|
|
33
30
|
# restore-keys: |
|
|
34
31
|
# mkdocs-material-
|
|
35
32
|
- name: Build Docs
|
|
36
|
-
run:
|
|
33
|
+
run: uv run zensical build --strict
|
|
37
34
|
deploy:
|
|
38
35
|
runs-on: self-hosted
|
|
39
36
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
@@ -43,13 +40,10 @@ jobs:
|
|
|
43
40
|
run: |
|
|
44
41
|
git config user.name github-actions[bot]
|
|
45
42
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
46
|
-
- name: Set up
|
|
47
|
-
uses:
|
|
48
|
-
with:
|
|
49
|
-
python-version: "3.13"
|
|
50
|
-
# cache: "uv"
|
|
43
|
+
- name: Set up uv
|
|
44
|
+
uses: astral-sh/setup-uv@v7
|
|
51
45
|
- name: Install dependencies
|
|
52
|
-
run:
|
|
46
|
+
run: uv sync --group docs
|
|
53
47
|
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
54
48
|
# - name: Setting up Cache
|
|
55
49
|
# uses: actions/cache@v4
|
|
@@ -59,12 +53,12 @@ jobs:
|
|
|
59
53
|
# restore-keys: |
|
|
60
54
|
# mkdocs-material-
|
|
61
55
|
- name: Download a single artifact
|
|
62
|
-
uses: actions/download-artifact@
|
|
56
|
+
uses: actions/download-artifact@v8
|
|
63
57
|
with:
|
|
64
58
|
name: coverage-report
|
|
65
59
|
run-id: ${{ inputs.test-run-id }}
|
|
66
60
|
path: docs/coverage/
|
|
67
61
|
- name: Build Docs
|
|
68
|
-
run:
|
|
62
|
+
run: uv run zensical build --strict
|
|
69
63
|
- name: Deploy
|
|
70
|
-
run:
|
|
64
|
+
run: uv run zensical gh-deploy --force
|
|
@@ -6,6 +6,8 @@ permissions:
|
|
|
6
6
|
contents: write
|
|
7
7
|
pages: write
|
|
8
8
|
id-token: write
|
|
9
|
+
env:
|
|
10
|
+
UV_PYTHON: "3.13"
|
|
9
11
|
jobs:
|
|
10
12
|
test-publish:
|
|
11
13
|
name: Trigger Expensive Tests
|
|
@@ -29,44 +31,42 @@ jobs:
|
|
|
29
31
|
with:
|
|
30
32
|
fetch-tags: true
|
|
31
33
|
ssh-key: ${{ secrets.DEPLOY_KEY }}
|
|
32
|
-
- name: Set up
|
|
33
|
-
uses:
|
|
34
|
-
with:
|
|
35
|
-
python-version: "3.13"
|
|
36
|
-
# cache: "uv"
|
|
34
|
+
- name: Set up uv
|
|
35
|
+
uses: astral-sh/setup-uv@v7
|
|
37
36
|
- name: Compare tag and version
|
|
38
37
|
run: |
|
|
39
38
|
git fetch --tags
|
|
40
|
-
if [ "$(git tag | sort -
|
|
39
|
+
if [ "$(git tag | sort -V | tail -1)" = "$(uv version --short)" ]; then
|
|
41
40
|
echo "The tag and the version are the same, nothing to do."
|
|
42
41
|
echo "DORELEASE=false" >> $GITHUB_ENV
|
|
43
42
|
else
|
|
44
|
-
echo "The tag ($(git tag | sort -
|
|
43
|
+
echo "The tag ($(git tag | sort -V | tail -1)) and the version ($(uv version --short)) differ, trigging a release."
|
|
45
44
|
echo "DORELEASE=true" >> $GITHUB_ENV
|
|
46
45
|
fi
|
|
47
46
|
- name: Update Citation
|
|
48
47
|
if: env.DORELEASE == 'true'
|
|
49
48
|
run: |
|
|
50
|
-
sed -i "/^cff/! s/version:\s\S*/version: $(
|
|
49
|
+
sed -i "/^cff/! s/version:\s\S*/version: $(uv version --short)/" CITATION.cff
|
|
51
50
|
sed -i "s/date-released:\s\S*/date-released: $(date +'%Y-%m-%d')/" CITATION.cff
|
|
52
51
|
git config user.name github-actions[bot]
|
|
53
52
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
54
53
|
git commit -am "Update Citation"
|
|
54
|
+
git pull --rebase
|
|
55
55
|
git push
|
|
56
56
|
env:
|
|
57
57
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
58
58
|
- name: Create Release & Tag
|
|
59
59
|
if: env.DORELEASE == 'true'
|
|
60
60
|
run: |
|
|
61
|
-
gh release create "$(
|
|
61
|
+
gh release create "$(uv version --short)" \
|
|
62
62
|
--repo="$GITHUB_REPOSITORY" \
|
|
63
|
-
--title="${GITHUB_REPOSITORY#*/} $(
|
|
63
|
+
--title="${GITHUB_REPOSITORY#*/} $(uv version --short)" \
|
|
64
64
|
--generate-notes
|
|
65
65
|
env:
|
|
66
66
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
67
67
|
- name: Publish to PyPI
|
|
68
68
|
if: env.DORELEASE == 'true'
|
|
69
69
|
run: |
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
uv sync --group dev
|
|
71
|
+
uv build
|
|
72
|
+
uv publish --token ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Quality on Publish
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
permissions:
|
|
5
|
+
contents: read
|
|
6
|
+
env:
|
|
7
|
+
UV_PYTHON: "3.13"
|
|
8
|
+
jobs:
|
|
9
|
+
quality:
|
|
10
|
+
runs-on: self-hosted
|
|
11
|
+
if: ${{ (github.actor != 'dependabot[bot]') }}
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v7
|
|
14
|
+
- name: Set up uv
|
|
15
|
+
uses: astral-sh/setup-uv@v7
|
|
16
|
+
- name: Install dependencies
|
|
17
|
+
run: uv sync --group dev
|
|
18
|
+
- name: Lint with ruff
|
|
19
|
+
run: |
|
|
20
|
+
uv run ruff check qml_essentials
|
|
21
|
+
uv run ruff check tests
|
|
22
|
+
- name: Running license check
|
|
23
|
+
run: uv run licensecheck --zero --license mit
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Quality
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
branches: ["main"]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
env:
|
|
8
|
+
UV_PYTHON: "3.13"
|
|
9
|
+
jobs:
|
|
10
|
+
quality:
|
|
11
|
+
runs-on: self-hosted
|
|
12
|
+
if: ${{ (github.actor != 'dependabot[bot]') }}
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v7
|
|
15
|
+
- name: Set up uv
|
|
16
|
+
uses: astral-sh/setup-uv@v7
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: uv sync --group dev
|
|
19
|
+
- name: Lint with ruff
|
|
20
|
+
run: |
|
|
21
|
+
uv run ruff check qml_essentials
|
|
22
|
+
uv run ruff check tests
|
|
23
|
+
- name: Running license check
|
|
24
|
+
run: uv run licensecheck --zero --license mit
|
|
@@ -9,19 +9,18 @@ permissions:
|
|
|
9
9
|
concurrency:
|
|
10
10
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
11
11
|
cancel-in-progress: true
|
|
12
|
+
env:
|
|
13
|
+
UV_PYTHON: "3.13"
|
|
12
14
|
jobs:
|
|
13
15
|
test-all:
|
|
14
16
|
runs-on: self-hosted
|
|
15
17
|
steps:
|
|
16
18
|
- uses: actions/checkout@v7
|
|
17
|
-
- name: Set up
|
|
18
|
-
uses:
|
|
19
|
-
with:
|
|
20
|
-
python-version: "3.13"
|
|
21
|
-
# cache: "uv"
|
|
19
|
+
- name: Set up uv
|
|
20
|
+
uses: astral-sh/setup-uv@v7
|
|
22
21
|
- name: Install dependencies
|
|
23
|
-
run:
|
|
22
|
+
run: uv sync --group dev
|
|
24
23
|
- name: Test with pytest (no benchmark)
|
|
25
|
-
run:
|
|
24
|
+
run: uv run pytest --cov=qml_essentials --dist load -n 2 -m "not benchmark" -v
|
|
26
25
|
- name: Test with pytest (benchmark)
|
|
27
|
-
run:
|
|
26
|
+
run: uv run pytest --cov=qml_essentials -m "benchmark"
|
|
@@ -3,23 +3,22 @@ on:
|
|
|
3
3
|
workflow_call:
|
|
4
4
|
permissions:
|
|
5
5
|
contents: write
|
|
6
|
+
env:
|
|
7
|
+
UV_PYTHON: "3.13"
|
|
6
8
|
jobs:
|
|
7
9
|
test-all:
|
|
8
10
|
runs-on: self-hosted
|
|
9
11
|
if: ${{ (github.actor != 'github-actions[bot]') }}
|
|
10
12
|
steps:
|
|
11
13
|
- uses: actions/checkout@v7
|
|
12
|
-
- name: Set up
|
|
13
|
-
uses:
|
|
14
|
-
with:
|
|
15
|
-
python-version: "3.13"
|
|
16
|
-
# cache: "uv"
|
|
14
|
+
- name: Set up uv
|
|
15
|
+
uses: astral-sh/setup-uv@v7
|
|
17
16
|
- name: Install dependencies
|
|
18
|
-
run:
|
|
17
|
+
run: uv sync --group dev
|
|
19
18
|
- name: Test with pytest (no benchmark)
|
|
20
|
-
run:
|
|
19
|
+
run: uv run pytest --cov=qml_essentials --cov-report html --dist load -n 0 -m "not benchmark"
|
|
21
20
|
- name: Share coverage report
|
|
22
|
-
uses: actions/upload-artifact@
|
|
21
|
+
uses: actions/upload-artifact@v7
|
|
23
22
|
with:
|
|
24
23
|
name: coverage-report
|
|
25
24
|
path: htmlcov/
|
|
@@ -21,11 +21,13 @@ authors:
|
|
|
21
21
|
- family-names: "Wahl"
|
|
22
22
|
given-names: "Johannes"
|
|
23
23
|
title: "QML Essentials"
|
|
24
|
-
version: 0.3.
|
|
25
|
-
date-released: 2026-09
|
|
24
|
+
version: 0.3.2
|
|
25
|
+
date-released: 2026-11-09
|
|
26
26
|
repository-code: "https://github.com/cirKITers/qml-essentials"
|
|
27
27
|
url: "https://cirkiters.github.io/qml-essentials"
|
|
28
28
|
license: MIT
|
|
29
29
|
identifiers:
|
|
30
30
|
- type: doi
|
|
31
31
|
value: 10.1109/QSW67625.2025.00035
|
|
32
|
+
- type: doi
|
|
33
|
+
value: 10.1109/QSW72780.2026.00017
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: qml-essentials
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: A toolbox to make working with QML models easier.
|
|
5
5
|
Project-URL: Homepage, https://cirkiters.github.io/qml-essentials/
|
|
6
6
|
Project-URL: Repository, https://github.com/cirKITers/qml-essentials
|
|
@@ -18,9 +18,10 @@ Classifier: Programming Language :: Python :: 3
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
22
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
22
|
-
Requires-Python: <3.
|
|
23
|
-
Requires-Dist: jaqsi>=0.1.
|
|
23
|
+
Requires-Python: <3.15,>=3.12
|
|
24
|
+
Requires-Dist: jaqsi>=0.1.1
|
|
24
25
|
Requires-Dist: jax>=0.9.0.1
|
|
25
26
|
Requires-Dist: jaxlib>=0.9.0.1
|
|
26
27
|
Requires-Dist: numpy>=2.0.0
|
|
@@ -20,7 +20,7 @@ To get an overview of all the available Ansaetze, checkout the [references](http
|
|
|
20
20
|
## Custom Ansatz
|
|
21
21
|
|
|
22
22
|
For building the different Ansatzes, we use topology patterns defined in `qml_essentials.topologies`.
|
|
23
|
-
|
|
23
|
+
Five patterns are available: `Topology.stairs` (a configurable chain of entangling gates), `Topology.bricks` (a brick-wall pattern), `Topology.all_to_all` (every ordered qubit pair), `Topology.all_pairs` (every unordered qubit pair) and `Topology.graph` (an explicit edge list).
|
|
24
24
|
Several built-in circuits rely on them, e.g. Circuit_5 uses `all_to_all` and Circuit_7 uses `bricks`.
|
|
25
25
|
You can find a list of all the available topologies in the [references](https://cirkiters.github.io/qml-essentials/references/) as well.
|
|
26
26
|
|
|
@@ -44,6 +44,46 @@ ent_cap = Entanglement.bell_measurements(
|
|
|
44
44
|
)
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
## Mean Negativity
|
|
48
|
+
|
|
49
|
+
For pure and mixed states, `mean_negativity` averages the negativity across each qubit-versus-rest partition and normalizes the result to $[0,1]$:
|
|
50
|
+
|
|
51
|
+
$$
|
|
52
|
+
\overline{\mathcal{N}}(\rho)=\frac{2}{n}\sum_{k=0}^{n-1}\mathcal{N}_k(\rho),
|
|
53
|
+
\qquad
|
|
54
|
+
\mathcal{N}_k(\rho)=\frac{\|\rho^{T_k}\|_1-1}{2}.
|
|
55
|
+
$$
|
|
56
|
+
|
|
57
|
+
Here $T_k$ denotes the partial transpose on qubit $k$. Each negativity is the sum of the absolute values of the negative eigenvalues of $\rho^{T_k}$, following [Vidal and Werner](https://arxiv.org/abs/quant-ph/0102117).
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
ent_cap = Entanglement.mean_negativity(
|
|
61
|
+
model, n_samples=1000, random_key=jax.random.key(1000), noise_params={"BitFlip": 0.1}
|
|
62
|
+
)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
You can compute the mean logarithmic negativity instead by setting `log=True`:
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
ent_cap = Entanglement.mean_negativity(model, n_samples=None, log=True)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
$$
|
|
72
|
+
\overline{E}_{\mathcal{N}}(\rho)=\frac{1}{n}\sum_{k=0}^{n-1}\log_2(1+2\mathcal{N}_k(\rho)).
|
|
73
|
+
$$
|
|
74
|
+
|
|
75
|
+
The logarithm is applied to each partition of each output state before averaging.
|
|
76
|
+
Note that this generally differs from taking $\log_2(1+\overline{\mathcal{N}})$ after averaging (hence this flag).
|
|
77
|
+
|
|
78
|
+
The method averages the metric over the output states, rather than evaluating their averaged density matrix.
|
|
79
|
+
Set `n_samples=None` or a nonpositive value to use the current parameters.
|
|
80
|
+
If `scale` is set to `True`, the sample count is multiplied by $2^n$.
|
|
81
|
+
|
|
82
|
+
Fully separable states give zero, while Bell and GHZ states give one.
|
|
83
|
+
Note that, this metric differs from Meyer-Wallach even for pure states as zero does not exclude entanglement with positive partial transpose (PPT), according to the [Separability Criterion for Density Matrices](https://doi.org/10.1103/PhysRevLett.77.1413).
|
|
84
|
+
In contrast, a positive value, does not establish genuine multipartite entanglement.
|
|
85
|
+
|
|
86
|
+
This metric allows to be used in a noisy and noiseless setting.
|
|
47
87
|
## Relative Entropy
|
|
48
88
|
|
|
49
89
|
While calculating entanglement using the Meyer-Wallach or Bell-Measurements method works great for noiseless circuits, it won't result in the correct values when being used together with incoherent noise.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "qml-essentials"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.2"
|
|
4
4
|
description = "A toolbox to make working with QML models easier."
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Melvin Strobl", email = "melvin.strobl@kit.edu" },
|
|
7
7
|
{ name = "Maja Franz", email = "maja.franz@oth-regensburg.de" },
|
|
8
8
|
]
|
|
9
|
-
requires-python = ">=3.12,<3.
|
|
9
|
+
requires-python = ">=3.12,<3.15"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
license = "MIT"
|
|
12
12
|
maintainers = [{ name = "Melvin Strobl", email = "melvin.strobl@kit.edu" }]
|
|
@@ -14,9 +14,9 @@ keywords = [
|
|
|
14
14
|
"quantum",
|
|
15
15
|
"quantum machine learning",
|
|
16
16
|
"qml",
|
|
17
|
-
]
|
|
17
|
+
]
|
|
18
18
|
dependencies = [
|
|
19
|
-
"jaqsi>=0.1.
|
|
19
|
+
"jaqsi>=0.1.1",
|
|
20
20
|
"jax>=0.9.0.1",
|
|
21
21
|
"jaxlib>=0.9.0.1",
|
|
22
22
|
"numpy>=2.0.0",
|
|
@@ -30,6 +30,7 @@ classifiers = [
|
|
|
30
30
|
"Programming Language :: Python :: 3",
|
|
31
31
|
"Programming Language :: Python :: 3.12",
|
|
32
32
|
"Programming Language :: Python :: 3.13",
|
|
33
|
+
"Programming Language :: Python :: 3.14",
|
|
33
34
|
"Programming Language :: Python :: 3 :: Only",
|
|
34
35
|
"Topic :: Scientific/Engineering :: Physics",
|
|
35
36
|
]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
|
+
import functools
|
|
2
3
|
from typing import Any, Optional, List, Union, Callable, Tuple
|
|
3
4
|
import jax.numpy as np
|
|
4
5
|
import logging
|
|
@@ -1000,6 +1001,18 @@ def GolombEncoding(
|
|
|
1000
1001
|
UnitaryGates.Noise(wires_list, noise_params)
|
|
1001
1002
|
|
|
1002
1003
|
|
|
1004
|
+
# Encoding wrappers live at module level,
|
|
1005
|
+
# so that a model holding them can be pickled.
|
|
1006
|
+
def _scaled_encoding(inputs, wires, *, enc, base, **kwargs):
|
|
1007
|
+
"""Apply `enc` with the input scaled by ``base**wires``."""
|
|
1008
|
+
return enc(inputs * (base**wires), wires, **kwargs)
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
def _golomb_encoding(inputs, wires, **kwargs):
|
|
1012
|
+
# `wires` here is a list of all qubit indices, set by _iec
|
|
1013
|
+
GolombEncoding(w=inputs, wires=wires, **kwargs)
|
|
1014
|
+
|
|
1015
|
+
|
|
1003
1016
|
class Encoding:
|
|
1004
1017
|
def __init__(
|
|
1005
1018
|
self, strategy: str, gates: Union[str, Callable, List[Union[str, Callable]]]
|
|
@@ -1199,10 +1212,7 @@ class Encoding:
|
|
|
1199
1212
|
The wrapped encoding function.
|
|
1200
1213
|
"""
|
|
1201
1214
|
|
|
1202
|
-
|
|
1203
|
-
return enc(inputs * (2**wires), wires, **kwargs)
|
|
1204
|
-
|
|
1205
|
-
return _enc
|
|
1215
|
+
return functools.partial(_scaled_encoding, enc=enc, base=2)
|
|
1206
1216
|
|
|
1207
1217
|
def ternary(self, enc):
|
|
1208
1218
|
"""
|
|
@@ -1224,10 +1234,7 @@ class Encoding:
|
|
|
1224
1234
|
The wrapped encoding function.
|
|
1225
1235
|
"""
|
|
1226
1236
|
|
|
1227
|
-
|
|
1228
|
-
return enc(inputs * (3**wires), wires, **kwargs)
|
|
1229
|
-
|
|
1230
|
-
return _enc
|
|
1237
|
+
return functools.partial(_scaled_encoding, enc=enc, base=3)
|
|
1231
1238
|
|
|
1232
1239
|
@property
|
|
1233
1240
|
def is_golomb(self):
|
|
@@ -1262,8 +1269,4 @@ class Encoding:
|
|
|
1262
1269
|
functions but that applies :func:`GolombEncoding`.
|
|
1263
1270
|
"""
|
|
1264
1271
|
|
|
1265
|
-
|
|
1266
|
-
# `wires` here is a list of all qubit indices, set by _iec
|
|
1267
|
-
GolombEncoding(w=inputs, wires=wires, **kwargs)
|
|
1268
|
-
|
|
1269
|
-
return _enc
|
|
1272
|
+
return _golomb_encoding
|
|
@@ -44,7 +44,7 @@ class Entanglement:
|
|
|
44
44
|
if "noise_params" in kwargs:
|
|
45
45
|
log.warning(
|
|
46
46
|
"Meyer-Wallach measure not suitable for noisy circuits. "
|
|
47
|
-
"Consider '
|
|
47
|
+
"Consider 'mean_negativity' instead."
|
|
48
48
|
)
|
|
49
49
|
|
|
50
50
|
if scale:
|
|
@@ -103,6 +103,79 @@ class Entanglement:
|
|
|
103
103
|
|
|
104
104
|
return jax.vmap(_f)(rhos)
|
|
105
105
|
|
|
106
|
+
@classmethod
|
|
107
|
+
def mean_negativity(
|
|
108
|
+
cls,
|
|
109
|
+
model: Model,
|
|
110
|
+
n_samples: Optional[int],
|
|
111
|
+
random_key: Optional[jax.Array] = None,
|
|
112
|
+
scale: bool = False,
|
|
113
|
+
log: bool = False,
|
|
114
|
+
**kwargs: Any,
|
|
115
|
+
) -> float:
|
|
116
|
+
r"""
|
|
117
|
+
Average normalized or logarithmic negativity over qubit-versus-rest partitions,
|
|
118
|
+
following [Vidal and Werner](https://doi.org/10.1103/PhysRevA.65.032314).
|
|
119
|
+
|
|
120
|
+
For pure or mixed states, this computes
|
|
121
|
+
:math:`\frac{2}{n}\sum_k \mathcal{N}_k(\rho)`, where
|
|
122
|
+
:math:`\mathcal{N}_k(\rho)=(\|\rho^{T_k}\|_1-1)/2`.
|
|
123
|
+
With log=True, average :math:`\log_2(1+2\mathcal{N}_k(\rho))`
|
|
124
|
+
over partitions and output states instead.
|
|
125
|
+
Zero does not exclude PPT entanglement, and a positive value does not
|
|
126
|
+
certify genuine multipartite entanglement.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
model (Model): The quantum circuit model.
|
|
130
|
+
n_samples (Optional[int]): Number of parameter samples. If None or
|
|
131
|
+
nonpositive, use the current parameters without resampling.
|
|
132
|
+
random_key (Optional[jax.Array]): JAX key for parameter sampling.
|
|
133
|
+
If None, use the model's internal random key.
|
|
134
|
+
scale (bool): Multiply a positive sample count by 2**n_qubits.
|
|
135
|
+
log (bool): Use base-2 logarithmic negativity. Defaults to False.
|
|
136
|
+
kwargs (Any): Additional keyword arguments for the model function.
|
|
137
|
+
|
|
138
|
+
Returns:
|
|
139
|
+
float: Mean normalized or logarithmic negativity in [0, 1].
|
|
140
|
+
"""
|
|
141
|
+
if n_samples is not None and n_samples > 0:
|
|
142
|
+
if scale:
|
|
143
|
+
n_samples *= 2**model.n_qubits
|
|
144
|
+
model.initialize_params(random_key, repeat=n_samples)
|
|
145
|
+
|
|
146
|
+
kwargs.setdefault("inputs", None)
|
|
147
|
+
rhos = model(execution_type="density", **kwargs).reshape(
|
|
148
|
+
-1, 2**model.n_qubits, 2**model.n_qubits
|
|
149
|
+
)
|
|
150
|
+
ent = cls._compute_mean_negativity(rhos, model.n_qubits, log=log)
|
|
151
|
+
logging.getLogger(__name__).debug(f"Variance of measure: {ent.var()}")
|
|
152
|
+
return float(ent.mean())
|
|
153
|
+
|
|
154
|
+
@classmethod
|
|
155
|
+
def _compute_mean_negativity(
|
|
156
|
+
cls, rhos: jnp.ndarray, n_qubits: int, log: bool = False
|
|
157
|
+
) -> jnp.ndarray:
|
|
158
|
+
"""
|
|
159
|
+
Compute mean normalized or logarithmic negativity for density matrices.
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
rhos (jnp.ndarray): Density matrices with shape (B, 2**n, 2**n).
|
|
163
|
+
n_qubits (int): Number of qubits.
|
|
164
|
+
log (bool): Apply the base-2 logarithm before averaging partitions.
|
|
165
|
+
|
|
166
|
+
Returns:
|
|
167
|
+
jnp.ndarray: Mean negativity with shape (B,).
|
|
168
|
+
"""
|
|
169
|
+
tensor = rhos.reshape((-1,) + (2,) * (2 * n_qubits))
|
|
170
|
+
negativity = jnp.zeros(rhos.shape[0])
|
|
171
|
+
for k in range(n_qubits):
|
|
172
|
+
# Transpose only qubit k's row and column indices.
|
|
173
|
+
partial_transpose = jnp.swapaxes(tensor, k + 1, n_qubits + k + 1)
|
|
174
|
+
eigenvalues = jnp.linalg.eigvalsh(partial_transpose.reshape(rhos.shape))
|
|
175
|
+
value = 2 * jnp.maximum(-eigenvalues, 0).sum(axis=-1)
|
|
176
|
+
negativity += jnp.log1p(value) / jnp.log(2.0) if log else value
|
|
177
|
+
return negativity / n_qubits
|
|
178
|
+
|
|
106
179
|
@classmethod
|
|
107
180
|
def bell_measurements(
|
|
108
181
|
cls,
|
|
@@ -135,7 +208,7 @@ class Entanglement:
|
|
|
135
208
|
if "noise_params" in kwargs:
|
|
136
209
|
log.warning(
|
|
137
210
|
"Bell Measurements not suitable for noisy circuits. "
|
|
138
|
-
"Consider '
|
|
211
|
+
"Consider 'mean_negativity' instead."
|
|
139
212
|
)
|
|
140
213
|
|
|
141
214
|
if scale:
|
|
@@ -461,7 +534,7 @@ class Entanglement:
|
|
|
461
534
|
if not always_decompose and jnp.isclose(eigenvalues, 1.0).any(axis=-1).all():
|
|
462
535
|
return cls._compute_meyer_wallach_meas(rhos, n_qubits)
|
|
463
536
|
|
|
464
|
-
rhos = np.einsum("
|
|
537
|
+
rhos = np.einsum("sji,ski->sijk", eigenvectors, eigenvectors.conjugate())
|
|
465
538
|
measures = cls._compute_meyer_wallach_meas(
|
|
466
539
|
rhos.reshape(-1, 2**n_qubits, 2**n_qubits), n_qubits
|
|
467
540
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import List, Callable, Union
|
|
1
|
+
from typing import List, Callable, Sequence, Tuple, Union
|
|
2
2
|
from itertools import combinations
|
|
3
3
|
import logging
|
|
4
4
|
|
|
@@ -106,6 +106,46 @@ class Topology:
|
|
|
106
106
|
kwargs.setdefault("modulo", False)
|
|
107
107
|
return cls.stairs(n_qubits=n_qubits, **kwargs)
|
|
108
108
|
|
|
109
|
+
@classmethod
|
|
110
|
+
def graph(
|
|
111
|
+
cls, n_qubits: int, *, edges: Sequence[Sequence[int]]
|
|
112
|
+
) -> List[Tuple[int, int]]:
|
|
113
|
+
"""
|
|
114
|
+
Explicit edge list as a topology.
|
|
115
|
+
|
|
116
|
+
The given order and orientation are preserved, so the resulting
|
|
117
|
+
circuit is deterministic and directed gates act on the wires as
|
|
118
|
+
written. Both orientations of the same qubit pair are therefore
|
|
119
|
+
allowed; only a repeated ``(control, target)`` pair is rejected.
|
|
120
|
+
|
|
121
|
+
Parameters
|
|
122
|
+
----------
|
|
123
|
+
n_qubits : int
|
|
124
|
+
Number of qubits.
|
|
125
|
+
edges : Sequence[Sequence[int]]
|
|
126
|
+
``(control, target)`` qubit pairs.
|
|
127
|
+
|
|
128
|
+
Returns
|
|
129
|
+
-------
|
|
130
|
+
List[Tuple[int, int]]
|
|
131
|
+
|
|
132
|
+
Raises
|
|
133
|
+
------
|
|
134
|
+
ValueError
|
|
135
|
+
If an edge leaves the qubit range, is a self-loop or repeats.
|
|
136
|
+
"""
|
|
137
|
+
seen = set()
|
|
138
|
+
pairs = []
|
|
139
|
+
for q, r in edges:
|
|
140
|
+
if not (0 <= q < n_qubits and 0 <= r < n_qubits) or q == r:
|
|
141
|
+
raise ValueError(f"edge ({q}, {r}) invalid on {n_qubits} qubits")
|
|
142
|
+
if (q, r) in seen:
|
|
143
|
+
raise ValueError(f"duplicate edge ({q}, {r})")
|
|
144
|
+
seen.add((q, r))
|
|
145
|
+
pairs.append((q, r))
|
|
146
|
+
|
|
147
|
+
return pairs
|
|
148
|
+
|
|
109
149
|
@classmethod
|
|
110
150
|
def all_pairs(cls, n_qubits: int) -> List[List[int]]:
|
|
111
151
|
"""Every unordered pair ``[j, k]`` with ``j < k``."""
|