Skip to main content

A Python library for Hyperdimensional Computing

Reason this release was yanked:

import pyhdc raises ImportError (a submodule was excluded from the build); fixed in 2.2.1

Project description

PyHDC

PyPI version Tests Coverage License: MIT Python

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 Encoding with your own EncodingSpec
  • Type-annotated throughout

License

MIT LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhdc-2.2.0.tar.gz (105.6 kB view details)

Uploaded Source

Built Distribution

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

pyhdc-2.2.0-py3-none-any.whl (101.2 kB view details)

Uploaded Python 3

File details

Details for the file pyhdc-2.2.0.tar.gz.

File metadata

  • Download URL: pyhdc-2.2.0.tar.gz
  • Upload date:
  • Size: 105.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyhdc-2.2.0.tar.gz
Algorithm Hash digest
SHA256 e5e1df4a62def9e257ee3d08b87a5b35ce3a29ce90a4fb197e23f81234af59ae
MD5 ba47a9306575612c86a20c0124d34adc
BLAKE2b-256 f81982397fc54ffa5344425dc033640918557e02511440b55918f43bc386a7a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhdc-2.2.0.tar.gz:

Publisher: pypi.yml on GNPower/PyHDC

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhdc-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyhdc-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 101.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyhdc-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5685b4c5ba6ffc992f66c7892aae79c4435b5d6514e84d2be5e8b71f88a26986
MD5 ecc31850a2c72e2adedc7ce4b9a544d0
BLAKE2b-256 15b254d2ed07859423b9b4525813a3a08a50eeb157f933c58c4f2b16cf3f4751

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhdc-2.2.0-py3-none-any.whl:

Publisher: pypi.yml on GNPower/PyHDC

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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