QuPRS 0.3.0__tar.gz → 0.4.0__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.
- quprs-0.4.0/.github/workflows/benchmarks.yml +97 -0
- {quprs-0.3.0 → quprs-0.4.0}/.github/workflows/pytest.yml +14 -12
- {quprs-0.3.0 → quprs-0.4.0}/Dockerfile +0 -2
- {quprs-0.3.0 → quprs-0.4.0}/PKG-INFO +4 -1
- {quprs-0.3.0 → quprs-0.4.0}/pyproject.toml +3 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/_version.py +2 -2
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS.egg-info/PKG-INFO +4 -1
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS.egg-info/SOURCES.txt +1 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS.egg-info/requires.txt +3 -0
- {quprs-0.3.0 → quprs-0.4.0}/.github/workflows/docker-build.yml +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/.github/workflows/python-publish.yml +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/.gitignore +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/LICENSE.md +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/MANIFEST.in +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/NOTICE.md +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/README.md +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/setup.cfg +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/__init__.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/cache_manager/__init__.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/cache_manager/cache_decorator.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/cache_manager/global_cache_manager.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/config.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/interface/__init__.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/interface/gate_library.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/interface/load_qiskit.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/interface/ps2wmc.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/interface/qasm2qc.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/pathsum.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/utils/Qiskit_Circuit_Utils.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/utils/__init__.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/utils/gpmc +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/utils/reduction.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/utils/strategy.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS/utils/util.py +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS.egg-info/dependency_links.txt +0 -0
- {quprs-0.3.0 → quprs-0.4.0}/src/QuPRS.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
name: Python CI & Benchmarks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
11
|
+
# 1. Unit tests + Benchmark baseline (only runs on push to main branch)
|
|
12
|
+
build-and-save-baseline:
|
|
13
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.12"]
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout code
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Setup Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
cache: 'pip'
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
pip install .[dev] # Includes pytest, pytest-benchmark, matplotlib, tabulate
|
|
32
|
+
|
|
33
|
+
- name: Run tests and save baseline benchmark
|
|
34
|
+
run: |
|
|
35
|
+
pytest --benchmark-only --benchmark-save=main --benchmark-storage=file://./benchmarks
|
|
36
|
+
- name: Upload baseline benchmark artifact
|
|
37
|
+
uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: benchmark-main
|
|
40
|
+
path: ./benchmarks/**/*.json
|
|
41
|
+
|
|
42
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
43
|
+
# 2. Unit tests + PR Benchmark comparison (runs on pull requests)
|
|
44
|
+
test-and-compare:
|
|
45
|
+
if: github.event_name == 'pull_request'
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
strategy:
|
|
48
|
+
matrix:
|
|
49
|
+
python-version: ["3.12"]
|
|
50
|
+
steps:
|
|
51
|
+
- name: Checkout code
|
|
52
|
+
uses: actions/checkout@v4
|
|
53
|
+
|
|
54
|
+
- name: Setup Python ${{ matrix.python-version }}
|
|
55
|
+
uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: ${{ matrix.python-version }}
|
|
58
|
+
cache: 'pip'
|
|
59
|
+
|
|
60
|
+
- name: Install dependencies
|
|
61
|
+
run: |
|
|
62
|
+
python -m pip install --upgrade pip
|
|
63
|
+
pip install .[dev]
|
|
64
|
+
|
|
65
|
+
- name: Run unit tests
|
|
66
|
+
run: pytest -n auto -v
|
|
67
|
+
|
|
68
|
+
- name: Download baseline benchmark
|
|
69
|
+
uses: actions/download-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: benchmark-main
|
|
72
|
+
path: .benchmarks
|
|
73
|
+
|
|
74
|
+
- name: Run PR benchmark and compare
|
|
75
|
+
run: |
|
|
76
|
+
pytest --benchmark-only --benchmark-save=pr
|
|
77
|
+
pytest --benchmark-compare main pr
|
|
78
|
+
|
|
79
|
+
- name: Generate Markdown & Chart report
|
|
80
|
+
run: python generate_benchmark_report.py
|
|
81
|
+
|
|
82
|
+
- name: Upload report markdown
|
|
83
|
+
uses: actions/upload-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
name: benchmark-report-md
|
|
86
|
+
path: benchmark_report.md
|
|
87
|
+
|
|
88
|
+
- name: Upload chart image
|
|
89
|
+
uses: actions/upload-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: benchmark-chart-png
|
|
92
|
+
path: benchmark_chart.png
|
|
93
|
+
|
|
94
|
+
- name: Comment benchmark results on PR
|
|
95
|
+
uses: marocchino/sticky-pull-request-comment@v2
|
|
96
|
+
with:
|
|
97
|
+
path: benchmark_report.md
|
|
@@ -4,10 +4,7 @@ name: Python Pytest CI
|
|
|
4
4
|
|
|
5
5
|
# Trigger this workflow on push or pull request to main branch
|
|
6
6
|
on:
|
|
7
|
-
|
|
8
|
-
branches: [ "main" ]
|
|
9
|
-
pull_request:
|
|
10
|
-
branches: [ "main" ]
|
|
7
|
+
[push, pull_request]
|
|
11
8
|
|
|
12
9
|
jobs:
|
|
13
10
|
build:
|
|
@@ -36,20 +33,25 @@ jobs:
|
|
|
36
33
|
- name: Install dependencies
|
|
37
34
|
run: |
|
|
38
35
|
python -m pip install --upgrade pip
|
|
39
|
-
pip install
|
|
40
|
-
pip install pytest-xdist
|
|
41
|
-
pip install pytest-cov
|
|
42
|
-
pip install .
|
|
36
|
+
pip install .[dev]
|
|
43
37
|
|
|
44
38
|
# Step 4: Run pytest
|
|
45
39
|
- name: Run tests with pytest
|
|
46
40
|
run: |
|
|
47
|
-
pytest -n auto -v --junitxml=pytest-results.xml
|
|
41
|
+
pytest -n auto -v --junitxml=pytest-results.xml --html=pytest-results.html --self-contained-html
|
|
48
42
|
|
|
49
|
-
# Step 5: Upload pytest results as artifact
|
|
50
|
-
- name: Upload pytest results
|
|
43
|
+
# Step 5: Upload pytest HTML results as artifact
|
|
44
|
+
- name: Upload pytest HTML results
|
|
51
45
|
if: always()
|
|
52
46
|
uses: actions/upload-artifact@v4
|
|
53
47
|
with:
|
|
54
|
-
name: pytest-results-${{ matrix.python-version }}
|
|
48
|
+
name: pytest-results-html-${{ matrix.python-version }}
|
|
49
|
+
path: pytest-results.html
|
|
50
|
+
|
|
51
|
+
# Step 6: Upload pytest XML results as artifact
|
|
52
|
+
- name: Upload pytest XML results
|
|
53
|
+
if: always()
|
|
54
|
+
uses: actions/upload-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: pytest-results-xml-${{ matrix.python-version }}
|
|
55
57
|
path: pytest-results.xml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: QuPRS
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: QuPRS: Quantum Path-sum Reduction and Solver
|
|
5
5
|
Author-email: Wei-Jia Huang <wei.jia.huang.physics@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/PhysicsQoo/QuPRS
|
|
@@ -30,6 +30,9 @@ Requires-Dist: build; extra == "dev"
|
|
|
30
30
|
Requires-Dist: pytest; extra == "dev"
|
|
31
31
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
32
32
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest-flake8; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-benchmark; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-html; extra == "dev"
|
|
33
36
|
Requires-Dist: pandas; extra == "dev"
|
|
34
37
|
Requires-Dist: tqdm; extra == "dev"
|
|
35
38
|
Dynamic: license-file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: QuPRS
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: QuPRS: Quantum Path-sum Reduction and Solver
|
|
5
5
|
Author-email: Wei-Jia Huang <wei.jia.huang.physics@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/PhysicsQoo/QuPRS
|
|
@@ -30,6 +30,9 @@ Requires-Dist: build; extra == "dev"
|
|
|
30
30
|
Requires-Dist: pytest; extra == "dev"
|
|
31
31
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
32
32
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest-flake8; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-benchmark; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-html; extra == "dev"
|
|
33
36
|
Requires-Dist: pandas; extra == "dev"
|
|
34
37
|
Requires-Dist: tqdm; extra == "dev"
|
|
35
38
|
Dynamic: license-file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|