Skip to main content

Log-Quantum Fractal Tree: Pattern-Aware Deduplicating Data Structure

Project description

Log-Quantum Fractal Tree (LQFT) 🚀

Architect: Parjad Minooei Portfolio: parjadm.ca


📌 Executive Summary

The Log-Quantum Fractal Tree (LQFT) is a high-performance, scale-invariant data structure engine designed for massive data deduplication and persistent state management. By bridging a native C-Engine with a Python Foreign Function Interface (FFI), this project bypasses the Global Interpreter Lock (GIL) to achieve sub-microsecond search latencies and memory efficiency that scales with data entropy rather than data volume.


🧠 Formal Complexity Analysis

As a Systems Architect, I have engineered the LQFT to move beyond the linear limitations of standard Python structures.

1. Time Complexity: $O(1)$ (Scale-Invariant)

Unlike standard Trees ($O(\log N)$) or Lists ($O(N)$), the LQFT uses a fixed-depth 64-bit address space.

  • Search/Insertion: $O(1)$
  • Mechanism: The 64-bit hash is partitioned into 13 segments of 5-bits. This ensures that the path from the root to any leaf is physically capped at 13 hops, providing deterministic latency regardless of whether the database holds 1,000 or 1,000,000,000 items.

2. Space Complexity: $O(\Sigma)$ (Entropy-Based)

Standard structures scale linearly based on the number of items ($N$). The LQFT scales based on the Information Entropy ($\Sigma$) of the dataset.

  • Space: $O(\Sigma)$
  • Mechanism: Utilizing Merkle-DAG structural folding, the engine detects identical data branches and reuses them in physical memory. In highly redundant datasets (e.g., DNA sequences or Log files), this results in sub-linear memory growth.

📊 Performance Benchmarks

Tested in Scarborough Lab: Python 3.12 | MinGW-w64 GCC-O3 Optimization

Metric Standard Python ($O(N)$) LQFT C-Engine ($O(1)$) Delta
Search Latency (N=100k) ~3,564.84 μs 0.50 μs 7,129x Faster
Insertion Time (N=100k) 41.05s 1.07s 38x Faster
Memory (Versioning) $O(N \times V)$ $O(\Sigma + V)$ 99% Savings

🛠️ Architectural Pillars

  • Native C-Engine Core: Pushes memory allocation and bit-manipulation to the C-layer for hardware-level execution.
  • Structural Folding: A recursive structural hashing algorithm that collapses identical sub-trees into single pointers.
  • Adaptive Migration: A polymorphic wrapper (AdaptiveLQFT) that manages the transition from lightweight Python dictionaries to the heavy-duty C-Engine.
  • Zero-Knowledge Integrity: Fixed-depth pathing allows for 208-byte Merkle Proofs to verify data existence in microsecond time.

⚙️ Quick Start

Compilation

Ensure you have a C compiler (GCC/Clang) installed to build the FFI layer.

python setup.py build_ext --inplace

Usage

from lqft_engine import AdaptiveLQFT

Initialize engine with an auto-migration threshold

engine = AdaptiveLQFT(migration_threshold=50000)

Insert and Search

engine.insert("secret_key", "confidential_data") result = engine.search("secret_key")

print(f"Found: {result}")

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

lqft_python_engine-0.1.6.tar.gz (9.1 kB view details)

Uploaded Source

Built Distributions

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

lqft_python_engine-0.1.6-cp312-cp312-win_amd64.whl (13.9 kB view details)

Uploaded CPython 3.12Windows x86-64

lqft_python_engine-0.1.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.1.6-cp312-cp312-macosx_11_0_arm64.whl (10.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

lqft_python_engine-0.1.6-cp312-cp312-macosx_10_9_x86_64.whl (10.2 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

lqft_python_engine-0.1.6-cp311-cp311-win_amd64.whl (13.9 kB view details)

Uploaded CPython 3.11Windows x86-64

lqft_python_engine-0.1.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.1.6-cp311-cp311-macosx_11_0_arm64.whl (10.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

lqft_python_engine-0.1.6-cp311-cp311-macosx_10_9_x86_64.whl (10.3 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lqft_python_engine-0.1.6-cp310-cp310-win_amd64.whl (13.9 kB view details)

Uploaded CPython 3.10Windows x86-64

lqft_python_engine-0.1.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.1.6-cp310-cp310-macosx_11_0_arm64.whl (10.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

lqft_python_engine-0.1.6-cp310-cp310-macosx_10_9_x86_64.whl (10.3 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

lqft_python_engine-0.1.6-cp39-cp39-win_amd64.whl (13.9 kB view details)

Uploaded CPython 3.9Windows x86-64

lqft_python_engine-0.1.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.1.6-cp39-cp39-macosx_11_0_arm64.whl (10.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

lqft_python_engine-0.1.6-cp39-cp39-macosx_10_9_x86_64.whl (10.3 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

lqft_python_engine-0.1.6-cp38-cp38-win_amd64.whl (13.8 kB view details)

Uploaded CPython 3.8Windows x86-64

lqft_python_engine-0.1.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.1.6-cp38-cp38-macosx_11_0_arm64.whl (10.7 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

lqft_python_engine-0.1.6-cp38-cp38-macosx_10_9_x86_64.whl (10.4 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file lqft_python_engine-0.1.6.tar.gz.

File metadata

  • Download URL: lqft_python_engine-0.1.6.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lqft_python_engine-0.1.6.tar.gz
Algorithm Hash digest
SHA256 7f20e44810d4d382ba2d113ebe6b985d43e2cfdffaa0e560fbe114d762994aad
MD5 0ebacf8413f32a8e817943fa9d8242c4
BLAKE2b-256 6c57b76df65a45c39e41adbe8136c15909dccfdff62ee66fac173be3243c7c9a

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 153d5af01cf7a59383aa897cfcef190250e589c065098d72d220dec34f464f9b
MD5 644ee52bed9a1694e070556790466c92
BLAKE2b-256 ab2ecd063fb88b4b89aa825aaa1c31db3e2f68149eb896d2763a79c9517548b5

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 477773bdd288caac70fa35c94b04da0bfb7c19dfc78a3347a77f7a193cf55baa
MD5 e663b1eb471795b0316605334d18f3c4
BLAKE2b-256 641c448e9a6f980a0d563f38983df6036c3d05d4e1c2c1cb84bd088d9c6ecf7b

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7e355e2d3187a345b476459e5fbe78e73a969963096d2f0507ab5ef7fb4d1986
MD5 0461d373e2f5ec02992ea5bb2042ce0d
BLAKE2b-256 fe1789b55354f8acc994a238d386ab8a3ccaf2060030b7c6efdd344228208024

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 be15b6e0aa5007e5008a8180aa689d1dad59452ee3badc90d95a03b3677c9c2f
MD5 d245f75a7a8343406473ec0c66f260b5
BLAKE2b-256 9b51c9f509ea116035d9df29c2ccad3f9d36eaa1faa07f6ee775b38259cc64d0

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0458c547566f25f7aeeaa58ae208f5a1a3b172a129f98beebeeca299910dfff3
MD5 d20476a689b6d87a3d84d3311611d62a
BLAKE2b-256 6c0fe65f3265bea77a9b474a8142cfc175b90b4a2b472d39787765aa67ef4d57

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fd9919e24796989e1628c67cfab930535c6bf8b6c9ec83984f85cbe0f125d6c4
MD5 3eba075594fb534f030ec49e7e3bb758
BLAKE2b-256 21a760ca2a98d8b857a7e29fc2a63c598bc3a02471e27629e061a3d864fc372b

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5811fec07425c8ec8d473f3b701aaa7d595999634cc96170f0e7766be0a1441d
MD5 4977320671622e1bbf4802a920385f3b
BLAKE2b-256 4092761d3c08ec413b083f6fb093819806c90dc206e9b42493076f35e385abd4

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d7e04c1a35d10b6944cdc60cc3ca9716f4b8272ac3765ae8784309ff6e58ab51
MD5 19582696980427bdabc43ec73e85fce9
BLAKE2b-256 4accdf3c500dc39cd0cdeb1dfce9dd961db01f7e0f92aa28c5c19db1a16f998c

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a54d071edb8872f76319883f9c4d26685542b883625068e4714990477b52c564
MD5 9d8c7e13e3b3c9fd1269bee3cc90a4b4
BLAKE2b-256 c2a827722ea1d38bbd5696f33e90ea4cfdfa9adcf12f07d7fd040b006c92375f

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e462a25e1ae606e0ee01994577a15ace2d2dbeac10acb5832fad52f350062eb6
MD5 46a87cb8d0cbf710ff994645438232bb
BLAKE2b-256 af54684a70a39c574c78bf65578fbef6fa7616964f26268f220ef09551b31166

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e59991b530a46e5aa6488bc144470ac23d4aad5a6a426522949f67cd6f93749f
MD5 e7d873218784432cd5a0d36ab18655af
BLAKE2b-256 321beed54d9e28bf1667346dcafd1500239ed7658ec583913f00797c47a43c56

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c31e887135c11bdc183f3d17ceb72fed1e3706c6037aa637e133aae258a4bbac
MD5 c5fdfbf97c8c57d40d04f4283ea53f97
BLAKE2b-256 9ca7c6a1c11a7c221078457f341e7c1a763a9540f28e3bfdb6b808687dbe1414

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eb376b34abc68fa2ef1632228fdbc2420112b19e82f64529f2ee1f5a0a156549
MD5 d6ada4ce953467a41466bf06e4ed09d5
BLAKE2b-256 a465fc0ee5904bbbcd40fa7249d298e008f584fb68113b0b48ed05a0458d56e9

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5bf8a908b338c078069f38132db53e647c558aef6d211d1f9d3e3576b0cb3900
MD5 196aa221346d46304c8fe1e605be1544
BLAKE2b-256 855504e1b48996b21d64fdb24329cadb7e48eb5eb7d7b51b0c9ee1049061c677

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d889e4158ff34135ac97c75dbbc2c15ae05f400808a06f8ba665a7b8b5944cd2
MD5 d5e07a6c6395ff78f59368a27bbeb182
BLAKE2b-256 8e886e7e12c3c95814d841856efa6389af7e368b85ccc139bad064799dfe5663

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f8a9cfefff5a971da58f8f05d59b4e1157df2ac55d06d6b9d86a84c5c680533f
MD5 92c554c87238a59b9a1fd96e02d7f438
BLAKE2b-256 1cd8b0b57ae2a39a6062759f79e7674e1624b5f2bd8a598635b4f400e7246cd3

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e19324bd5d0abf957d2f29fc52285b98dd8628b0d115efd36615b1a6bcad3709
MD5 bd7a0a26e5e095976daf2bcb2a32210f
BLAKE2b-256 f056f5e0ab8aab34628345f23bb468e12a151199b346e2b2b341917d7026a5a4

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 065f020640e748f946f963e3f493f0effc6264f3a0fab5c7dce558feef43188d
MD5 3eb334389d9239bfaf6d0792cd623315
BLAKE2b-256 f6d6b941d54d1fd84eaea394a2a70d09383bfaf31b194b665d3b15446afe4582

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 445071cb3932ecfe646ba12b2dc0964f688bbc12dea9d2c394792d56c5511536
MD5 29ff10cd9a0384778207e33c8f2e9ac3
BLAKE2b-256 c4de2997262906573d8d1e94654204ac226930ff3e7ec89c2b57e4bc8cf78330

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.6-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.1.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9cc70ff2e3b0fc4e4f480e702ed4d20a9a09b4a778e65d393bbcfdf6c95a4e51
MD5 7f44054a44f1d12a3869c20ff4f1e36a
BLAKE2b-256 05bf47e79cf308a11b2f761bba51d708ce417303cf665d2dc5b9926f7ffeedbf

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