Metadata-Version: 2.5
Name: aleshaq-sdk
Version: 0.1.0
Summary: Aleshnatt Quantum SDK: Comprehensive toolkit for quantum primitives, error correction, networking, and protocols.
Project-URL: Homepage, https://github.com/naufaziy/aleshaq
Project-URL: Repository, https://github.com/naufaziy/aleshaq
Author: Naufal Ziyaadaturrahman
License: MIT License
        
        Copyright (c) 2026 Naufal Ziyaadaturrahman
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: bb84,qec,qiskit,qkd,quantum,quantum-computing,quantum-cryptography,quantum-error-correction,quantum-information,quantum-networking,teleportation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.9
Requires-Dist: numpy
Requires-Dist: qiskit>=2.0
Provides-Extra: all
Requires-Dist: qbraid>=0.6.0; extra == 'all'
Requires-Dist: qiskit-aer; extra == 'all'
Requires-Dist: qiskit-ibm-runtime>=0.18.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: qiskit-aer; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: ibm
Requires-Dist: qiskit-ibm-runtime>=0.18.0; extra == 'ibm'
Provides-Extra: qbraid
Requires-Dist: qbraid>=0.6.0; extra == 'qbraid'
Provides-Extra: sim
Requires-Dist: qiskit-aer; extra == 'sim'
Description-Content-Type: text/markdown

# Aleshnatt Quantum SDK (`aleshaq-sdk`)

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Python Version](https://img.shields.io/badge/python-3.9%2B-blue)](https://www.python.org/downloads/)
[![Qiskit Compatibility](https://img.shields.io/badge/Qiskit-2.0%2B-6929C4.svg)](https://qiskit.org/)

**Aleshnatt Quantum SDK** (`aleshaq`) is a modular, production-grade Python toolkit for quantum computing, quantum error correction, quantum networking, and quantum cryptographic protocols. Built natively on Qiskit.

---

## 📦 Architecture & Packages

`aleshaq` unites the full quantum information stack into four cohesive modules:

```text
┌────────────────────────────────────────────────────────────────────────┐
│                        aleshaq-sdk (Top-Level)                         │
├────────────────────────────────────────────────────────────────────────┤
│ 1. aleshaq.primitives  │ Bell/GHZ/W States, QFT, QPE, Oracles, Backend │
├────────────────────────┼───────────────────────────────────────────────┤
│ 2. aleshaq.qec         │ Stabilizers (Shor, Steane), Decoders, Noise   │
├────────────────────────┼───────────────────────────────────────────────┤
│ 3. aleshaq.networking  │ Nodes, Quantum Channels, Swapping, Routing    │
├────────────────────────┼───────────────────────────────────────────────┤
│ 4. aleshaq.protocols   │ QKD (BB84, B92, E91, Decoy), Teleportation    │
└────────────────────────────────────────────────────────────────────────┘
```

---

## 🚀 Installation

```bash
# Base SDK installation:
pip install aleshaq-sdk

# With local simulation (Qiskit Aer):
pip install "aleshaq-sdk[sim]"

# With hardware providers (IBM Quantum Runtime & qBraid):
pip install "aleshaq-sdk[ibm]"
pip install "aleshaq-sdk[qbraid]"

# Complete installation with all dependencies:
pip install "aleshaq-sdk[all]"
```

---

## ⚡ Quick Start

### 1. Quantum Primitives (`aleshaq.primitives`)

```python
from aleshaq.primitives import bell_state, ghz_state, qft, phase_estimation

# Prepare a Bell state (|Φ⁺⟩) circuit
qc_bell = bell_state(0)
print(qc_bell)

# Generate a 3-qubit Quantum Fourier Transform circuit
qc_qft = qft(n_qubits=3, do_swaps=True)
print(qc_qft)
```

### 2. Quantum Error Correction (`aleshaq.qec`)

```python
from aleshaq.qec import SteaneCode, LookupTableDecoder, extract_syndrome

# Instantiate the 7-qubit Steane [[7,1,3]] code
code = SteaneCode()
encoder_circuit = code.encode()

# Extract stabilizer syndromes
syndrome_qc = code.syndrome_circuit()
```

### 3. Quantum Networking (`aleshaq.networking`)

```python
from aleshaq.networking import QuantumNetwork, Node
from aleshaq.networking.protocols import EntanglementDistribution

# Build a 3-node quantum network
net = QuantumNetwork("Aleshnatt-Network")
alice = Node("Alice", qubit_capacity=4)
repeater = Node("Repeater", qubit_capacity=4)
bob = Node("Bob", qubit_capacity=4)

net.add_node(alice)
net.add_node(repeater)
net.add_node(bob)
net.connect(alice, repeater, length_km=10.0)
net.connect(repeater, bob, length_km=10.0)

# Distribute entanglement over multi-hop routing
dist = EntanglementDistribution(net)
res = dist.distribute("Alice", "Bob")
print(f"End-to-end fidelity: {res.fidelity:.4f}")
```

### 4. Quantum Protocols & Cryptography (`aleshaq.protocols`)

```python
from aleshaq.protocols import BB84, DecoyStateBB84, Teleportation

# Run BB84 QKD Simulation
bb84 = BB84(n_bits=500, eavesdropper_present=False, seed=42)
result = bb84.run()
print(f"Sifted key length: {len(result.sifted_key_alice)}, QBER: {result.qber}")

# Run Decoy-State BB84 with Photon-Number Splitting (PNS) detection
decoy = DecoyStateBB84(n_rounds=1000, mu=0.5, nu=0.1, simulate_pns_attack=False)
decoy_res = decoy.run()
print(f"PNS Attack Detected: {decoy_res.pns_attack_detected}")
```

---

## 🛠️ Development & Testing

```bash
# Clone the repository
git clone https://github.com/naufaziy/aleshaq.git
cd aleshaq

# Install in editable mode with development tools
pip install -e ".[dev]"

# Run tests
pytest
```

---

## 📄 License

This project is licensed under the [MIT License](LICENSE).
