Metadata-Version: 2.4
Name: fasthardware
Version: 4.35.557
Summary: High-Performance Video Stream Engine & Quantum Simulation Accelerator Core
Home-page: https://github.com/woongyo/fasthardware
Author: WoonGyo Choi
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.20.0
Requires-Dist: opencv-python>=4.5.0
Requires-Dist: psutil>=5.8.0
Provides-Extra: gpu
Requires-Dist: onnxruntime-gpu>=1.16.0; extra == "gpu"
Requires-Dist: torch>=2.0.0; extra == "gpu"
Provides-Extra: openvino
Requires-Dist: openvino>=2023.0.0; extra == "openvino"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

Markdown
# ⚡ fasthardware (V4 Quantum-Ready)

`fasthardware` is a high-performance bare-metal acceleration framework featuring an **asynchronous lock-free video stream engine** and a **virtualized quantum simulation accelerator core**. 

Engineered to extract maximum processing throughput from low-power edge computing devices (e.g., Intel N100 Mini PCs) up to High-End NVIDIA CUDA GPU platforms, this framework bypasses standard high-level runtime bottlenecks via low-level kernel-level optimizations.

---

## 🎯 Core Architectural Features

1. **Zero-Latency Video Stream**: Bypasses the inherent camera frame buffering lag of OpenCV's `CAP_DSHOW` and overcomes Python's GIL (Global Interpreter Lock) bottlenecks by managing raw frame slots asynchronously inside an isolated background worker thread.
2. **Quantum Virtualization Layer**: Maps hardware registers into virtualized quantum superposition states ($|0\rangle + |1\rangle$) and enforces quantum entanglement. This enables lightning-fast $0\text{ms}$ state collapse metrics for specialized statistical tracking and motion determination tasks.
3. **OS Kernel-Level Scheduling**: Intersects with Windows and POSIX process schedulers to dynamically elevate the runtime context to `HIGH_PRIORITY_CLASS` (or a `-20` Nice value), preventing CPU core throttling.
4. **C-Libraries Variable Binding**: Automates parallel thread topology binding across OpenMP, Intel MKL, OpenBLAS, and NumExpr infrastructures synchronized with physical core counts, coupled with proactive Garbage Collection (GC) throttling.

---

## 🚀 Installation

### 1. Local Development Mode (Recommended)
Clone the repository and install the package in editable mode within your Python environment:
```bash
pip install -e .
```
2. Hardware-Specific Acceleration Requirements
For NVIDIA CUDA / Tensor Core Infrastructures:

```Bash
pip install onnxruntime-gpu torch
```
For Intel / AMD OpenVINO Infrastructures:

```Bash
pip install openvino
```
💻 Quick Start & Usage
1. Initializing Asynchronous Video Stream & Hardware Speedup
```Python
import time
import cv2
import fasthardware

# [STEP 1] Supercharge the hardware environment 
# Target devices supported: "CPU", "GPU", or "QPU"
fasthardware.speedup(mode="ULTIMATE", device="GPU")

# [STEP 2] Instantiate the lock-free streaming pipeline
vs = fasthardware.FastVideoStream(src=0).start()
time.sleep(1.0)  # Grace period for stream stabilization

try:
    while True:
        # Fetch the absolute newest frame with 0ms overhead
        frame = vs.read()
        
        cv2.imshow("⚡ Fast Hardware Stream", frame)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break
finally:
    vs.stop()
    cv2.destroyAllWindows()
```
2. Harnessing the Quantum Virtualization Bus (QuantumStateRegister)
```Python
import fasthardware

# Initialize the virtual Quantum Processing Unit (QPU)
fasthardware.speedup(mode="DEFAULT", device="QPU")
q_bus = fasthardware.get_quantum_core()

# Force the physical bit into a superposition state and entangle them
q_bus.apply_hadamard(target_qubit=0)
q_bus.apply_cnot(control_qubit=0, target_qubit=1)

# Collapse the complex probability tensors into a single definitive signal in 0ms
measured_signal = q_bus.collapse_and_measure()
print(f"⚛️ Quantum State Collapsed: {measured_signal}")
```
🛡️ Memory Reclamation & Manual Cleanup
To ensure uninterrupted execution loops, this framework proactively suppresses standard automatic Python Garbage Collection (gc). To clear the process working set memory footprint during low-load intervals, explicitly invoke:

```Python
fasthardware.manual_sweep()
```
📄 License
This project is licensed under the MIT License. Developed and maintained by WoonGyo Choi.
