Full-stack quantum computing SDK
Project description
AbirQu Quantum SDK v1.0.0
Created by Abir Maheshwari | abhirsxn@gmail.com | aqdi.world | 🇮🇳 Indian Quantum Mission Support Enabled
What is AbirQu?
AbirQu is a comprehensive, hardware-independent quantum computing SDK. It provides a single unified API across quantum computing, quantum communication, quantum error correction, hardware control, and a full visual development environment — all implemented in pure NumPy with no vendor lock-in.
The Vision
The quantum computing landscape is fragmented. IBM has Qiskit, Google has Cirq, Amazon has Braket, IonQ has its own SDK — each with its own API, circuit format, transpiler, and way of doing things. A researcher who wants to benchmark an algorithm across IBM and IonQ must learn two entirely different toolchains. A startup building quantum software must maintain adapters for every provider. A student must choose one ecosystem before understanding which fits their problem.
AbirQu eliminates this fragmentation. One function — QuantumRun — does sampling, estimation, error mitigation, and machine learning in a single call. One circuit library works across all hardware backends. One transpiler pipeline decomposes gates for any target architecture. One Quantum OS schedules jobs, manages resources, and estimates costs across providers.
What Makes AbirQu Different
AbirQu focuses on breadth and hardware independence. Qiskit/Cirq/Braket focus on production hardware execution. These are different goals — the table below compares scope, not quality.
| Capability | AbirQu | Qiskit | Cirq | Braket |
|---|---|---|---|---|
| Primary goal | Learning + breadth | Hardware execution | Hardware execution | Multi-hardware access |
| Hardware backends | 12 (2 verified) | 5 (all verified) | 3 (all verified) | 6 (all verified) |
| Quantum communication | 7 protocols | N/A (different scope) | N/A (different scope) | N/A (different scope) |
| Fault-tolerant QEC | Surface/Color/Stabilizer | Basic | N/A | N/A |
| Hardware calibration | Full (T1/T2/RB/Tomography) | Basic | N/A | N/A |
| Domain modules | 6 (Chemistry/OSINT/Crypto/Space/QPINN/Agentic) | Via plugins (qiskit-nature etc.) | Via plugins | N/A |
| Simulation engines | 5 (GPU/Clifford/MPS/MonteCarlo/NumPy) | 3 | 2 | N/A |
| Pure NumPy (no vendor SDK required) | Yes | No (needs qiskit) | No (needs cirq) | No (needs braket) |
| Real hardware validation | IBM backend wired | Yes | Yes | Yes |
| Production-grade algorithms | Simplified demos | Yes | Yes | Yes |
Key tradeoff: AbirQu has broader scope (communication, QEC, domain modules, IDE) but less depth (simplified implementations, IBM backend not yet validated). Qiskit/Cirq/Braket focus on production-grade, validated hardware execution — they do fewer things but do them well. The domains where competitors show "N/A" are areas AbirQu chose to cover that other SDKs don't attempt.
Benchmarks
Real, reproducible benchmarks measured on local NumPy simulator (Intel, 64 threads):
| Circuit | Qubits | Gates | Depth | Time |
|---|---|---|---|---|
| QFT | 8 | 96 | 42 | 43 ms |
| QFT | 12 | 216 | 66 | 1.4 s |
| Random | 10q × 20d | 300 | — | 775 ms |
| VQE | 8q × 3 reps | 69 | — | 50 ms |
| GHZ | 10 | 9 | 10 | 10 ms |
| Full pipeline | 10 | 29 | — | 86 ms |
Run benchmarks yourself: python benchmarks/run_benchmarks.py
Hardware Execution
IBM Quantum backend is wired (real qiskit-ibm-runtime integration):
# Dry run (no credentials needed)
python examples/real_hardware_execution.py --dry-run
# Real hardware
export IBM_QUANTUM_TOKEN="your_token"
python examples/real_hardware_execution.py --backend ibm_brisbane
Created By
Abir Maheshwari at Artificial Quantum Dyson Intelligence (AQDI) (aqdi.world), built as part of the Indian Quantum Mission to provide a hardware-independent quantum SDK that runs on Intel, AMD, Qualcomm, and MediaTek processors.
Designed for IISc, TIFR, IITs, DRDO, ISRO, and global quantum research labs.
Architecture Overview
See the full architecture diagram: assets/architecture.md
Quick Summary: AbirQu is organized into 7 layers:
- Quantum IDE/GUI — Visual circuit editor, Bloch sphere, code editor, themes
- Hardware Control — Calibration, characterization, noise profiling, cloud management
- Quantum Error Correction — Stabilizer/Surface/Color codes, 5 decoders, magic state distillation
- Quantum Communication — BB84, E91, CV-QKD, DI-QKD, satellite, repeaters, network
- Novel Contributions — Noise-adaptive compiler, SPAE, circuit cutting, hybrid simulator
- 12 Hardware Backends — IBM, IonQ, Rigetti, Quantinuum, AWS, Azure, Google, Pasqal, OQC, QuEra, D-Wave, SpinQ
- 5 Simulation Engines — GPU, Clifford, MPS, Monte Carlo, NumPy
What's Inside AbirQu
AbirQu brings together quantum computing algorithms from multiple domains into a single SDK with a unified API:
| Module | What It Does | Key Capabilities |
|---|---|---|
| Quantum Chemistry | Molecular Hamiltonian mapping | Jordan-Wigner, Bravyi-Kitaev, Parity mappers · PySCF/OpenFermion hooks · Matchgate state tomography |
| OSINT & Intelligence | Graph optimization problems | 6 graph problems → Ising/QUBO (Max-Cut, MIS, MVC, Coloring, Community, Anomaly) · QAOA circuit generation · Graph analytics |
| Cryptanalysis & PQC | Quantum algorithms for cryptography | Shor factoring circuit · Grover oracle synthesis · Kyber-512/768/1024 parameter generation · Dilithium-2/3/5 sampling |
| Space & Aerospace | Quantum linear system solvers | HHL algorithm · 2D CFD diffusion solver · Structural stress solver |
| Q-PINN | Quantum PDE solvers | Parameterized quantum circuits for diffusion and Navier-Stokes equations |
| Agentic Orchestration | Task scheduling and execution | Agent task orchestrator · Batch execution · Multi-GPU simulation |
| Novel Contributions | Research algorithms | Noise-adaptive compiler · SPAE for QNLP · Entanglement-aware circuit cutting · Hybrid MPS-Clifford simulator |
All modules use pure NumPy with OpenBLAS DYNAMIC_ARCH — runs on Intel, AMD, Qualcomm, MediaTek, and Apple Silicon without recompilation.
The Problem AbirQu Solves
The quantum computing landscape today is fragmented. IBM has Qiskit, Google has Cirq, Amazon has Braket, IonQ has its own SDK — each with its own API, its own circuit format, its own transpiler, and its own way of doing things. A researcher who wants to benchmark an algorithm across IBM and IonQ must learn two entirely different toolchains. A startup building quantum software must maintain adapters for every provider. A student must choose one ecosystem before understanding which fits their problem.
AbirQu eliminates this fragmentation. One function — QuantumRun — does sampling, estimation, error mitigation, and machine learning in a single call. One circuit library works across all 12 hardware backends. One transpiler pipeline decomposes gates for any target architecture. One Quantum OS schedules jobs, manages resources, and estimates costs across providers.
What Makes AbirQu Different
AbirQu's main differentiator is scope and hardware independence — it brings together quantum algorithms from multiple domains into a single SDK with a unified API, running on any CPU/GPU via pure NumPy.
Core Infrastructure:
- Unified QuantumRun: One function does sampling + estimation + mitigation + ML
- Built-in QNN: Quantum neural network with parameter-shift gradients
- Noise Fingerprint: Spectral visualization of noise models
- 12 Hardware Backends: IBM, D-Wave, SpinQ, Pasqal, QuEra, IonQ, Rigetti, Quantinuum, AWS, Azure, Google, OQC
- Transpiler Pipeline: Target-aware gate decomposition for each backend
- Hardware Calibration: T1/T2 coherence, gate fidelities, readout errors, crosstalk characterization
- Device Characterization: Randomized benchmarking, interleaved RB, process tomography, SPAM analysis
- Hardware-Aware Compiler: Connectivity-aware routing, native gate decomposition, noise-optimized compilation
- Cloud Manager: Unified credential management for 11 quantum cloud providers
- Quantum IDE/GUI: Visual circuit editor, Bloch sphere, state visualizer, code editor with syntax highlighting
- Quantum OS: Job scheduling, resource management, virtual QPU, cost estimation
- 5 Simulation Backends: GPU, Clifford, MPS tensor network, Monte Carlo, NumPy
Domain Modules (what most SDKs don't include):
- Quantum Chemistry: JW/BK/Parity fermion-to-qubit mappers, PySCF hooks, Matchgate tomography
- OSINT & Intelligence: Graph-to-Ising compilers for 6 optimization problems, QAOA circuits, graph analytics
- Cryptanalysis & PQC: Shor factoring circuit, Grover oracles, Kyber/Dilithium parameter generation
- Space & Aerospace: HHL linear system solver, CFD solver, structural stress solver
- Q-PINN: Quantum PDE solvers for diffusion and Navier-Stokes equations
- Agentic Orchestration: Task orchestration, batch execution, multi-GPU simulation
- Quantum Communication: BB84, E91 (CHSH S=2√2), CV-QKD, device-independent QKD, satellite QKD, repeater chains, quantum network
- Fault-Tolerant QEC: Stabilizer codes (Shor, Steane), surface codes (distance 3/5/7), color codes, 5 decoders, magic state distillation
- Full Quantum IDE: Visual circuit editor, Bloch sphere, state vector/measurement panels, hardware panel, code editor, circuit library, dark/light themes
Hardware Independence:
- Pure NumPy/OpenBLAS — runs on Intel, AMD, Qualcomm, MediaTek, Apple Silicon
- GPU acceleration via CuPy with automatic CPU fallback
- No vendor lock-in, no recompilation needed
Who Is AbirQu For?
- Quantum Researchers who want a single SDK with algorithms from multiple quantum domains.
- Quantum Software Developers who need a unified API across different hardware backends.
- Students and Educators who want to learn quantum computing with a hardware-independent SDK.
- Enterprise Teams who want post-quantum cryptography and job scheduling in their quantum stack.
- Pharmaceutical Researchers exploring quantum chemistry simulation with fermion-to-qubit mappers.
- Defense & Intelligence Analysts working on graph optimization problems.
- Aerospace Engineers exploring quantum linear system solvers for CFD and structural analysis.
- Cybersecurity Teams evaluating post-quantum cryptographic algorithms.
The Vision
AbirQu aims to make quantum computing algorithms accessible through a single, hardware-independent SDK. It provides simulation backends (GPU, Clifford, MPS, Monte Carlo, NumPy) and hardware execution across 12 quantum computing backends.
Note on qubit capacity: MPS tensor networks can theoretically represent states with many qubits if entanglement is limited, but actual simulation capability depends on circuit entanglement and bond dimension, not just qubit count.
With modules for quantum chemistry, intelligence analytics, post-quantum cryptography, space applications, quantum PDE solvers, agentic orchestration, quantum communication (7 protocols), fault-tolerant QEC (stabilizer/surface/color codes), hardware calibration & control, and a full quantum IDE, AbirQu is a comprehensive quantum SDK.
v1.0.0 — Full-Stack Quantum SDK — 6 domain modules, 12 hardware backends, 7 quantum communication protocols, fault-tolerant QEC with 5 decoders, hardware calibration & characterization, noise-aware compilation, full quantum IDE/GUI, 412 tests. Runs on Intel/AMD/Qualcomm/MediaTek via pure NumPy.
Status & Badges
🇮🇳 A Comprehensive Quantum Computing SDK — Built in India, for the World 🌍
AbirQu is a comprehensive, hardware-independent quantum SDK with 6 domain modules, 12 hardware backends, and pure NumPy implementation that runs on Intel, AMD, Qualcomm, and MediaTek processors. Built in India as part of the Indian Quantum Mission, designed for global adoption.
Supported by: Indian Quantum Mission | Built for IISc, TIFR, IITs, DRDO, ISRO | Artificial Quantum Dyson Intelligence
Features
Core — Unified Execution
| Feature | Module | Description |
|---|---|---|
| QuantumRun | abirqu.primitives |
ONE function does sampling + estimation + mitigation + ML. No need for separate Sampler/Estimator/QNN classes. |
| Sampler | abirqu.primitives |
Quasi-distribution with entropy, effective shot count, purity metrics |
| Estimator | abirqu.primitives |
Compute expectation values <ψ |
| QNN | abirqu.primitives |
Built-in quantum neural network with parameter-shift gradients — no external libs needed |
| MitigationResult | abirqu.primitives |
Denoised probabilities with TV distance and confusion matrix |
Circuit Library
| Feature | Module | Description |
|---|---|---|
| RealAmplitudes | abirqu.library |
RY + CNOT parameterized ansatz |
| EfficientSU2 | abirqu.library |
RY + RZ + CNOT — more expressive than RealAmplitudes |
| N-local | abirqu.library |
Configurable rotation gates + entanglement ("full", "linear", "circular", "sca", "pairwise") |
| QAOA Circuit | abirqu.library |
QAOA ansatz with automatic mixer Hamiltonian |
| VQE Hardware-Efficient | abirqu.library |
EfficientSU2-based VQE ansatz |
| VQE UCCSD | abirqu.library |
Unitary Coupled Cluster Singles and Doubles |
| Angle Encoding | abirqu.library |
1 qubit per feature, rotation-based |
| Amplitude Encoding | abirqu.library |
log2(n) qubits for n features, tree-based |
| ZZFeatureMap | abirqu.library |
Data-dependent entanglement for quantum kernels |
| IQP Encoding | abirqu.library |
Instantaneous Quantum Polynomial — useful for quantum advantage |
| GHZ State | abirqu.library |
( |
| W State | abirqu.library |
Equal superposition of single-excitation states |
| QFT | abirqu.library |
Quantum Fourier Transform |
| Grover Search | abirqu.library |
Full Grover circuit with oracle + diffusion |
| Bernstein-Vazirani | abirqu.library |
BV algorithm circuit |
| Random Circuit | abirqu.library |
Random benchmark circuits with configurable seed |
Visualization
| Feature | Module | Description |
|---|---|---|
| CircuitDrawer | abirqu.visualization |
text, ASCII, SVG, HTML output with gate coloring |
| BlochSphere | abirqu.visualization |
Multi-qubit partial trace, 3D projection, ASCII and SVG |
| histogram_text/svg | abirqu.visualization |
Measurement result bar charts |
| stateplot_svg | abirqu.visualization |
Phase-colored amplitude bars (city plot) |
| probability_svg | abirqu.visualization |
Probability distribution bars |
| gate_map_svg | abirqu.visualization |
Coupling map / hardware topology visualization |
| error_map_svg | abirqu.visualization |
Per-qubit error rate heatmap |
| Noise Fingerprint | abirqu.visualization |
Unique — spectral visualization of noise models (no other SDK has this) |
| Circuit Fingerprint | abirqu.visualization |
Unique — barcode-like circuit structure visualization |
Noise Toolkit
| Feature | Module | Description |
|---|---|---|
| ZeroNoiseExtrapolator | abirqu.noise_toolkit |
ZNE with Richardson, linear, exponential extrapolation |
| Gate Folding ZNE | abirqu.noise_toolkit |
G→GG†G identity insertion for precise noise amplification |
| ZNE Pipeline | abirqu.noise_toolkit |
Complete fold→execute→extrapolate pipeline |
| ReadoutMitigator | abirqu.noise_toolkit |
Confusion matrix inversion for readout errors |
| Enhanced Readout Mitigator | abirqu.noise_toolkit |
Tikhonov regularization, per-qubit correction, bootstrap CI |
| M3Mitigator | abirqu.noise_toolkit |
Matrix-free Measurement Mitigation — scalable to larger systems |
| PECCorrector | abirqu.noise_toolkit |
Probabilistic Error Cancellation |
| Calibration Circuits | abirqu.noise_toolkit |
Auto-generate calibration circuits for confusion matrix |
| ZNE Circuit Scaling | abirqu.noise_toolkit |
Scale noise in circuits by inserting identity pairs |
Addons — Algorithm Building Blocks
| Feature | Module | Description |
|---|---|---|
| MultiProductFormula | abirqu.addons |
Higher-order Hamiltonian simulation via multiple product formulas |
| TrotterSuzuki | abirqu.addons |
1st/2nd order Trotter-Suzuki decomposition |
| CircuitCutter | abirqu.addons |
Decompose large circuits for distributed quantum computing |
| AQCTensor | abirqu.addons |
Approximate Quantum Compilation via tensor network methods |
| OperatorBackpropagation | abirqu.addons |
Propagate operators backward for measurement reduction |
| SQDCorrector | abirqu.addons |
Sample-based Quantum Diagonalization for chemistry |
Scalable Unitary Synthesis
| Feature | Module | Description |
|---|---|---|
| synthesize_unitary | abirqu.unitary_synthesis |
Variational quantum compilation — compile any unitary matrix into a hardware-efficient circuit |
| ScalableUnitarySynthesizer | abirqu.unitary_synthesis |
Layer-wise compilation for large systems (10+ qubits) |
| Synthesis Verification | abirqu.unitary_synthesis |
Compute fidelity between target unitary and synthesized circuit |
Automated Adaptive Error Mitigation
| Feature | Module | Description |
|---|---|---|
| AdaptiveErrorMitigator | abirqu.adaptive_mitigation |
Auto-profiles hardware noise, selects best mitigation strategies — zero manual config |
| NoiseProfiler | abirqu.adaptive_mitigation |
Auto-detect noise type from calibration data or hardware characteristics |
| DriftMonitor | abirqu.adaptive_mitigation |
Track calibration drift over time, alert on significant changes |
| StrategySelector | abirqu.adaptive_mitigation |
Dynamic strategy selection based on real-time noise profile |
Pulse-Level Translation
| Feature | Module | Description |
|---|---|---|
| AutomatedPulseEngine | abirqu.pulse_translator |
Translate gate-level circuits to hardware-native pulse schedules |
| PulseTranslator | abirqu.pulse_translator |
Gate-to-pulse mapping for superconducting, trapped-ion, neutral-atom |
| PulseScheduler | abirqu.pulse_translator |
Crosstalk-aware pulse scheduling with parallel execution |
| PulseOptimizer | abirqu.pulse_translator |
DRAG pulse optimization, amplitude calibration, waveform shaping |
Dynamic Circuits
| Feature | Module | Description |
|---|---|---|
| DynamicCircuitSimulator | abirqu.dynamic_circuit |
Mid-circuit measurement, classical feedback, conditional gates |
| ForLoop / WhileLoop | abirqu.dynamic_circuit |
Classical control flow within quantum circuits |
| StreamingCircuitEngine | abirqu.dynamic_circuit |
Fragment-based execution for streaming / real-time circuits |
| VQEParameterPrefetcher | abirqu.dynamic_circuit |
Prefetch next VQE iteration while current runs on hardware |
Novel Contributions (v0.4.0) — Research Algorithms
These are novel algorithms developed specifically for AbirQu, adding capabilities not found in any other quantum SDK. Each has been tested and benchmarked.
1. Noise-Adaptive Circuit Compiler (abirqu.optimize.noise_adaptive)
A 4-pass compiler that optimizes circuits for specific hardware noise profiles:
| Pass | What It Does | Innovation |
|---|---|---|
| Pass 1: Matroid Partitioning | Maps qubits to physical locations | Weights partitions by qubit noise — low-noise qubits get priority |
| Pass 2: CNOT Reordering | Reorders two-qubit gates | Minimizes total noise cost across all CNOT operations |
| Pass 3: Gate Elimination | Removes redundant gates | Identity detection and commutation-based removal |
| Pass 4: Fidelity Estimation | Estimates output fidelity | Multiplicative model across all gate errors |
Benchmark Results:
- 36% gate reduction on random circuits
- 68% fidelity improvement on biased-noise hardware
- Zero manual configuration — auto-detects noise profile from calibration data
2. SPAE: Stochastic-Phase Amplitude Encoding (abirqu.qnlp.spae)
A noise-native encoding for quantum NLP that bypasses precision requirements:
Text → Phonemes → Probability Distribution → Stochastic Bitstream → Quantum Circuit
Key Innovation: Uses only Clifford operations (X + CNOT gates), no floating-point rotation gates. This means:
- Immune to rotation gate errors
- Works on noisy hardware without error mitigation
- Scales to large vocabularies
3. Entanglement-Aware Circuit Cutting (abirqu.entanglement_cutting)
Splits large circuits into smaller subcircuits for distributed execution:
- Bond dimension analysis — estimates entanglement between qubit groups
- Cut point selection — finds minimum-entanglement boundaries
- Communication minimization — reduces classical bits needed to reconstruct results
Use case: Execute 100+ qubit circuits on 50-qubit hardware by cutting at optimal points.
4. Hybrid MPS-Clifford Simulator (abirqu.simulation.hybrid)
Dynamically switches between simulation methods based on circuit structure:
| Circuit Region | Simulator Used | Complexity |
|---|---|---|
| Clifford gates | Clifford Tableau | O(n²) per gate |
| Non-Clifford gates | MPS Tensor Network | O(n·χ²) per gate |
| Transition | Dynamic switch | Automatic |
Result: O(n²) per Clifford gate instead of O(n·χ²), enabling simulation of circuits that would be impossible with either method alone.
Test Results: All 11/11 tests pass (6 hybrid simulator tests + 5 novel contribution tests).
12 Hardware Backends
| Backend | Type | Status | Features |
|---|---|---|---|
| IBM Quantum | Superconducting | ⚠️ SDK-wired | qiskit-ibm-runtime adapter |
| AWS Braket | Multi-hardware | ⚠️ SDK-wired | AWS Braket adapter |
| Azure Quantum | Multi-hardware | ⚠️ SDK-wired | Azure provider adapter |
| Google Quantum | Superconducting | ⚠️ SDK-wired | Cirq-backed adapter |
| IonQ | Trapped Ion | ⚠️ SDK-wired | IonQ adapter |
| Rigetti | Superconducting | ⚠️ SDK-wired | SDK-bridged adapter |
| Quantinuum | Trapped Ion | ⚠️ SDK-wired | SDK-bridged adapter |
| Pasqal | Neutral Atom | ⚠️ SDK-wired | Rydberg physics noise models |
| OQC | Superconducting | ⚠️ SDK-wired | SDK-bridged adapter |
| QuEra | Neutral Atom | ⚠️ SDK-wired | Aquila backend adapter |
| D-Wave | Quantum Annealer | ✅ Verified | QUBO builder, simulated annealing, hybrid solver, topology loaders |
| SpinQ | Trapped Ion | ✅ Verified | SQaaS REST API, native gate transpiler, calibration data |
Note: "SDK-wired" means adapter code exists that calls the vendor's own SDK. These have NOT been tested against real quantum hardware. Only D-Wave and SpinQ have been verified against simulated/real environments.
Hardware Calibration & Control (v1.0.0)
Full-stack hardware characterization and noise-aware compilation:
| Component | What It Measures | Key Metrics |
|---|---|---|
| T1 Calibration | Energy relaxation time | Per-qubit T1 (μs), average across device |
| T2 Calibration | Dephasing time (Ramsey) | Per-qubit T2, T2 with echo |
| Gate Error Rates | Single & two-qubit gate fidelity | SX error, CNOT error, angle error |
| Readout Calibration | Measurement assignment errors | P(0 |
| Crosstalk Matrix | Nearest-neighbor error correlation | Per-pair crosstalk rates |
| Randomized Benchmarking | Average error per gate | EPG, fidelity, fit quality |
| Interleaved RB | Specific gate characterization | Per-gate fidelity (e.g., CNOT) |
| Process Tomography | Full process matrix χ | Process fidelity, entangling power |
| SPAM Analysis | State preparation & measurement errors | Per-qubit SPA errors |
| Noise Profiler | Track drift over time | Drift magnitude, trend detection |
Hardware-Aware Compiler:
- Connectivity mapping — routes SWAP operations for limited connectivity
- Native gate decomposition — converts to hardware-native gate set
- Noise optimization — prioritizes low-noise qubit paths
- Constraint validation — checks depth, CNOT count, fidelity limits
Cloud Manager: Unified credential management for 11 quantum cloud providers with auto-discovery from environment variables.
Quantum Error Correction (v0.7.0)
Production-grade QEC with multiple code families and decoders:
| Code Family | Codes | Parameters | Key Feature |
|---|---|---|---|
| Stabilizer | Repetition, BitFlip, PhaseFlip | [[n,1,d]] | Simple error correction |
| Shor Code | [[9,1,3]] | 9 physical, 1 logical | First QEC code |
| Steane Code | [[7,1,3]] | 7 physical, 1 logical | CSS code, transversal Clifford |
| Surface Code | Rotated, distance 3/5/7 | [[2d²-2d+1, 1, d]] | Threshold ~1% |
| Color Code | Triangular lattice | [[n, 1, d]] | Transversal Clifford group |
| LDPC | Parity-check matrix | Configurable | GPU-accelerated BP decoder |
5 Decoders:
| Decoder | Algorithm | Best For |
|---|---|---|
| Syndrome Lookup | Pre-computed table | Small codes (n ≤ 12) |
| Surface Code | MWPM-inspired | Surface codes |
| Belief Propagation | Iterative message passing | LDPC codes |
| MWPM | Minimum-weight perfect matching | General codes |
| GPU-Accelerated | Parallel BP | Large codes |
Magic State Distillation:
- 15-to-1 T-state distiller — produces high-fidelity T states
- 20-to-4 H-state distiller — produces Hadamard states
- T-gate injection — magic state teleportation for non-Clifford gates
Quantum Communication (v0.6.0)
7 quantum communication protocols with real physics:
| Protocol | Type | Key Feature |
|---|---|---|
| BB84 | QKD | First quantum key distribution |
| E91 | QKD | CHSH inequality S = 2√2 violation |
| CV-QKD | QKD | Gaussian modulation, continuous variables |
| DI-QKD | QKD | Device-independent, no trust in hardware |
| Satellite QKD | QKD | Free-space loss model, atmospheric effects |
| Repeater Chains | Networking | DEJMPS purification, entanglement swapping |
| Quantum Network | Networking | Star/ring/mesh topologies, routing |
Quantum OS
| Feature | Module | Description |
|---|---|---|
| QuantumScheduler | abirqu.quantum_os |
FIFO, priority, SJF, fair-share scheduling |
| JobQueue | abirqu.quantum_os |
SQLite-backed persistent job queue |
| ResourceManager | abirqu.quantum_os |
Qubit allocation, utilization tracking |
| VirtualQPU | abirqu.quantum_os |
Virtual quantum processing units |
| CostEstimator | abirqu.quantum_os |
Per-provider cost estimation |
| PreemptionManager | abirqu.quantum_os |
Job preemption for priority scheduling |
| ReservationSystem | abirqu.quantum_os |
Time-slot reservations |
| CircuitPartitioner | abirqu.quantum_os |
Split circuits for multi-device execution |
| VirtualEnvironment | abirqu.quantum_os |
Isolated execution environments |
| JobMonitor | abirqu.quantum_os |
Real-time job monitoring |
| TenantManager | abirqu.quantum_os |
Multi-tenant isolation |
| AccessController | abirqu.quantum_os |
RBAC for quantum resources |
Post-Quantum Security (AbirGuard)
| Feature | Module | Description |
|---|---|---|
| Kyber-768 KEM | abirqu.cloud.abir_guard |
Key encapsulation mechanism |
| Dilithium-2 | abirqu.cloud.abir_guard |
Lattice-based digital signatures |
| SPHINCS+-128f | abirqu.cloud.abir_guard |
Hash-based signatures (stateless) |
| BB84 QKD | abirqu.cloud.abir_guard |
Quantum Key Distribution protocol |
| Circuit Encryption | abirqu.cloud.abir_guard |
Encrypt circuits before sending to cloud |
Simulation Backends
| Backend | Module | Description |
|---|---|---|
| GPU Simulator | abirqu.simulation |
CuPy/NumPy statevector with GPU acceleration |
| Clifford Simulator | abirqu.simulation |
Stabilizer tableau for Clifford circuits |
| MPS Simulator | abirqu.simulation |
Matrix Product State / tensor network simulation |
| Monte Carlo Simulator | abirqu.simulation |
Quantum Jumps — stochastic pure-state trajectories, O(2^n) memory vs O(4^n) density matrix |
| NumPy Simulator | abirqu.numpy_sim |
Pure Python/NumPy statevector (portable fallback) |
Advanced Simulation Engines
| Feature | Module | Description |
|---|---|---|
| Monte Carlo Wavefunction | abirqu.simulation.monte_carlo |
Stochastic trajectory averaging for open quantum systems |
| Noise Channels | abirqu.simulation.monte_carlo |
Amplitude damping, phase damping, depolarizing, bit/phase flip, thermal relaxation |
| Time-Evolution ODE Solver | abirqu.simulation.ode_solver |
RK4/RK45/Euler integration of Schrödinger equation |
| Lindblad Master Equation | abirqu.simulation.ode_solver |
Open system simulation with jump operators and dissipation |
| Hamiltonian Builder | abirqu.simulation.ode_solver |
Build custom Hamiltonians: rotations, detuning, exchange, Ising, transverse field |
| Thermal State Solver | abirqu.simulation.ode_solver |
Gibbs states, von Neumann entropy, finite-temperature dynamics |
| Waveform Generator | abirqu.simulation.waveform |
Gaussian, square, Kaiser, derivative-Gaussian, arbitrary pulse shapes |
| DRAG Pulses | abirqu.simulation.waveform |
Derivative Removal by Adiabatic Gate — suppresses leakage to higher levels |
| Pulse Composer | abirqu.simulation.waveform |
Concatenation, parallel, stacking of waveform envelopes |
| Pulse Modulator | abirqu.simulation.waveform |
IQ modulation/demodulation onto carrier frequencies |
| Pulse Shape Library | abirqu.simulation.waveform |
Pre-built π, √X, √Y, CZ, CNOT cross-resonance pulse shapes |
Parameterized Circuit Caching
| Feature | Module | Description |
|---|---|---|
| DAG Circuit | abirqu.dag_circuit |
Compile circuit structure once into a DAG, update parameters in O(k) |
| Dynamic Parameter Binding | abirqu.dag_circuit |
Update rotation angles without recompiling circuit structure |
| Parallel Layer Detection | abirqu.dag_circuit |
Identify gates that can execute simultaneously |
| DAG Executor | abirqu.dag_circuit |
Rapid parameter update → circuit conversion → execution loop |
| Parameter-Shift Gradient | abirqu.dag_circuit |
Compute analytic gradients via parameter shift rule |
Native Quantum Optimizers
| Optimizer | Module | Description |
|---|---|---|
| COBYLA | abirqu.quantum_optimizer |
Constrained optimization by linear approximation — gradient-free |
| SPSA | abirqu.quantum_optimizer |
Simultaneous Perturbation Stochastic Approximation — 2 evaluations/iteration |
| Adam | abirqu.quantum_optimizer |
Adaptive Moment Estimation — works well for noisy quantum objectives |
| Gradient Descent | abirqu.quantum_optimizer |
With momentum and bounds support |
| Nelder-Mead | abirqu.quantum_optimizer |
Simplex method via COBYLA with large initial step |
| VQE/QAOA Loops | abirqu.quantum_optimizer |
Pre-built optimize_vqe() and optimize_qaoa() with ansatz functions |
Transpiler Pipeline
| Feature | Module | Description |
|---|---|---|
| Target-Aware Decomposition | abirqu.transpiler |
Decompose to native gate sets for each backend |
| CouplingMap | abirqu.transpiler |
Hardware connectivity topology |
| RoutingPass | abirqu.transpiler |
SWAP insertion for non-adjacent qubits |
| SchedulingPass | abirqu.transpiler |
ASAP gate scheduling |
| FidelityEstimator | abirqu.transpiler |
Estimate circuit fidelity on target hardware |
Interchange Formats
| Format | Direction | Module |
|---|---|---|
| Qiskit | Import/Export | abirqu.formats.qiskit |
| Braket | Import/Export | abirqu.formats.braket |
| Cirq | Import/Export | abirqu.formats.cirq |
| IonQ JSON | Import/Export | abirqu.formats.ionq |
| Pytket | Import | abirqu.formats.pytket |
| Quil | Import/Export | abirqu.formats.quil |
| OpenQASM | Import/Export | abirqu.formats.qasm |
Language Bindings
| Language | Status | Notes |
|---|---|---|
| Python | ✅ Complete | Primary SDK, full feature set |
| Go | ⚠️ Stub | cgo bindings to Rust shared library |
| Java | ⚠️ Stub | JNA bindings to Rust shared library |
| .NET | ⚠️ Stub | P/Invoke bindings to Rust shared library |
| Swift | ⚠️ Stub | ctypes bindings to Rust shared library |
| Kotlin | ⚠️ Stub | JNA bindings to Rust shared library |
| WebAssembly | ❌ Planned | Not implemented |
Note: Non-Python bindings are stubs that call a Rust shared library (libabirqu_core.so). They have not been tested or verified.
Installation
Note: AbirQu is not yet published on PyPI. Install from source only.
git clone https://github.com/Abiress/abirqu.git
cd abirqu
pip install -e .
System Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.8+ | 3.10+ |
| NumPy | 1.20+ | 1.24+ |
| RAM | 4 GB | 16 GB+ |
| Disk | 100 MB | 500 MB |
| OS | Linux, macOS, Windows | Linux (best OpenBLAS support) |
Optional for GPU acceleration:
- CUDA 11.0+ with CuPy
- NVIDIA GPU with compute capability 3.5+
Install with Optional Features
# GPU acceleration (requires CUDA + CuPy)
pip install abirqu[gpu]
# Visualization (matplotlib, pillow)
pip install abirqu[visualization]
# All optional features
pip install abirqu[gpu,visualization]
# Development (pytest, black, mypy)
pip install abirqu[dev]
GPU Acceleration Setup
# Install CuPy for your CUDA version
pip install cupy-cuda11x # For CUDA 11.x
pip install cupy-cuda12x # For CUDA 12.x
# Verify GPU detection
python -c "import abirqu; print(abirqu.simulation.GPUSimulator().is_available)"
AbirQu automatically falls back to CPU (NumPy) when GPU is not available.
Verify Installation
import abirqu
print(f"AbirQu version: {abirqu.__version__}")
# Run a quick test
from abirqu import Circuit, H, CNOT
bell = Circuit(2)
bell.h(0)
bell.cnot(0, 1)
from abirqu.primitives import QuantumRun
result = QuantumRun(bell, shots=1000)
print(f"Bell state counts: {result.counts}")
# Expected: {'00': ~500, '11': ~500}
Provider API Keys (Optional — for Real Hardware)
Set environment variables or create a .env file:
# IBM Quantum
export IBM_QUANTUM_TOKEN="your_token_here"
# AWS Braket
export AWS_ACCESS_KEY_ID="your_key"
export AWS_SECRET_ACCESS_KEY="your_secret"
# Azure Quantum
export AZURE_QUANTUM_RESOURCE_ID="your_resource_id"
# IonQ
export IONQ_API_KEY="your_key"
# Google Quantum
export GOOGLE_CLOUD_PROJECT="your_project_id"
AbirQu auto-discovers credentials from environment variables via CloudManager.
IDE Setup
VS Code:
code --install-extension ms-python.python
code --install-extension ms-python.vscode-pylance
Jupyter Notebook:
pip install jupyter
jupyter notebook
# In a Jupyter cell
import abirqu
from abirqu import Circuit
from abirqu.primitives import QuantumRun
circuit = Circuit(2)
circuit.h(0)
circuit.cnot(0, 1)
circuit.measure([0, 1])
result = QuantumRun(circuit, shots=1000)
print(result.counts)
Quick Start
Basic Circuit
from abirqu import Circuit, H, CNOT
from abirqu.primitives import QuantumRun
# Create a Bell state
circuit = Circuit(2)
circuit.h(0)
circuit.cnot(0, 1)
circuit.measure([0, 1])
result = QuantumRun(circuit, shots=1000)
print(result.counts) # {'00': ~500, '11': ~500}
Grover's Algorithm
from abirqu import Circuit, H, X, CNOT, Measure
from abirqu.primitives import QuantumRun
import math
n = 3
circuit = Circuit(n)
# Initialize superposition
for i in range(n):
circuit.h(i)
# Oracle (mark |101>)
circuit.x(1)
circuit.cnot(0, 2)
circuit.cnot(1, 2)
circuit.x(1)
# Diffusion
for i in range(n):
circuit.h(i)
circuit.x(i)
circuit.cnot(0, 1)
circuit.cnot(1, 2)
for i in range(n):
circuit.x(i)
circuit.h(i)
circuit.measure(list(range(n)))
result = QuantumRun(circuit, shots=1000)
print(result.counts)
Quantum Chemistry
from abirqu.chemistry import MolecularData, JordanWignerMapper
# Create a simple H2 molecule representation
mol = MolecularData(
num_orbitals=2,
num_electrons=2,
h1=[[0, 0], [0, 0]],
h2=[[[0, 0], [0, 0]], [[0, 0], [0, 0]]],
nuclear_repulsion=0.5
)
# Map to qubit Hamiltonian using Jordan-Wigner
mapper = JordanWignerMapper(mol)
qubit_hamiltonian = mapper.map()
print(f"Qubit Hamiltonian terms: {len(qubit_hamiltonian.terms)}")
Quantum Communication
from abirqu.quantum_communication import BB84Protocol
# Run BB84 key exchange
bb84 = BB84Protocol(num_qubits=10)
result = bb84.run()
print(f"Key bits: {result.key_bits}")
print(f"QBER: {result.qber:.3f}")
200 Tutorials
AbirQu includes 200 tutorials covering quantum computing from basics to advanced applications:
| Category | Tutorials | Topics |
|---|---|---|
| Fundamentals | 1-10 | Superposition, entanglement, QFT, QPE, Grover, Shor, VQE |
| Algorithms | 11-20 | QAOA, HHL, quantum walk, amplitude estimation, QNN |
| Machine Learning | 21-30 | Quantum RL, GANs, PCA, clustering, anomaly detection |
| Chemistry & Info | 31-40 | Error mitigation, benchmarking, QRAM, molecular simulation |
| Advanced | 41-50 | Surface codes, fault-tolerant circuits, compilers, sensing |
| Expert | 51-100 | Spin chains, chaos, advanced optimization, QML |
| Cutting-Edge | 111-120 | Novel algorithms, research frontiers |
| Domain Apps | 121-150 | Medical, defense, finance, supply chain, agriculture |
| Industry | 151-170 | Manufacturing, retail, aerospace, telecom, energy |
| Business | 171-200 | R&D, IP, M&A, Web3, DevOps, ML Ops |
Full index: tutorials/INDEX.md
Beginner Guide: abirqu/docs/beginner_guide.md
Test Results
Platform: x86_64 | Python 3.14.4 | NumPy 2.4.4
OpenBLAS: DYNAMIC_ARCH (Haswell) — Intel/AMD compatible
CPU: 20 cores | 30.6 GB RAM
Total: 412 tests passing, 5 warnings
The tests verify that modules run without errors. They do NOT verify correctness against literature values or real hardware. For example:
- Chemistry tests verify mappers run, not that energies match exact diagonalization
- QEC tests verify encoding/decoding runs, not that error rates match theoretical thresholds
- Communication tests verify protocols run, not that key rates match theoretical bounds
Version History
| Version | Date | Key Additions |
|---|---|---|
| v0.1.0 | 2026-04 | Initial release — Rust simulator, density matrix, QEC, 12 hardware backends (IBM, D-Wave, SpinQ, IonQ, Rigetti, Quantinuum, Pasqal, OQC, QuEra, AWS, Azure, Google), SDK bindings (Python, Rust, Go, JavaScript, .NET, Swift, Kotlin, WebAssembly) |
| v0.2.0 | 2026-05 | Full-stack quantum OS — QuantumScheduler, JobQueue, ResourceManager, VirtualQPU, CostEstimator, Post-Quantum Security (Kyber/Dilithium/SPHINCS+), 3 simulation backends (GPU, Clifford, MPS), circuit library, visualization |
| v0.3.0 | 2026-06 | QuantumRun primitives (unified sampling + estimation + mitigation + ML), QNN with parameter-shift gradients, 6 production modules (Chemistry, OSINT, Crypto, Space, Q-PINN, Agentic), Scalable Unitary Synthesis, Adaptive Error Mitigation, Pulse-Level Translation, Dynamic Circuits, Circuit Fingerprint, Noise Fingerprint |
| v0.4.0 | 2026-07 | Novel contributions — Noise-Adaptive Circuit Compiler (4-pass noise-aware optimization), SPAE for QNLP (stochastic-phase amplitude encoding), Entanglement-Aware Circuit Cutting (bond dimension heuristics), Hybrid MPS-Clifford Simulator (dynamic switching between MPS and Clifford tableau) |
| v0.5.0 | 2026-07 | Pauli string optimizer, state tomography, randomized benchmarking, CircuitCompiler, CI/CD pipeline, 5 tutorials — 94 tests |
| v0.6.0 | 2026-07 | Quantum Communication — 7 protocols: BB84, E91 (CHSH S=2√2), CV-QKD, device-independent QKD, satellite QKD, entanglement repeater chains (DEJMPS), quantum network — 30 tests |
| v0.7.0 | 2026-07 | Fault-Tolerant QEC — Stabilizer codes (Shor [[9,1,3]], Steane [[7,1,3]]), rotated surface codes (distance 3/5/7), color codes, 5 decoders (syndrome, surface, BP, MWPM, GPU), magic state distillation (15-to-1), fault-tolerant compiler (Toffoli/Rz decomposition), transversal gate sets, LDPC codes — 83 tests |
| v0.8.0 | 2026-07 | Full Quantum IDE/GUI — Visual circuit editor (drag-and-drop), Bloch sphere (3D), state vector visualizer, measurement histograms, hardware management panel, job monitoring dashboard, circuit library (12 built-in algorithms), code editor with syntax highlighting, dark/light themes, REST + WebSocket backend server — 125 tests |
| v0.9.0 | 2026-07 | Quantum Communication (enhanced) — BB84, E91 (CHSH S=2√2), CV-QKD, device-independent QKD, satellite QKD, entanglement repeater chains (DEJMPS), quantum network — 124 tests total |
| v1.0.0 | 2026-07 | Full Stack + Hardware Control — Hardware calibration (T1/T2, gate fidelities, readout errors), device characterization (RB, interleaved RB, process tomography, SPAM), noise profiling with drift detection, hardware-aware compiler (connectivity mapping, native gate decomposition, SWAP routing), cloud manager (11 providers), hardware module — 412 tests total |
What's Missing
This section honestly lists what AbirQu does NOT have:
- No validated algorithms — implementations are simplified for learning, not publication-quality
- No real hardware execution — only D-Wave and SpinQ adapters are verified
- No PyPI package — install from source only
- No CI/CD pipeline — no automated testing on real hardware
- No peer review — no independent validation of results
- No production-grade QEC — simplified decoders, no fault-tolerant threshold analysis
- No production chemistry — simplified mappers, no VQE/VQD convergence validation
- No real cryptanalysis — simplified Shor/Grover, not cryptographically secure
- No WebAssembly — planned, not implemented
- Non-Python SDKs — stubs only, not tested
How This Compares
Use AbirQu if:
- You want to learn quantum computing concepts
- You need a single SDK for educational purposes
- You want to experiment with quantum algorithms in pure Python
- You're building a teaching curriculum
Don't use AbirQu if:
- You need production-grade quantum simulation (use Qiskit, Cirq, PennyLane)
- You need real hardware execution (use IBM Quantum, AWS Braket, Google Quantum)
- You need validated chemical simulations (use PySCF, OpenFermion)
- You need cryptographically secure PQC (use liboqs, pqcrypto)
- You need peer-reviewed algorithms for research
Support
- Beginner Guide: abirqu/docs/beginner_guide.md
- 200 Tutorials: tutorials/INDEX.md
- Documentation: DEPENDENCIES.md
- Contributions: CONTRIBUTING.md
- Security: SECURITY.md
- Roadmap: ROADMAP.md
Built with Python, NumPy, SciPy, Rust · Licensed under MIT 2026 Runs on Intel, AMD, Qualcomm, MediaTek, Apple Silicon — CPU and GPU · No vendor lock-in
© 2026 Abir Maheshwari — Artificial Quantum Dyson Intelligence, Biro Labs, Aquilldriver 🇮🇳 Made in India, for the World.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abirqu-1.0.0.tar.gz.
File metadata
- Download URL: abirqu-1.0.0.tar.gz
- Upload date:
- Size: 499.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13ddc959ec0e52c3dc0b8bdb59724ca4efd320cf03e34f71d545f8bc45620cb7
|
|
| MD5 |
fae3ab8836c9093ecd4e86147895d6cf
|
|
| BLAKE2b-256 |
dea4873a3cef11c77bd16fc4eafc824b0750bfaf3a3688ff528025a855e30810
|
File details
Details for the file abirqu-1.0.0-py3-none-any.whl.
File metadata
- Download URL: abirqu-1.0.0-py3-none-any.whl
- Upload date:
- Size: 552.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
802c6bd4b83a5381145044864933bab77c055af53861ad4c26e24819a776fbdc
|
|
| MD5 |
806ecd374a93e13cf0ba7343f4bdd1c3
|
|
| BLAKE2b-256 |
6223e91c5091e6488993e066f670f45ccbf596bceb52d8dcea760f8fcb487dd8
|