PyHDC
A Python library for Hyperdimensional Computing (HDC) and Vector Symbolic Architectures (VSA).
Full documentation: https://pyhdc.readthedocs.io/en/latest/
Overview
PyHDC provides a unified interface for working with high-dimensional binary and continuous vectors used in HDC/VSA-based computing. It supports multiple encoding schemes, pluggable pseudorandom generators, and both NumPy and PyTorch backends.
Installation
pip install PyHDC
Quick Start
import pyhdc as hdc
# Create an encoding
enc = hdc.MAP_C(dimension=10_000)
# Generate hypervectors
v1 = enc.generate()
v2 = enc.generate()
# Core operations
bundled = v1.bundle(v2) # superposition
bound = v1.bind(v2) # association
sim = v1.similarity(v2) # similarity score
Features
- 14 encoding schemes: MAP-C, MAP-I, MAP-I Bits, MAP-B, HRR, HRR (no norm), HRR (const norm), FHRR, VTB, MBAT, BSC, BSDC-CDT, BSDC-S, BSDC-SEG
- 7 generator families: LCG, Fibonacci/Galois LFSR, DLFSR, LCA, PCG, Xorshift, Shifted Counter
- NumPy and PyTorch backends with optional GPU support
- Composable operations: bind, bundle, unbind, similarity, thinning
- Custom encodings: extend
Encodingwith your ownEncodingSpec - Type-annotated throughout
License
MIT LICENSE.
Metadata
Release files for PyHDC 2.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyhdc-2.2.2.tar.gz | 107.1 kB | With provenance | Details for pyhdc-2.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyhdc-2.2.2-py3-none-any.whl | Python 3 | none | any | Details for pyhdc-2.2.2-py3-none-any.whl |
Total release size: 208.7 kB
Release files / pyhdc-2.2.2.tar.gz
| Download URL | pyhdc-2.2.2.tar.gz |
|---|---|
| Size | 107.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
425f9357e6819fa6eebae46565a177e6f4e2224865afeddb17b247432f67bd6e
|
|
BLAKE2b-256 checksum How to use checksums |
e5d8671207ac7839b91327506cfe6a7eb49d67ac4aa8c9c9c341bc8ce072040b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logRelease files / pyhdc-2.2.2-py3-none-any.whl
| Download URL | pyhdc-2.2.2-py3-none-any.whl |
|---|---|
| Size | 101.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80b01ea631e84c7a5440a036360eac4bedc47e80cb223b8e23283c218081e021
|
|
BLAKE2b-256 checksum How to use checksums |
b82b28cbc446f7e258a5240fee24bca43e3a33648a228f776df5a2f1b39719ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logSecurity for PyHDC 2.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyhdc-2.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.