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.3.tar.gz (8.7 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.3-cp312-cp312-win_amd64.whl (13.6 kB view details)

Uploaded CPython 3.12Windows x86-64

lqft_python_engine-0.1.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 kB view details)

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

lqft_python_engine-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (10.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

lqft_python_engine-0.1.3-cp312-cp312-macosx_10_9_x86_64.whl (9.8 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

lqft_python_engine-0.1.3-cp311-cp311-win_amd64.whl (13.6 kB view details)

Uploaded CPython 3.11Windows x86-64

lqft_python_engine-0.1.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 kB view details)

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

lqft_python_engine-0.1.3-cp311-cp311-macosx_11_0_arm64.whl (10.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

lqft_python_engine-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl (9.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lqft_python_engine-0.1.3-cp310-cp310-win_amd64.whl (13.6 kB view details)

Uploaded CPython 3.10Windows x86-64

lqft_python_engine-0.1.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 kB view details)

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

lqft_python_engine-0.1.3-cp310-cp310-macosx_11_0_arm64.whl (10.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

lqft_python_engine-0.1.3-cp310-cp310-macosx_10_9_x86_64.whl (9.9 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

lqft_python_engine-0.1.3-cp39-cp39-win_amd64.whl (13.6 kB view details)

Uploaded CPython 3.9Windows x86-64

lqft_python_engine-0.1.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 kB view details)

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

lqft_python_engine-0.1.3-cp39-cp39-macosx_11_0_arm64.whl (10.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

lqft_python_engine-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl (9.9 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

lqft_python_engine-0.1.3-cp38-cp38-win_amd64.whl (13.5 kB view details)

Uploaded CPython 3.8Windows x86-64

lqft_python_engine-0.1.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.8 kB view details)

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

lqft_python_engine-0.1.3-cp38-cp38-macosx_11_0_arm64.whl (10.4 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

lqft_python_engine-0.1.3-cp38-cp38-macosx_10_9_x86_64.whl (10.0 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: lqft_python_engine-0.1.3.tar.gz
  • Upload date:
  • Size: 8.7 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.3.tar.gz
Algorithm Hash digest
SHA256 901c1691b452d4e4bc8af90744de9a528c10a835487d4b1ad0687fb8d4c905d7
MD5 09c212594fd59bd65aca9bbdb07e99a4
BLAKE2b-256 04804056bd7bf36fcbd4a2acfa4ee821811086177829891a3894f4a31ae64a9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d05a52323cfe7297c925b683ae9d8f1d45dbbc2ef7ec73078177f013143b410c
MD5 982e819b3fcb31d2a63f3962a8e98095
BLAKE2b-256 6bda186c47cbd1c46db7e1a4d7e761e77f6532d97745d253b0dfe14dfd3d9fed

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.3-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.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 197a27fd35f6262013a25e6589cb31644233e99d25f4fc522e8d86e3eee793d6
MD5 2af23486b7157f467cf6bcea734b66e4
BLAKE2b-256 c43c4919e1edd594c1fd44d9b76c879eef34c41caee940763cd38c616c707da1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1acd67e763645e5e39dd406afd2f22892816a4c78976fff38c54b7ed57962213
MD5 d29ba62abb225054d14a742763b83713
BLAKE2b-256 c87bd8507bdabfb8b0b6697987027964d3765799130719d5824a946e1c09116d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 368ce4485f7b4ac4c69f5750eb20c8eef4067b213db4f9f41b52bb005f5fb712
MD5 d915372f41c3babc7cc57db08281ea08
BLAKE2b-256 5ead9da2680f203ba3ed3aab32369c6106d26b1b27fd42a7f6b35aea6ab94963

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b2c8eab508ba0a36ed3032949e771e43ab4472b70108a89ae94b85e6c36bb412
MD5 afcb6a5785b72ef6204a88187187d5ba
BLAKE2b-256 4ac11343ff00f363fa95d1af80dc25026a6cd90bc9b94c5e91d21ef51e6bb93c

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.3-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.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8fe70bf7475b411ae5a8410d3737abb66c4998fa73d902e17a5ea9188e953e0
MD5 e8c23018429859f9ef3a7247724e76bd
BLAKE2b-256 129be23129f63a0271d4f2bdabc8ef0a45cd375505444856ff862df1fd8f8b0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0a8a8910c8d9207f75f4bfbba1bb133d17a4e8001c8640b5f2d74267ad858f3
MD5 b41b398d911087ba059133dd5f7e4cb5
BLAKE2b-256 22dc16bf6687ec6aad8c4e363d0443636667e2166e6ccacc61d0eb67894f9e48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7c15bbc13d7f699e7eb28790c3301d5ef5de6a756d16f2aa8de3ef570cce4f33
MD5 dfb16932808b06e5be416a969429c28c
BLAKE2b-256 93997e0c65737f95652711cf7a125bec47443cb6d8293d22e6b2aa676eeca661

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 db6abcea70880b9586825ad040c54b2dbbe8d2ca64400b8344c0bc0da02b0a1f
MD5 809868a7f87e7a976c3e153dcc5dadc5
BLAKE2b-256 d775f8652e711e0ee17fc00935fdc71da80876433f327c3c4ba4cf340bfe67e5

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.3-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.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8d7480a33ad1d5bc5ed20b78a666d139c58577a0198a419e198d958a2a198a7f
MD5 d3de2df0d4aad9e25859ee774c3b228f
BLAKE2b-256 f1ff171f2e03903bf19f68722e246484ff58cabc119c2ea506d3d4c53d768101

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 141034d1b6dcc360434b43ecaa31f790d2703b843ae2f0a3019cfbf2f05ea71c
MD5 8c51ad4a54b4293fbf3937e34c511948
BLAKE2b-256 9e465f86c7a9f625ec3d7115fdf7f9068beb3f2bfc30d7c50099e94956c1af9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 35490c57e3ad5719b8a12edecaf73b828897ace3baaf6eec73320f3eea7a7d1d
MD5 6b8a0b2cfd3e6b344c0e0421f90a1ef3
BLAKE2b-256 e025f9d408b88dd7e6d2f1fe896518949fa6356fe90479cb99b284f0249165d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bbb85bf28ad92cfedab62479f0dabaaa2310a11a65711026bd01e523c2544d70
MD5 5a317a0b35c57a70fe8890a90650d40a
BLAKE2b-256 6098269a8d528a4de14ee57eaffeaf245c2ba4d3e52b2405900ed0618f2022db

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.3-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.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b661be1aaf6de1bb0ff9cdf5d4b0fe7ccb9730847e957ca46e1c75e38c730c4
MD5 17122d6709e4cf0acec36ff6bc08f411
BLAKE2b-256 6c0508aa108ae159906c987040239cd47af348821b07566fc7c0cb24691e278f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f4fdd835898fc0f4d266bfe946c7a72997f08fadcf35bc39526dc52a8b144787
MD5 c11a985aa157ec5a0c4f50c2d9b27f82
BLAKE2b-256 dd17911d1768b92f0c26b00a31bb44ac896aee3191acd0bafadd4f57753cdcc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dd357561605011e4752b92cda16798e44e204d6955f3c47c3bd30e864d2a697b
MD5 f307941f4d349bee69bf69d3046b148a
BLAKE2b-256 f9d8342014b6a988ca6d82068c873c6263bc8a68ee24e4f8d9e757955e409039

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 83c272f39c1e81fd68bc1fe9d48dd358a78cfd9c48957e4ee5379d0a277831b2
MD5 9e7c36e378969b856e6f8723d32f4038
BLAKE2b-256 b78c4dfdb6c66f4644aefafec2a81610329983447815b15b583c59e76dc4d53c

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.1.3-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.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 765d5a11d4269838d91cf5707d822ddc249d3fed151f674e5b365d1145ef93b6
MD5 1960f3bcae5b69a545772c576aedc241
BLAKE2b-256 a7eb6e40cb26d565f0a349affbd9ab0e1bd1a6b6e3e496c9c594ce6f7695106f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbdf93be7a21ee057f20bf2e43f95a32ee08e929706ca7b766abc760b9e56c8f
MD5 f4190413bf5117e8ffb2424bd508c9f0
BLAKE2b-256 33bbe7412ca54ac82351ac931b77d6a28a66a84eb3becf3a6f30eaa2882063a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.1.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fc6602f25d23bd18b9ce3f1c7e44700ea90d2b1f51bc5f18330c6db1f245e2aa
MD5 4b19c862fff240935fd05333c9756fef
BLAKE2b-256 84bd3046c463d9e0d10b30d5a5d21d08dbafa7a913cbaf644d7a0f3c38cdaa5a

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