Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 4 additions & 20 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,8 @@ jobs:
- name: Install pecos-rslib
run: pip install ./pecos-rslib-wheel/*.whl

- name: Install pecos RNG build dependencies
run: |
pip install build nanobind

- name: Build PECOS RNG
run: |
cd clib/pecos-rng && mkdir build && cd build/ && cmake ..
make && cd .. && pip install .
env:
NANOBIND_DIR: python -m nanobind --include_dir
- name: Install build dependencies
run: pip install build

- name: Build quantum-pecos SDist
run: |
Expand Down Expand Up @@ -261,16 +253,8 @@ jobs:
- name: Install pecos-rslib
run: pip install ./pecos-rslib-wheel/*.whl

- name: Install pecos rng build dependencies
run: |
pip install build nanobind

- name: Build PECOS RNG
run: |
cd clib/pecos-rng && mkdir build && cd build/ && cmake ..
make && cd .. && pip install .
env:
NANOBIND_DIR: python -m nanobind --include_dir
- name: Install build dependencies
run: pip install build

- name: Build quantum-pecos wheel
run: |
Expand Down
27 changes: 5 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ default-members = [
"crates/pecos-phir",
"crates/pecos-qir",
"crates/pecos-qec",
"crates/pecos-clib-pcg",
"crates/pecos-rng",
"crates/pecos",
"crates/pecos-cli",
"python/pecos-rslib/rust",
Expand Down Expand Up @@ -98,7 +98,7 @@ pecos-phir = { version = "0.1.1", path = "crates/pecos-phir" }
pecos-engines = { version = "0.1.1", path = "crates/pecos-engines" }
pecos-qir = { version = "0.1.1", path = "crates/pecos-qir" }
pecos-qec = { version = "0.1.1", path = "crates/pecos-qec" }
pecos-clib-pcg = { version = "0.1.1", path = "crates/pecos-clib-pcg" }
pecos-rng = { version = "0.1.0", path = "crates/pecos-rng" }
pecos = { version = "0.1.1", path = "crates/pecos" }
pecos-cli = { version = "0.1.1", path = "crates/pecos-cli" }
pecos-rslib = { version = "0.1.1", path = "python/pecos-rslib/rust" }
Expand Down
33 changes: 0 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,27 @@ installreqs: ## Install Python project requirements to root .venv
uv sync --project .; \
fi

.PHONY: buildrng
buildrng:
@echo "Skipping RNG library build (using Rust fallback)..."
# @echo "Building and installing RNG library..."
# uv pip install nanobind
# @if [ -z "$(CC)" ] && [ -z "$(CXX)" ]; then \
# cd clib/pecos-rng && CC=gcc CXX=g++ uv pip install -e .; \
# else \
# cd clib/pecos-rng && uv pip install -e .; \
# fi

# Building development environments
# ---------------------------------
.PHONY: build
build: installreqs ## Compile and install for development
@unset CONDA_PREFIX && cd python/pecos-rslib/ && uv run maturin develop --uv
$(MAKE) buildrng
@unset CONDA_PREFIX && uv pip install -e "./python/quantum-pecos[all]"

.PHONY: build-basic
build-basic: installreqs ## Compile and install for development but do not include install extras
@unset CONDA_PREFIX && cd python/pecos-rslib/ && uv run maturin develop --uv
$(MAKE) buildrng
@unset CONDA_PREFIX && uv pip install -e ./python/quantum-pecos

.PHONY: build-release
build-release: installreqs ## Build a faster version of binaries
@unset CONDA_PREFIX && cd python/pecos-rslib/ && uv run maturin develop --uv --release
$(MAKE) buildrng
@unset CONDA_PREFIX && uv pip install -e "./python/quantum-pecos[all]"

.PHONY: build-native
build-native: installreqs ## Build a faster version of binaries with native CPU optimization
@unset CONDA_PREFIX && cd python/pecos-rslib/ && RUSTFLAGS='-C target-cpu=native' \
&& uv run maturin develop --uv --release
$(MAKE) buildrng
@unset CONDA_PREFIX && uv pip install -e "./python/quantum-pecos[all]"

# Documentation
Expand Down Expand Up @@ -228,12 +213,6 @@ clean-unix:
@find . -type d -name "junit" -exec rm -rf {} +
@find python -name "*.so" -delete
@find python -name "*.pyd" -delete
@# Clean clib build artifacts
@find clib -type d -name "build" -exec rm -rf {} +
@find clib -type d -name "dist" -exec rm -rf {} +
@find clib -type d -name "*.egg-info" -exec rm -rf {} +
@find clib -type d -name ".venv" -exec rm -rf {} +
@find clib -name "uv.lock" -delete
@# Clean all target directories in crates (in case they were built independently)
@find crates -type d -name "target" -exec rm -rf {} +
@find python -type d -name "target" -exec rm -rf {} +
Expand All @@ -255,12 +234,6 @@ clean-windows-ps:
@powershell -Command "Get-ChildItem -Path . -Recurse -Directory -Filter '.hypothesis' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
@powershell -Command "Get-ChildItem -Path . -Recurse -Directory -Filter 'junit' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
@powershell -Command "Get-ChildItem -Path python -Recurse -File -Include '*.so','*.pyd' | Remove-Item -Force -ErrorAction SilentlyContinue"
@# Clean clib build artifacts
@powershell -Command "Get-ChildItem -Path clib -Recurse -Directory -Filter 'build' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
@powershell -Command "Get-ChildItem -Path clib -Recurse -Directory -Filter 'dist' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
@powershell -Command "Get-ChildItem -Path clib -Recurse -Directory -Filter '*.egg-info' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
@powershell -Command "Get-ChildItem -Path clib -Recurse -Directory -Filter '.venv' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
@powershell -Command "Get-ChildItem -Path clib -Recurse -File -Filter 'uv.lock' | Remove-Item -Force -ErrorAction SilentlyContinue"
@# Clean all target directories in crates
@powershell -Command "Get-ChildItem -Path crates -Recurse -Directory -Filter 'target' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
@powershell -Command "Get-ChildItem -Path python -Recurse -Directory -Filter 'target' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
Expand All @@ -281,12 +254,6 @@ clean-windows-cmd:
-@for /f "delims=" %%d in ('dir /s /b /ad .hypothesis 2^>nul') do @rd /s /q "%%d" 2>nul
-@for /f "delims=" %%d in ('dir /s /b /ad junit 2^>nul') do @rd /s /q "%%d" 2>nul
-@for /f "delims=" %%f in ('dir /s /b python\*.so python\*.pyd 2^>nul') do @del "%%f" 2>nul
-@REM Clean clib build artifacts
-@for /f "delims=" %%d in ('dir /s /b /ad clib\build 2^>nul') do @rd /s /q "%%d" 2>nul
-@for /f "delims=" %%d in ('dir /s /b /ad clib\dist 2^>nul') do @rd /s /q "%%d" 2>nul
-@for /f "delims=" %%d in ('dir /s /b /ad clib\*.egg-info 2^>nul') do @rd /s /q "%%d" 2>nul
-@for /f "delims=" %%d in ('dir /s /b /ad clib\.venv 2^>nul') do @rd /s /q "%%d" 2>nul
-@for /f "delims=" %%f in ('dir /s /b clib\uv.lock 2^>nul') do @del "%%f" 2>nul
-@REM Clean all target directories in crates
-@for /f "delims=" %%d in ('dir /s /b /ad crates\target 2^>nul') do @rd /s /q "%%d" 2>nul
-@for /f "delims=" %%d in ('dir /s /b /ad python\target 2^>nul') do @rd /s /q "%%d" 2>nul
Expand Down
35 changes: 0 additions & 35 deletions clib/pecos-rng/CMakeLists.txt

This file was deleted.

Empty file removed clib/pecos-rng/README.md
Empty file.
10 changes: 0 additions & 10 deletions clib/pecos-rng/pecos_pcg/__init__.py

This file was deleted.

22 changes: 0 additions & 22 deletions clib/pecos-rng/pyproject.toml

This file was deleted.

96 changes: 0 additions & 96 deletions clib/pecos-rng/src/rng_pcg.c

This file was deleted.

Loading
Loading