Skip to main content

LQFT Engine: Strict Native C-Core & Hardware Concurrency (v0.7.0 Stable)

Project description

Log-Quantum Fractal Tree (LQFT) 🚀

Python 3.12 C-Engine Concurrency Systems Architecture License

📌 Project Overview

The Log-Quantum Fractal Tree (LQFT) is a high-performance, scale-invariant data structure engine designed for massive data deduplication and persistent state management. It synthesizes Hash Array Mapped Trie (HAMT) routing with Merkle-DAG structural folding to provide deterministic $O(1)$ search latency and sub-linear $O(\Sigma)$ space complexity.

By offloading core associative logic to a native C-Extension, the LQFT completely bypasses the Python Global Interpreter Lock (GIL), providing true hardware concurrency and significant memory reduction for versioned, redundant, or patterned datasets.


🧠 Core Architecture (v0.7.0 Strict Native Release)

1. Strict C-Core Enforcement (New in v0.7.0)

The legacy pure-Python fallback heuristics have been entirely stripped out. The LQFT now operates strictly as a zero-overhead FFI wrapper directly communicating with the underlying unmanaged C memory heap.

2. True Hardware Concurrency & GIL Bypass

The engine utilizes native OS-level read-write locks (SRWLOCK on Windows, pthread_rwlock_t on POSIX) combined with Py_BEGIN_ALLOW_THREADS.

  • Multi-Core Scaling: Multiple Python threads can read and write to the Merkle-DAG simultaneously across all physical CPU cores without Segmentation Faults.
  • Zero GIL Contention: The C-Engine entirely decouples from the Python interpreter during execution.

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

The LQFT utilizes a fixed 64-bit hash space partitioned into 13 levels.

  • Deterministic Latency: Every search or insertion requires exactly 13 pointer hops.
  • Scale-Invariance: Performance remains constant whether the dataset contains 10^3 or 10^9 items.

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

Nodes are identified by the cryptographic hash of their contents and child pointers (Merkle-DAG).

  • Structural Folding: Identical sub-trees are shared physically in memory across different branches or versions.

🚀 Performance Benchmarks

Environment: Python 3.12 | GCC -O3 | MSYS2/MinGW64

Metric Result
Search Latency (p50) ~500 ns
Concurrent Throughput ~1.8 Million ops/sec (Across 10 OS Threads)
Space Efficiency Up to 1,500x reduction in versioned graph simulations
Stability 100% Memory Safe under massive multi-threaded turnover

🛠️ Getting Started

Installation

The engine requires a C compiler (GCC/MinGW or MSVC) to build the native extension.

# Clone the repository
git clone [https://github.com/ParjadM/Log-Quantum-Fractal-Tree-LQFT-.git](https://github.com/ParjadM/Log-Quantum-Fractal-Tree-LQFT-.git)
cd Log-Quantum-Fractal-Tree-LQFT-

# Build the native C-extension
python setup.py build_ext --inplace

Basic Usage

The LQFT provides a Pythonic interface to its high-performance C-backend.

from lqft_engine import LQFT
import threading

# Initialize the Strict Native Engine
db = LQFT()

# The C-Engine releases the GIL, allowing true multi-threading
def worker(thread_id):
    for i in range(10000):
        db.insert(f"thread_{thread_id}_key_{i}", "enterprise_payload")

threads = [threading.Thread(target=worker, args=(t,)) for t in range(4)]
for t in threads: t.start()
for t in threads: t.join()

# --- Native Disk Persistence ---
db.save_to_disk("production_state.bin")
db.clear()
db.load_from_disk("production_state.bin")

⚖️ License

This project is licensed under the MIT License - see the LICENSE.md file for details.

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.7.0.tar.gz (8.3 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.7.0-cp312-cp312-win_amd64.whl (16.2 kB view details)

Uploaded CPython 3.12Windows x86-64

lqft_python_engine-0.7.0-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.7.0-cp312-cp312-macosx_11_0_arm64.whl (13.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

lqft_python_engine-0.7.0-cp312-cp312-macosx_10_9_x86_64.whl (13.4 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

lqft_python_engine-0.7.0-cp311-cp311-win_amd64.whl (16.2 kB view details)

Uploaded CPython 3.11Windows x86-64

lqft_python_engine-0.7.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 kB view details)

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

lqft_python_engine-0.7.0-cp311-cp311-macosx_11_0_arm64.whl (13.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

lqft_python_engine-0.7.0-cp311-cp311-macosx_10_9_x86_64.whl (13.4 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lqft_python_engine-0.7.0-cp310-cp310-win_amd64.whl (16.2 kB view details)

Uploaded CPython 3.10Windows x86-64

lqft_python_engine-0.7.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 kB view details)

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

lqft_python_engine-0.7.0-cp310-cp310-macosx_11_0_arm64.whl (13.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

lqft_python_engine-0.7.0-cp310-cp310-macosx_10_9_x86_64.whl (13.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

lqft_python_engine-0.7.0-cp39-cp39-win_amd64.whl (16.2 kB view details)

Uploaded CPython 3.9Windows x86-64

lqft_python_engine-0.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 kB view details)

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

lqft_python_engine-0.7.0-cp39-cp39-macosx_11_0_arm64.whl (13.5 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

lqft_python_engine-0.7.0-cp39-cp39-macosx_10_9_x86_64.whl (13.3 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

lqft_python_engine-0.7.0-cp38-cp38-win_amd64.whl (16.2 kB view details)

Uploaded CPython 3.8Windows x86-64

lqft_python_engine-0.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.4 kB view details)

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

lqft_python_engine-0.7.0-cp38-cp38-macosx_11_0_arm64.whl (13.8 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

lqft_python_engine-0.7.0-cp38-cp38-macosx_10_9_x86_64.whl (13.6 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: lqft_python_engine-0.7.0.tar.gz
  • Upload date:
  • Size: 8.3 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.7.0.tar.gz
Algorithm Hash digest
SHA256 6b5dbe8b3d93ab266a3958a0985fc69067d9e6d6fac8d88b52bc8650119dca04
MD5 4f8c740580947c06e9308f9312ecda23
BLAKE2b-256 1c99dbc3abd1190a3117d6ffe4533412426165dd57073f17b6f6926d2ab98a2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dc942b9a4bfe2b7e42ae2051df023d1a7a962b41118c26d1b219d6340436fd1d
MD5 29af461f687d9251a5afcb7e5ce39d25
BLAKE2b-256 930e6d3bf8414b66505405659db8e19238f7732fb96cc478b2e2488cad8b915b

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.0-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.7.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5765599679b417338ccc1e04176ba88072722ca4fb226857219da7dddc3ad776
MD5 c5b3c808df3445733d4e72fd4349aad5
BLAKE2b-256 2c84e32bbfbdb4919f31f024876596abe3ff9d1f891ed088b76a896cc3b6ee30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 61013da625c2069e6d41a9918dd824abeafd7111588b4f4e73c1c5a78ac90079
MD5 b9f001fa13a175c86c8ef66f3e023970
BLAKE2b-256 43badd8c76f16d93b797947478d5599d079da2d45fc56f35249df91df144a098

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 35902d5872b6648d89f970f587e4e05724bc580a0248b2e2a9a9c26e08e5c4f0
MD5 cb7ed04d7bbddf57c3f7fcfef3084546
BLAKE2b-256 db865beea2aaae6ac95cfc0548e54b09a8a39880e034959d7139e7f0bf9e5fb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3347a0828ae3a7a9081a8b263f1f91789d8cfeff2e7ed74fd56e26e33c21c8cf
MD5 f35130d47a5d0848322270bc1b4a1d2b
BLAKE2b-256 5fc76f9ecd67c07506d113da0cc4044ae2dc78602bdc9d80b186db97adf190d8

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.0-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.7.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a758ca2f433a9e7f5486b62c99c38a0d5735f7bd34eebf12f0d99ffbd97766d
MD5 bd7147b326128ada31bb1fad1609985d
BLAKE2b-256 b5b0d0f1f7cfdfe566e5df7c9338b11a8507de8fa2df18450f654959f8040a4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5a06cee2804da4a781d8829de9e29a6bb83c255e1b537964c9fe5255fe986d08
MD5 0612bfd379ef9d8e90e9230cb0a1d434
BLAKE2b-256 267c5f1b827c42e2c32f49ac168b2dbbbef40ab3b74eb816b52b22c027cc0c5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a685378cf7eceacc2005499389495dd35316bb7c6544c14f12113120a6732465
MD5 b0954b4ffd5934c530d553bc033bc5b9
BLAKE2b-256 174826247b87f6a7861bd8106ccff876209b66a53d6756571643455b6278d760

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 68fe923c122c9c0533fca1de9abe7b43540d62d2ddd9194a23983159071aeb6a
MD5 651429dc30dd6eb07043bdf89e309e1d
BLAKE2b-256 c06360a7c17ac843f4631d1cffa404c982b4ec1090c6355a27d02d8da6ed3e42

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.0-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.7.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 723864307bc7053a0622b2ce77aebb258ddfeb18ed037c3895a8946bc99ddf76
MD5 73c01b867770e38f32d4c95c196b7def
BLAKE2b-256 4e6cbb4c1fd3ba6b34a62d4d078ef8bf76c2599e4b35e34024b05c6bb3182697

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3a31d6f220bd83997c446adea4c31fefbfdb01f0f5a0a584863c48472f4382cc
MD5 a2c7b8f86923c51c241fab16406254cc
BLAKE2b-256 5cdc7180d040fcc5712049e6a1ae671d9a39e544a4c5f0b2e3af58b1b376054a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 580a249e46290940566a59672fe850e37cf51c5d2cd8572a655f4125d368e102
MD5 8963541ccb69b19e1682d6205de93cc7
BLAKE2b-256 1a151e059c02e944b2de14505a49a669dd9e453bf92042771a7d7bf29ae5de6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fbcfb03bd371f2d37f21d0eb32f7b16bd0995d73d26eaf03fa835b5ccd198759
MD5 453197691a8d272f0a9f791feda15a07
BLAKE2b-256 6fede3f46c5818a8ac2d05c1c920cd6b7f184110d198204e789be872eb6676ec

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.0-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.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a4518c61459b4bf120bcfd83fc36372cf0eb6a248d69d1c578484e0df3bb22c1
MD5 57942a5acfe490c3f0ca8788983992b2
BLAKE2b-256 0e844acd930493059bbf22af343b72e055d216bab9b1ecad3200d6aa65f41adf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4799ccb94c56880b89de81ce9a0e68369ed90266a99a3d624e9e3a0a257318a4
MD5 7780da7061715c8e665a96acc17b1520
BLAKE2b-256 106c364d1b9ba8d48a47502676e29e627e4b7f81c1c5b2cd1a5068db6304de71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2ba12b4ec129ca362007b9fed5fc2dc734bb4397b5dee9f7e39c0f7042115bc8
MD5 47885ce3f8e06ed08d1b736bd1138f74
BLAKE2b-256 fd9b2b10689577485cd5f4b3d0888acc3b6a97336617e2ba634ebe14b2099c07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c85635c4a376f3ed5157273c0af0bb38303c789e2367fb2d1a76d62ae608099c
MD5 cdd0e628aea7446c607342480351b8b9
BLAKE2b-256 b47bcf0c6add6a1572e5005342ac0e0f6e66ba9afb1cd2774db3682959fb1cae

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.0-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.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fffacd0ce77bb4393f7bfb94e970f8dc39327c2db2529206ccda29e1ad2368bd
MD5 06c566cc4156e605ed46e9299f30e378
BLAKE2b-256 996cfac50a6fd5a2d989239c6b72406a317428561d2cd6a48d52f48b1daa0fa7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b84fcd76d2459fc0771a8c077bc399bd4e35e1b0fbb8fee47f9ebc11d780f2f1
MD5 83ebc7ccdbbd17adea68d7718ae308ec
BLAKE2b-256 1b61d1cd57b566028202eb976b10072fe20fc80225613293db1f61ce542b3513

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.7.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bcc58b500470e41b4f9672c4e9bcec800b431811784c5de96dac2d13e6601694
MD5 b9b80d32b019b597d76413c06bdc2c56
BLAKE2b-256 90d15df08c8ba80d9dfd1d905ab85568dbe20313daecc2556f621901e579a824

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