Skip to main content

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


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

If you're not sure about the file name format, learn more about wheel file names.

qumat_qdp-0.1.0-cp312-cp312-manylinux_2_31_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

qumat_qdp-0.1.0-cp311-cp311-manylinux_2_31_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

qumat_qdp-0.1.0-cp310-cp310-manylinux_2_31_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

File details

Details for the file qumat_qdp-0.1.0-cp312-cp312-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qumat_qdp-0.1.0-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 1f74eecc305ca870492dfe05aa182efe6ea82b923751390cbfb8e2ce42ef2342
MD5 2c6d740a2ebc24e9daecea332b250e24
BLAKE2b-256 2c1e0b116c40819d05272dbd5e1317a209b792d6663c9049e1af0feb8a35dbf9

See more details on using hashes here.

File details

Details for the file qumat_qdp-0.1.0-cp311-cp311-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qumat_qdp-0.1.0-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 14d4edeb60c7a0eafdf681ea103ebfc82b90dad38ea9b1a2a2eb767204ddeb32
MD5 257a3c2723ce597e3b5ca76fd6b4bc9e
BLAKE2b-256 9c1cf40ae785a26dd27c3241bb68c54f8504acb2f2f333ca27a52e0afde5fdb1

See more details on using hashes here.

File details

Details for the file qumat_qdp-0.1.0-cp310-cp310-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qumat_qdp-0.1.0-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 9bb20f024b44cf414859887cf30d8c1e22f1e6e98dbb1fae662939c95e2e408a
MD5 64fa147c30b4f3ccd5dc2bcf4d310f31
BLAKE2b-256 3e951fabd52825bbfb521737c4d6fa88405cb5831ffc4e86572c1adfcc546b97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page