unitarylab-cu12
CUDA 12 native statevector and density-matrix backends for UnitaryLab.
This repository branch builds the CUDA backend as an independent Python wheel.
The PyPI distribution name is unitarylab-cu12; the Python import package is
unitarylab_cu12.
Supported environment
- Linux x86_64 and Linux aarch64 server environments
- Windows x86-64
- CPython 3.10, 3.11, and 3.12
- CUDA 12 runtime provided by
nvidia-cuda-runtime-cu12 - cuBLAS provided by
nvidia-cublas-cu12 - NVIDIA driver compatible with the CUDA version used by the wheel
Linux aarch64 wheels target server environments and do not promise Jetson compatibility. macOS, Windows ARM64, and Python 3.13 are not part of the wheel matrix.
Build
Building requires a CUDA 12 development toolkit, a C++ compiler, CMake, and Ninja. Build wheels only; source distributions are intentionally disabled.
python -m build --wheel
Override the CUDA architecture list when necessary:
UNITARYLAB_CUDA_ARCHS="80-real;86-real;89-real;90-real" \
python -m build --wheel
Install a wheel
python -m pip install unitarylab-cu12
Verify the native extension import:
from unitarylab_cu12 import cudadensity, cugates
print(cugates.__doc__)
print(cudadensity.__doc__)
cugates provides the fused CUDA statevector backend, while cudadensity
provides dense CUDA density-matrix execution. The high-level executors remain
in the main unitarylab package.
On Linux, extension RUNPATH entries locate libcudart.so.12 and cuBLAS in the
NVIDIA runtime wheels. On Windows, the Python package registers the runtime and
cuBLAS bin directories before loading either extension; a complete system
CUDA Toolkit is not required at runtime.
The machine must still have an NVIDIA driver compatible with CUDA 12. Import checks performed by GitHub Actions verify wheel and runtime-library loading on GPU-less runners; they do not execute CUDA kernels.
GitHub Actions
The Build CUDA Wheels workflow is started manually with workflow_dispatch.
It builds Linux x86_64, Linux aarch64, and Windows AMD64 wheels, validates their
native dependencies, then stores them as GitHub Actions artifacts for 14 days.
It does not publish to PyPI.
Synchronize CUDA sources from main
Keep release-specific packaging files on this branch and synchronize only the shared CUDA source directory:
git switch release/cu12
git fetch origin main
git restore --source origin/main -- \
unitarylab/backend/cugates/src \
unitarylab/backend/density_matrix/cudadensity/src
git diff
git add \
unitarylab/backend/cugates/src \
unitarylab/backend/density_matrix/cudadensity/src
git commit -m "sync: update CUDA backends from main"
Do not merge main into this branch; doing so would restore the full UnitaryLab
source tree.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unitarylab_cu12-0.2.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 19.7 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1650afae8af284175bd724cbb2c96a4d69c55d8c0aa84a899e52467f1867ed3e
|
|
| MD5 |
10949aee0303ccd78a31c0863d978ccb
|
|
| BLAKE2b-256 |
4ef248f270b6b07df5cc14408f61dfb3dd681b9b285bf94e62354c4752c0a1fe
|
File details
Details for the file unitarylab_cu12-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 19.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c255fc9356349a8994ebfe14f908dae1e266e38c9e7977dbde795f0afbe15d8a
|
|
| MD5 |
d57a46ec46dd1871c58927499308883e
|
|
| BLAKE2b-256 |
a71bd889f4a51ae109b7d293c792e73f62cfff41fe4febef968577fea73f3c75
|
File details
Details for the file unitarylab_cu12-0.2.0-cp312-cp312-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp312-cp312-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 19.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27bae7c38d7c316bf0a1fa9dbeefb48320edb947fe998e66f283f63bc344d775
|
|
| MD5 |
d9db3ff4eb858220d2508b0c0a012db2
|
|
| BLAKE2b-256 |
e6de967e5ba019183ca76a7179452c162caf57a06d03f90072e15dfb68a1acb9
|
File details
Details for the file unitarylab_cu12-0.2.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 19.7 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee90d002af3f89aebf1b83390d804d3f92a469f2b8d767b4d7b719dc14a0b8bc
|
|
| MD5 |
34d42e280a5015a3d106ff3a08435708
|
|
| BLAKE2b-256 |
061bb52968c3e662a17f5642da8aa7dff2548e0ceb1fee27cdbb38bd8dae9ba6
|
File details
Details for the file unitarylab_cu12-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 19.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da80992d9d5419ff8680a44041ae109a7c27290576f947772600e94646954463
|
|
| MD5 |
b9108b7b066a5275c8bce5326cb16a9a
|
|
| BLAKE2b-256 |
a654098362e424436765334a7b733213396106855c1825293cd08a3fa1995638
|
File details
Details for the file unitarylab_cu12-0.2.0-cp311-cp311-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp311-cp311-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 19.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd5c9e99e8e03c12ab8c33fa63d6d943ed7f8e878b08c2708cefc53377ae54c5
|
|
| MD5 |
3bc10707bc5b2f487c4ad5128a4b134f
|
|
| BLAKE2b-256 |
4dc00a29b78189abcf5fc5ade3fbfd19ab28300a8d6517b7720e8328f0665a0f
|
File details
Details for the file unitarylab_cu12-0.2.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 19.7 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baf541c45d92d5d5ce6704ebe436ab110aac42b168f0dc2a14aefef5077f0615
|
|
| MD5 |
4ff950742902644fec7ec5fca8151bbd
|
|
| BLAKE2b-256 |
57b338d21bdb1701c7b3dae022270a71365020b365a10e47d4578ae64ae329aa
|
File details
Details for the file unitarylab_cu12-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 19.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a5f5b7d73b84f6c1b93e74d4850f4a5ec686dcd17c17c245ff5a0ebc484f51e
|
|
| MD5 |
7be61e11337f532c61c3b04507510866
|
|
| BLAKE2b-256 |
2cb7c09d7a51501e6ef36760449adde186de9a2c524a62133057f70e2ba2e171
|
File details
Details for the file unitarylab_cu12-0.2.0-cp310-cp310-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: unitarylab_cu12-0.2.0-cp310-cp310-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 19.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8203e4de48faa215ddaf011e5b9a27964479a84a938a7805ecb090add4f48f8
|
|
| MD5 |
af68222c79aca927e8ac5be27c160924
|
|
| BLAKE2b-256 |
ec9d4fcb964a91fb97d223716a03b053fd9e4bb6758e9321a9ebba3e18b4d6a2
|