Skip to main content

Python bindings for HypercubeHopfield: modern Hopfield associative memory on hypercube graphs

Project description

HypercubeHopfield: Modern Hopfield Associative Memory

Pattern storage and recall on Boolean hypercube graphs, with exponential capacity and softmax attention over sparse Hamming-ball neighborhoods.

Installation

pip install hypercube-hopfield

Quick Start

import numpy as np
import hypercube_hopfield as hh

# Create a network with 256 neurons (dim=8, N=2^8)
net = hh.HopfieldNetwork(dim=8, seed=42)

# Store some patterns
patterns = np.random.randn(10, net.num_vertices).astype(np.float32)
net.store_patterns(patterns)

# Recall from a noisy cue
cue = patterns[0] + np.random.randn(net.num_vertices).astype(np.float32) * 0.3
result = net.recall(cue)
print(f"Converged: {result.converged}, steps: {result.steps}")

Features

  • Explicit pattern storage with exponential capacity
  • Softmax attention over sparse Hamming-ball neighborhoods
  • Two update modes: Sync (deterministic, GPU-portable) and Async (guaranteed energy descent)
  • Pickle support for saving/loading networks
  • NumPy integration with automatic float32 conversion

Documentation

See Python SDK Reference for the full API.

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

hypercube_hopfield-0.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distributions

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

hypercube_hopfield-0.1.0-cp313-cp313-win_amd64.whl (144.6 kB view details)

Uploaded CPython 3.13Windows x86-64

hypercube_hopfield-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl (295.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

hypercube_hopfield-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl (168.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

hypercube_hopfield-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (154.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

hypercube_hopfield-0.1.0-cp312-cp312-win_amd64.whl (144.6 kB view details)

Uploaded CPython 3.12Windows x86-64

hypercube_hopfield-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl (295.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

hypercube_hopfield-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl (168.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

hypercube_hopfield-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (154.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

hypercube_hopfield-0.1.0-cp311-cp311-win_amd64.whl (142.9 kB view details)

Uploaded CPython 3.11Windows x86-64

hypercube_hopfield-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl (294.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

hypercube_hopfield-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl (166.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

hypercube_hopfield-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (153.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

hypercube_hopfield-0.1.0-cp310-cp310-win_amd64.whl (142.1 kB view details)

Uploaded CPython 3.10Windows x86-64

hypercube_hopfield-0.1.0-cp310-cp310-manylinux_2_28_x86_64.whl (293.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

hypercube_hopfield-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl (165.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

hypercube_hopfield-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (152.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file hypercube_hopfield-0.1.0.tar.gz.

File metadata

  • Download URL: hypercube_hopfield-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hypercube_hopfield-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ed6b079b0c592c7c0147c62f2f05082c7b11c15f39731590b977c0507df7cb4d
MD5 a36ad75868357050def9d42fa6fbdb0f
BLAKE2b-256 26dc720f5dd7ed12dee882b0460b11e274478ba55730eacfcdb934403db9b586

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0.tar.gz:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 debc191294c9690f0650e7a617a03737b2b8ee549a36139dc2c0f25fdaea2619
MD5 44a9475617242150a2b6fc426a2e42f9
BLAKE2b-256 94942fd64d1138f624ffa54aed4f7383ccebc7b5fef841301519ba0ea9d52de2

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7ea118adee8a586886103b6b6ee8ee7c553711cf0d26d25ca9bd4a4edec4d009
MD5 9b3f41c8c23543e0c30c0bc709886522
BLAKE2b-256 6ea6edb1c88208043ce6d2ef3da65452062d48402a29eb1e9144faa59ede5a45

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 be3ed192903801800ff2dc3c2a6d0d90c944ff65fee5ba386cda4b0633e965c6
MD5 599d699357d47ae1e32df190f392d754
BLAKE2b-256 d28a3aa20db8269f255746ede86fb596ff381831e3b5abc1132aaa4970d78d85

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ae2426e36db83c27242fbf4d8680c3a26427f61be9a033a6be3f0f63a028041
MD5 b33822eb12817023e21ba610bcdbb4ad
BLAKE2b-256 5caa857329d0f67572f49d7569ada8536c5c2939bd4017913c5f21cd9d4e0a0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 18d7f23b4c6c72c778509a4171e25ffbbcc350894759a4816542c630426fad9d
MD5 3d3e9a9b5d55cea2440bd2d4d7411d70
BLAKE2b-256 88037be340a10ee32720c96aaf4f8ce9830316af9f21e30f0810b5d610f7fa10

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4198563b6044b583db508bb49ce46340fe7edb1ea1c241275c04a44c0c5c99e5
MD5 62b7baaa984a35218ffbad857c6e3e52
BLAKE2b-256 a2c4b73a23b96ad6a10b0f1d07837289c416f2808215784c208d9068faa9d038

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f9746b79dfb66d3545e41086352b185f850c89e32b687e77dbbf07b9ef5a055a
MD5 e6f48a04b3e4571f0f2f8dab19b7d73e
BLAKE2b-256 b132f1a9fce5299336a7e75dad578478af1d57201b7b01fe3158c39ae0d106a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 41cf65875635a0ba5b70f75f1badd418e0290d026286589e365da9ae6f63af39
MD5 0b5c3f0d5e3eb922e27ec93b99244b4a
BLAKE2b-256 ed08c0a4a31e005c5cd1807ccac7bdbcf676c8dd4f51d2994d12b9dc323e08ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f25beaaf3777729ea2cca0645f164a7fb43327d20ff4880cb9f057133b08b8ca
MD5 3657e62096f416452b4e5d7150b2e3d0
BLAKE2b-256 471dba57b4d1b212b811184f7e065d7daf6aa4fa2a6678cc2cea14aa8fd02204

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ae526d6bc49840130e0f15a3307b0f6ec01fc6aa971cbda2f5ffe6cf058ad4f9
MD5 4ded97808ba23ff3bd8be728b143d390
BLAKE2b-256 dc09e455bc04096454f8441b1f006eb9edce95a24acd8f30c1c17fb5ff9a6c9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 79ec2fa1ad280ffac9c4497cb7aa3780b3d53e678cd8548b4281866d2760e044
MD5 b74508e9706dcee9a1bc05698663c442
BLAKE2b-256 b3d6f82734ab3621e9c349d25da695eb2d271f5993c27655c9220da83b024dbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ccc91749a946c46a9b98fed96e8b5f8ceb46740274098ca5c648bda0a7338752
MD5 570eae06df23b660cf148e92a726bcee
BLAKE2b-256 8f95bc58820a596848dd6dae21acefa362119ece1697cd9423f2d948fe65a53a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 113444d3566bcec4a154a814c0dccf378b2fa92e62e50d247145d8e713b980f3
MD5 dc45593d409a891faf9b5546595ca580
BLAKE2b-256 246344cd364172346089098984bd386b773e61a96d968882a59d6b0c05985fe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1357e73cecc156492f4714b4ad8b3de5a60bcd53ddc97b4c4d4cf4708f0f54b9
MD5 b66cd6da2cfbd43ad16e551bced18346
BLAKE2b-256 5b36fd59cad741f431c188b56db8f0cef287201241703f541c3eeff92c94729e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 96851c8abe1d9684f12c808d0f9038e7a2afc028cd47d94d4187075f3e961c44
MD5 58ba744190b8288187a95c596f8debd8
BLAKE2b-256 655c11bb2dba76e70c9f3b7eec21ee3ff257eb5b03861a36365b8a2af29950c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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

File details

Details for the file hypercube_hopfield-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 403161090a62dd93858476143f34c8c99d7644ba01599085bc697c5c6f263007
MD5 93059bdd621a1beac129fac8eaf9ba95
BLAKE2b-256 0cc96df5ad2291f38dcc296ce2852a3be7fbc322987a352ecc61f06bdf51ce0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

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