QuPRS 0.1.0__tar.gz → 0.2.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.
Files changed (34) hide show
  1. quprs-0.2.0/.github/workflows/pytest.yml +53 -0
  2. quprs-0.2.0/.github/workflows/python-publish.yml +56 -0
  3. {quprs-0.1.0 → quprs-0.2.0}/.gitignore +3 -1
  4. {quprs-0.1.0 → quprs-0.2.0}/PKG-INFO +16 -5
  5. {quprs-0.1.0 → quprs-0.2.0}/README.md +7 -1
  6. {quprs-0.1.0 → quprs-0.2.0}/pyproject.toml +8 -2
  7. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/_version.py +2 -2
  8. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS.egg-info/PKG-INFO +16 -5
  9. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS.egg-info/SOURCES.txt +1 -0
  10. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS.egg-info/requires.txt +4 -0
  11. quprs-0.1.0/.github/workflows/python-publish.yml +0 -47
  12. {quprs-0.1.0 → quprs-0.2.0}/LICENSE.md +0 -0
  13. {quprs-0.1.0 → quprs-0.2.0}/MANIFEST.in +0 -0
  14. {quprs-0.1.0 → quprs-0.2.0}/NOTICE.md +0 -0
  15. {quprs-0.1.0 → quprs-0.2.0}/setup.cfg +0 -0
  16. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/__init__.py +0 -0
  17. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/cache_manager/__init__.py +0 -0
  18. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/cache_manager/cache_decorator.py +0 -0
  19. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/cache_manager/global_cache_manager.py +0 -0
  20. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/config.py +0 -0
  21. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/interface/__init__.py +0 -0
  22. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/interface/gate_library.py +0 -0
  23. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/interface/load_qiskit.py +0 -0
  24. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/interface/ps2wmc.py +0 -0
  25. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/interface/qasm2qc.py +0 -0
  26. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/pathsum.py +0 -0
  27. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/utils/Qiskit_Circuit_Utils.py +0 -0
  28. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/utils/__init__.py +0 -0
  29. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/utils/gpmc +0 -0
  30. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/utils/reduction.py +0 -0
  31. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/utils/strategy.py +0 -0
  32. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS/utils/util.py +0 -0
  33. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS.egg-info/dependency_links.txt +0 -0
  34. {quprs-0.1.0 → quprs-0.2.0}/src/QuPRS.egg-info/top_level.txt +0 -0
@@ -0,0 +1,53 @@
1
+ # .github/workflows/pytest.yml
2
+
3
+ name: Python Pytest CI
4
+
5
+ # Trigger this workflow on push or pull request to main branch
6
+ on:
7
+ push:
8
+ branches: [ "main" ]
9
+ pull_request:
10
+ branches: [ "main" ]
11
+
12
+ jobs:
13
+ build:
14
+ # Specify the runner environment
15
+ runs-on: ubuntu-latest
16
+
17
+ # Test matrix for multiple Python versions
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ python-version: ["3.11", "3.12", "3.13"]
22
+
23
+ steps:
24
+ # Step 1: Checkout repository code
25
+ - name: Check out repository code
26
+ uses: actions/checkout@v4
27
+
28
+ # Step 2: Set up Python environment
29
+ - name: Set up Python ${{ matrix.python-version }}
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: ${{ matrix.python-version }}
33
+ cache: 'pip'
34
+
35
+ # Step 3: Install dependencies
36
+ - name: Install dependencies
37
+ run: |
38
+ python -m pip install --upgrade pip
39
+ pip install pytest
40
+ pip install .
41
+
42
+ # Step 4: Run pytest
43
+ - name: Run tests with pytest
44
+ run: |
45
+ pytest --junitxml=pytest-results.xml
46
+
47
+ # Step 5: Upload pytest results as artifact
48
+ - name: Upload pytest results
49
+ if: always()
50
+ uses: actions/upload-artifact@v4
51
+ with:
52
+ name: pytest-results-${{ matrix.python-version }}
53
+ path: pytest-results.xml
@@ -0,0 +1,56 @@
1
+ # .github/workflows/publish-package.yml
2
+
3
+ name: Publish to PyPI and Create Release
4
+
5
+ # Trigger: Runs only when pushing tags that start with 'v'
6
+ # Example: v1.0.0, v0.9.1
7
+ on:
8
+ push:
9
+ tags:
10
+ - 'v*'
11
+
12
+ jobs:
13
+ build-and-publish:
14
+ runs-on: ubuntu-latest
15
+
16
+ # Permissions: These are essential for all magic to happen
17
+ permissions:
18
+ id-token: write # << Required for PyPI Trusted Publishing
19
+ contents: write # << Required for creating GitHub Release
20
+
21
+ steps:
22
+ - name: Check out the code
23
+ # Use the latest v4 version
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Set up Python for building
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ # It is recommended to specify an explicit Python version to ensure consistent build environments
30
+ python-version: '3.x'
31
+
32
+ - name: Install build tools
33
+ run: |
34
+ python -m pip install --upgrade pip
35
+ pip install build
36
+
37
+ - name: Build the package
38
+ run: python -m build
39
+
40
+ - name: Publish package to PyPI via Trusted Publishing
41
+ # This is the most modern and secure publishing method, no API token needed
42
+ uses: pypa/gh-action-pypi-publish@release/v1
43
+
44
+ - name: Create GitHub Release
45
+ # This action automatically uses the GITHUB_TOKEN granted by the above permissions
46
+ # No need to manually pass env
47
+ uses: softprops/action-gh-release@v2
48
+ with:
49
+ # Automatically generate the Release title and content from the tag
50
+ tag_name: ${{ github.ref_name }}
51
+ name: Release ${{ github.ref_name }}
52
+ body: |
53
+ ## 🚀 Release Notes
54
+ * **📦 Version:** `${{ github.ref_name }}`
55
+ * **🔗 PyPI Link:** https://pypi.org/project/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ github.ref_name }}
56
+ * 🛠️ This release was automatically generated by GitHub Actions.
@@ -13,6 +13,7 @@ wheels/
13
13
  .venv/
14
14
  venv/
15
15
  env/
16
+ uv.lock
16
17
 
17
18
  # IDE and editor settings
18
19
  .vscode/
@@ -30,4 +31,5 @@ Thumbs.db
30
31
  htmlcov/
31
32
 
32
33
  # other
33
- src/QuPRS/_version.py
34
+ src/QuPRS/_version.py
35
+ *.cnf
@@ -1,8 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QuPRS
3
- Version: 0.1.0
3
+ Version: 0.2.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
+ Project-URL: Homepage, https://github.com/PhysicsQoo/QuPRS
7
+ Project-URL: PyPI, https://pypi.org/project/QuPRS/
6
8
  Keywords: pathsum,weighted model counting,quantum circuit,equivalence checking
7
9
  Classifier: Development Status :: 3 - Alpha
8
10
  Classifier: Intended Audience :: Developers
@@ -22,13 +24,18 @@ Requires-Dist: sympy
22
24
  Requires-Dist: symengine
23
25
  Requires-Dist: qiskit<2.0,>=1.0.0
24
26
  Requires-Dist: qiskit-qasm3-import>=0.5.1
25
- Requires-Dist: ipykernel
26
- Requires-Dist: pandas
27
- Requires-Dist: tqdm
27
+ Provides-Extra: dev
28
+ Requires-Dist: ipykernel; extra == "dev"
29
+ Requires-Dist: build; extra == "dev"
30
+ Requires-Dist: pytest; extra == "dev"
31
+ Requires-Dist: pandas; extra == "dev"
32
+ Requires-Dist: tqdm; extra == "dev"
28
33
  Dynamic: license-file
29
34
 
35
+ [![PyPI version](https://img.shields.io/pypi/v/QuPRS)](https://pypi.org/project/QuPRS/)
30
36
  [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE.md)
31
- ![Python Versions](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)
37
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/QuPRS)
38
+ ![GitHub last commit](https://img.shields.io/github/last-commit/PhysicsQoo/QuPRS)
32
39
 
33
40
  # QuPRS: Quantum Path-sum Reduction and Solver
34
41
 
@@ -72,6 +79,10 @@ It is recommended to install `QuPRS` in a virtual environment.
72
79
  ```bash
73
80
  pip install QuPRS
74
81
  ```
82
+ or install `QuPRS` latest commit:
83
+ ```bash
84
+ pip install git+https://github.com/PhysicsQoo/QuPRS.git
85
+ ```
75
86
 
76
87
  ## Using QuPRS
77
88
 
@@ -1,5 +1,7 @@
1
+ [![PyPI version](https://img.shields.io/pypi/v/QuPRS)](https://pypi.org/project/QuPRS/)
1
2
  [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE.md)
2
- ![Python Versions](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)
3
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/QuPRS)
4
+ ![GitHub last commit](https://img.shields.io/github/last-commit/PhysicsQoo/QuPRS)
3
5
 
4
6
  # QuPRS: Quantum Path-sum Reduction and Solver
5
7
 
@@ -43,6 +45,10 @@ It is recommended to install `QuPRS` in a virtual environment.
43
45
  ```bash
44
46
  pip install QuPRS
45
47
  ```
48
+ or install `QuPRS` latest commit:
49
+ ```bash
50
+ pip install git+https://github.com/PhysicsQoo/QuPRS.git
51
+ ```
46
52
 
47
53
  ## Using QuPRS
48
54
 
@@ -29,13 +29,19 @@ dependencies = [
29
29
  "symengine",
30
30
  "qiskit<2.0,>=1.0.0",
31
31
  "qiskit-qasm3-import>=0.5.1",
32
+ ]
33
+ dynamic = ["version"]
34
+ [project.optional-dependencies]
35
+ dev = [
32
36
  "ipykernel",
37
+ "build",
38
+ "pytest",
33
39
  "pandas",
34
40
  "tqdm"
35
41
  ]
36
- dynamic = ["version"]
37
42
  [project.urls]
38
- # Homepage = "" # GitHub link
43
+ Homepage = "https://github.com/PhysicsQoo/QuPRS" # GitHub link
44
+ PyPI = "https://pypi.org/project/QuPRS/"
39
45
  # (Optional) Other URLs related to your project
40
46
  # "Bug Tracker" = "..."
41
47
  # "Documentation" = "..."
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.1.0'
21
- __version_tuple__ = version_tuple = (0, 1, 0)
20
+ __version__ = version = '0.2.0'
21
+ __version_tuple__ = version_tuple = (0, 2, 0)
@@ -1,8 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QuPRS
3
- Version: 0.1.0
3
+ Version: 0.2.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
+ Project-URL: Homepage, https://github.com/PhysicsQoo/QuPRS
7
+ Project-URL: PyPI, https://pypi.org/project/QuPRS/
6
8
  Keywords: pathsum,weighted model counting,quantum circuit,equivalence checking
7
9
  Classifier: Development Status :: 3 - Alpha
8
10
  Classifier: Intended Audience :: Developers
@@ -22,13 +24,18 @@ Requires-Dist: sympy
22
24
  Requires-Dist: symengine
23
25
  Requires-Dist: qiskit<2.0,>=1.0.0
24
26
  Requires-Dist: qiskit-qasm3-import>=0.5.1
25
- Requires-Dist: ipykernel
26
- Requires-Dist: pandas
27
- Requires-Dist: tqdm
27
+ Provides-Extra: dev
28
+ Requires-Dist: ipykernel; extra == "dev"
29
+ Requires-Dist: build; extra == "dev"
30
+ Requires-Dist: pytest; extra == "dev"
31
+ Requires-Dist: pandas; extra == "dev"
32
+ Requires-Dist: tqdm; extra == "dev"
28
33
  Dynamic: license-file
29
34
 
35
+ [![PyPI version](https://img.shields.io/pypi/v/QuPRS)](https://pypi.org/project/QuPRS/)
30
36
  [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE.md)
31
- ![Python Versions](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)
37
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/QuPRS)
38
+ ![GitHub last commit](https://img.shields.io/github/last-commit/PhysicsQoo/QuPRS)
32
39
 
33
40
  # QuPRS: Quantum Path-sum Reduction and Solver
34
41
 
@@ -72,6 +79,10 @@ It is recommended to install `QuPRS` in a virtual environment.
72
79
  ```bash
73
80
  pip install QuPRS
74
81
  ```
82
+ or install `QuPRS` latest commit:
83
+ ```bash
84
+ pip install git+https://github.com/PhysicsQoo/QuPRS.git
85
+ ```
75
86
 
76
87
  ## Using QuPRS
77
88
 
@@ -4,6 +4,7 @@ MANIFEST.in
4
4
  NOTICE.md
5
5
  README.md
6
6
  pyproject.toml
7
+ .github/workflows/pytest.yml
7
8
  .github/workflows/python-publish.yml
8
9
  src/QuPRS/__init__.py
9
10
  src/QuPRS/_version.py
@@ -3,6 +3,10 @@ sympy
3
3
  symengine
4
4
  qiskit<2.0,>=1.0.0
5
5
  qiskit-qasm3-import>=0.5.1
6
+
7
+ [dev]
6
8
  ipykernel
9
+ build
10
+ pytest
7
11
  pandas
8
12
  tqdm
@@ -1,47 +0,0 @@
1
- name: Publish to PyPI and Create Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*' # Only run when pushing tags like v1.0.0, v0.9.1
7
-
8
- jobs:
9
- build-and-publish:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: write # Used to create GitHub Release
13
- id-token: write # If you use OIDC, can be used instead of PyPI token (optional)
14
-
15
- steps:
16
- - name: Check out the code
17
- uses: actions/checkout@v3
18
-
19
- - name: Set up Python
20
- uses: actions/setup-python@v5
21
- with:
22
- python-version: '3.x'
23
-
24
- - name: Install build tool
25
- run: |
26
- python -m pip install --upgrade pip
27
- pip install build
28
-
29
- - name: Build the package
30
- run: python -m build
31
-
32
- - name: Publish to PyPI
33
- uses: pypa/gh-action-pypi-publish@release/v1
34
- with:
35
- user: __token__
36
- password: ${{ secrets.PYPI_API_TOKEN }} # Make sure PYPI_API_TOKEN is set in your repository secrets
37
-
38
- - name: Create GitHub Release
39
- uses: softprops/action-gh-release@v2
40
- with:
41
- tag_name: ${{ github.ref_name }}
42
- name: Release ${{ github.ref_name }}
43
- body: |
44
- 📦 Published version: `${{ github.ref_name }}`
45
- ✅ Auto-generated release from Git tag.
46
- env:
47
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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