Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d0d5dad
upload rust pathsum prototype
PhysicsQoo Feb 11, 2026
aecb088
add QuPRS Rust Rewrite Plan
PhysicsQoo Feb 11, 2026
3154dc3
renamed: src/Rational.rs -> src/rational.rs
PhysicsQoo Feb 24, 2026
aaa990a
feat: ✨ Implement quantum gate operations and refactor pathsum structure
PhysicsQoo Feb 25, 2026
37da959
feat: add PhasePolynomial add_term method
PhysicsQoo Feb 25, 2026
8118e9d
feat: ✨ Implement more quantum gate methods and reduction rules
PhysicsQoo Feb 25, 2026
0c9f5df
feat: ✨ Add implement omega reduction rule
PhysicsQoo Feb 25, 2026
14e626f
feat: ✨ ass QASM parse and fixed try_reduce_omega
PhysicsQoo Feb 25, 2026
4d2817b
feat: ✨ Enhance QASM loading with initial state support and register …
PhysicsQoo Feb 25, 2026
d5e225b
feat: ✨ 1. Add get_used_vars method to BooleanState and PhasePolynomial
PhysicsQoo Feb 26, 2026
dfa6450
feat: 🚀 Introduce Python FFI for QuPRS Core Engine
PhysicsQoo Feb 26, 2026
ec74d70
remove target folder
PhysicsQoo Mar 2, 2026
756fd74
feat: ✨ Refactor phase handling in PathSum and introduce FreeRational…
PhysicsQoo Mar 2, 2026
e6ba0f4
feat: ✨ Refactor quantum gate methods and add boolean polynomial mult…
PhysicsQoo Mar 2, 2026
ed991cd
feat: ✨ Add CCX gate implementation and refactor XOR logic in Boolean…
PhysicsQoo Mar 2, 2026
7e7fce9
feat: ✨ Refactor phase handling in PathSum phase_poly and implement d…
PhysicsQoo Mar 2, 2026
7a19e6e
feat: ✨ Implement variable substitution with polynomial in BooleanSta…
PhysicsQoo Mar 3, 2026
3ee78d2
feat: ✨ Refactor quantum gate methods to include application directio…
PhysicsQoo Mar 3, 2026
2bddb22
feat: ✨ Implement rotation gate ( RX, RY, U2, U3) and add its unitest…
PhysicsQoo Mar 3, 2026
7cc6018
feat: ✨ Add Intermediate Representation (IR) for quantum operations a…
PhysicsQoo Mar 4, 2026
adad8da
feat: ✨ Update CLI and PathSum structure, add verification strategies…
PhysicsQoo Mar 4, 2026
27520e9
feat: ✨ Refactor auto-reduction logic and add statistics management f…
PhysicsQoo Mar 4, 2026
e632c1a
feat: ✨ Enhance CLI logging and add statistics management for reducti…
PhysicsQoo Mar 4, 2026
10eecfd
feat: ✨ add wmc.rs, build.rs and some file change to support wmc. But…
PhysicsQoo Mar 5, 2026
7f9aaa5
feat: ✨ cli support both 1 and 2 circuits mode.
PhysicsQoo Mar 5, 2026
833bba8
feat: ✨ Cli split to multiple files and refactor qasm.rs
PhysicsQoo Mar 6, 2026
d5be1c8
Change folder name from rust-test to rust
PhysicsQoo Mar 6, 2026
92c62ae
feat: ✨ add python_ffi, eq_check still need to fix
PhysicsQoo Mar 6, 2026
5e75732
feat: ✨ Fixed a conversion bug from pathsum to dimacs in wmc.rs and r…
PhysicsQoo Mar 6, 2026
979da9e
feat: ✨ Add struct Angle to fix ratation gate error.
PhysicsQoo Mar 9, 2026
54e92e0
feat: ✨ Update FFI setting to support struct Angle.
PhysicsQoo Mar 11, 2026
e17fab9
feat: ✨ Update Cargo.toml files to share the same version. Update bui…
PhysicsQoo Mar 17, 2026
2bcc1be
feat: ✨ Remove patch in build.rs and dirrect link to the branch alrea…
PhysicsQoo Mar 17, 2026
84b59eb
feat: ✨ Add QuPRS binding to new rust core.
PhysicsQoo Mar 17, 2026
aec34bf
Fix: Fixed pytest error.
PhysicsQoo Mar 17, 2026
5d6b3eb
chore: switch GPMC submodule to personal fork (arm64-musl-patch) for …
PhysicsQoo Mar 17, 2026
61c879b
feat: ✨ Add pytest workflow_dispatch
PhysicsQoo Mar 17, 2026
93603ee
chore: upload GPMC submodule change
PhysicsQoo Mar 17, 2026
c07cbdc
update pytest paths list
PhysicsQoo Mar 17, 2026
ca525fc
Fix: Fixed pytest macos error.
PhysicsQoo Mar 17, 2026
89baceb
feat: ✨ Add pytest.yml Rust env and cache
PhysicsQoo Mar 17, 2026
6e44a05
Fix: Fixed FFI error.
PhysicsQoo Mar 17, 2026
2edc244
feat: ✨ Change pytest.yml pip install . to maturin develop.
PhysicsQoo Mar 17, 2026
d82f280
Fix: Fixed pytest.yml venv issue.
PhysicsQoo Mar 17, 2026
7bf19d9
refactor: Remove custom Hatch build hook and update CI/CD workflows, …
PhysicsQoo Mar 17, 2026
e8d2c87
feat: Add Rust backend for equivalence checking with configurable WMC…
PhysicsQoo Mar 17, 2026
0f64b7c
Fixed: Fixed bug cause from migrate project build and publishing to u…
PhysicsQoo Mar 17, 2026
c8f4f33
build: Add `--no-build-isolation` to pip install/wheel commands in Do…
PhysicsQoo Mar 17, 2026
01fd5ff
refactor: Remove `conda run` prefixes from Dockerfile commands and us…
PhysicsQoo Mar 17, 2026
4c7a055
feat: ✨ Refactor Dockerfile and docker-build.yml and Cargo.toml.
PhysicsQoo Mar 18, 2026
9187cfb
Fix: Fixed Dockerfile tester.
PhysicsQoo Mar 18, 2026
c34fa6c
Fix: Remove pythonpath="src" in pyproject.toml
PhysicsQoo Mar 18, 2026
f446830
feat: ✨ Add GPMC_STATIC_BUILD
PhysicsQoo Mar 18, 2026
51fa37d
Fix: add QUPRS_GPMC_PATH, QUPRS_GANAK_PATH in rust eq_check interface.
PhysicsQoo Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 39 additions & 9 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ on:
paths:
- 'src/**'
- 'test/**'
- 'rust/**'
- 'pyproject.toml'
- 'Cargo.toml'
- '.github/workflows/benchmarks.yml'
- 'scripts/hatch_build.py'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'test/**'
- 'rust/**'
- 'pyproject.toml'
- 'Cargo.toml'
- '.github/workflows/benchmarks.yml'
- 'scripts/hatch_build.py'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -53,10 +55,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

# 🌟 新增:設定 Rust 環境與快取
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: "rust -> target"
key: ubuntu-latest-benchmark-cargo-v1

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get update && sudo apt-get install -y cmake libgmp-dev libmpfr-dev zlib1g-dev
sudo apt-get install -y cmake libgmp-dev libmpfr-dev zlib1g-dev

- name: Cache Compiled Binaries (GPMC/Ganak)
id: cache-wmc-tools
Expand All @@ -68,14 +80,16 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
pip install maturin
export VIRTUAL_ENV=$(dirname $(dirname $(which python)))
maturin develop --release -E dev

- name: Run benchmark and save results as JSON
run: pytest --benchmark-only --benchmark-json=output.json

- name: Discard local changes to tracked files
run: |
echo "Cleaning up modified files (like _version.py) to allow branch switching..."
echo "Cleaning up modified files to allow branch switching..."
git checkout .

- name: Process benchmark data (Generate Charts)
Expand All @@ -89,6 +103,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
save-data-file: true
fail-on-alert: false

- name: Push results to benchmarks branch
run: |
# Set Git identity
Expand Down Expand Up @@ -145,9 +160,21 @@ jobs:
with:
submodules: recursive
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: "rust -> target"
key: ubuntu-latest-benchmark-cargo-v1

# Step 2: Fetch baseline from main branch (Moved up)
- name: Fetch baseline
run: |
Expand All @@ -159,10 +186,12 @@ jobs:
echo "Baseline not found. Creating an empty baseline."
echo "{}" > main_baseline.json
fi

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get update && sudo apt-get install -y cmake libgmp-dev libmpfr-dev zlib1g-dev
sudo apt-get install -y cmake libgmp-dev libmpfr-dev zlib1g-dev

- name: Cache Compiled Binaries (GPMC/Ganak)
id: cache-wmc-tools
uses: actions/cache@v4
Expand All @@ -172,8 +201,9 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel
pip install .[dev]
pip install maturin
export VIRTUAL_ENV=$(dirname $(dirname $(which python)))
maturin develop --release -E dev

# Step 4: Run benchmark on PR code (and compare if baseline exists)
- name: Run and compare benchmarks
Expand Down Expand Up @@ -208,7 +238,7 @@ jobs:
# Step 6: Comment on PR with benchmark results
- name: Post benchmark results
if: success() || failure()
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@v3
with:
path: benchmark_report.md
header: "🔍 Benchmark Comparison Report"
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ on:
paths:
- 'src/**'
- 'test/**'
- 'rust/**'
- 'pyproject.toml'
- '.github/workflows/codspeed.yml'
- 'scripts/hatch_build.py'
pull_request:
paths:
- 'src/**'
- 'test/**'
- 'rust/**'
- 'pyproject.toml'
- '.github/workflows/codspeed.yml'
- 'scripts/hatch_build.py'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -57,12 +57,17 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ env.BINARY_DIR }}/wmc_tools
key: ${{ matrix.os }}-${{ matrix.arch }}-wmc-tools-v0
key: ${{ runner.os }}-${{ runner.arch }}-wmc-tools-v0

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
pip install maturin
export VIRTUAL_ENV=$(dirname $(dirname $(which python)))
maturin develop --release -E dev
pip install pytest-shard

- name: Run benchmarks
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ on:
paths:
- 'src/**'
- 'test/**'
- 'rust/**'
- 'pyproject.toml'
- '.github/workflows/docker-build.yml'
- 'scripts/hatch_build.py'
pull_request:
branches: [ "main" ]
paths:
- 'src/**'
- 'test/**'
- 'rust/**'
- 'pyproject.toml'
- '.github/workflows/docker-build.yml'
- 'scripts/hatch_build.py'
workflow_dispatch:
inputs:
run_build_push:
Expand Down Expand Up @@ -70,6 +70,13 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: dummy-image
tags: type=semver,pattern={{version}}

- name: Build tester image
uses: docker/build-push-action@v5
Expand All @@ -80,6 +87,8 @@ jobs:
# Key optimization: Write cache, scope includes architecture name
cache-from: type=gha,scope=${{ env.CACHE_SCOPE_PREFIX }}-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ env.CACHE_SCOPE_PREFIX }}-${{ matrix.arch }}
build-args: |
${{ steps.meta.outputs.version != 'latest' && format('SETUPTOOLS_SCM_PRETEND_VERSION={0}', steps.meta.outputs.version) || '' }}

# =================================================================
# Job 2: Build & Push Architectures (Parallel native builds)
Expand Down
Loading
Loading