No project description provided
Project description
qumat-qdp
GPU-accelerated quantum state encoding for Apache Mahout Qumat.
Installation
pip install qumat[qdp]
Requires CUDA-capable GPU.
Usage
import qumat.qdp as qdp
import torch
# Initialize engine on GPU 0
engine = qdp.QdpEngine(device_id=0)
# Encode data into quantum state
qtensor = engine.encode([1.0, 2.0, 3.0, 4.0], num_qubits=2, encoding_method="amplitude")
# Zero-copy transfer to PyTorch
tensor = torch.from_dlpack(qtensor)
print(tensor) # Complex tensor on CUDA
Encoding Methods
| Method | Description |
|---|---|
amplitude |
Normalize input as quantum amplitudes |
angle |
Map values to rotation angles (one per qubit) |
basis |
Encode integer as computational basis state |
iqp |
IQP-style encoding with entanglement |
Input Sources
# Python list
qtensor = engine.encode([1.0, 2.0, 3.0, 4.0], 2, "amplitude")
# NumPy array
qtensor = engine.encode(np.array([[1, 2, 3, 4], [4, 3, 2, 1]]), 2, "amplitude")
# PyTorch tensor (CPU or CUDA)
qtensor = engine.encode(torch.tensor([1.0, 2.0, 3.0, 4.0]), 2, "amplitude")
# File formats
qtensor = engine.encode("data.parquet", 10, "amplitude")
qtensor = engine.encode("data.arrow", 10, "amplitude")
qtensor = engine.encode("data.npy", 10, "amplitude")
qtensor = engine.encode("data.pt", 10, "amplitude")
Links
License
Apache License 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 qumat_qdp-0.1.0-cp312-cp312-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: qumat_qdp-0.1.0-cp312-cp312-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f74eecc305ca870492dfe05aa182efe6ea82b923751390cbfb8e2ce42ef2342
|
|
| MD5 |
2c6d740a2ebc24e9daecea332b250e24
|
|
| BLAKE2b-256 |
2c1e0b116c40819d05272dbd5e1317a209b792d6663c9049e1af0feb8a35dbf9
|
File details
Details for the file qumat_qdp-0.1.0-cp311-cp311-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: qumat_qdp-0.1.0-cp311-cp311-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14d4edeb60c7a0eafdf681ea103ebfc82b90dad38ea9b1a2a2eb767204ddeb32
|
|
| MD5 |
257a3c2723ce597e3b5ca76fd6b4bc9e
|
|
| BLAKE2b-256 |
9c1cf40ae785a26dd27c3241bb68c54f8504acb2f2f333ca27a52e0afde5fdb1
|
File details
Details for the file qumat_qdp-0.1.0-cp310-cp310-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: qumat_qdp-0.1.0-cp310-cp310-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bb20f024b44cf414859887cf30d8c1e22f1e6e98dbb1fae662939c95e2e408a
|
|
| MD5 |
64fa147c30b4f3ccd5dc2bcf4d310f31
|
|
| BLAKE2b-256 |
3e951fabd52825bbfb521737c4d6fa88405cb5831ffc4e86572c1adfcc546b97
|