abirqu 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- abirqu-1.0.0/CONTRIBUTING.md +703 -0
- abirqu-1.0.0/LICENSE +21 -0
- abirqu-1.0.0/MANIFEST.in +7 -0
- abirqu-1.0.0/PKG-INFO +965 -0
- abirqu-1.0.0/README.md +884 -0
- abirqu-1.0.0/SECURITY.md +28 -0
- abirqu-1.0.0/abirqu/__init__.py +395 -0
- abirqu-1.0.0/abirqu/__main__.py +4 -0
- abirqu-1.0.0/abirqu/_deprecated.py +143 -0
- abirqu-1.0.0/abirqu/adaptive_mitigation.py +278 -0
- abirqu-1.0.0/abirqu/addons.py +352 -0
- abirqu-1.0.0/abirqu/agentic/__init__.py +701 -0
- abirqu-1.0.0/abirqu/agents.py +110 -0
- abirqu-1.0.0/abirqu/algorithms/__init__.py +147 -0
- abirqu-1.0.0/abirqu/algorithms/advanced.py +80 -0
- abirqu-1.0.0/abirqu/auto_scale.py +764 -0
- abirqu-1.0.0/abirqu/autonomous.py +101 -0
- abirqu-1.0.0/abirqu/backend.py +474 -0
- abirqu-1.0.0/abirqu/backends/__init__.py +30 -0
- abirqu-1.0.0/abirqu/backends/aws/__init__.py +197 -0
- abirqu-1.0.0/abirqu/backends/azure/__init__.py +235 -0
- abirqu-1.0.0/abirqu/backends/dwave/__init__.py +263 -0
- abirqu-1.0.0/abirqu/backends/google/__init__.py +119 -0
- abirqu-1.0.0/abirqu/backends/hardware.py +142 -0
- abirqu-1.0.0/abirqu/backends/ibm/__init__.py +231 -0
- abirqu-1.0.0/abirqu/backends/ibm/discovery.py +118 -0
- abirqu-1.0.0/abirqu/backends/ibm/jobs.py +139 -0
- abirqu-1.0.0/abirqu/backends/ibm/noise.py +100 -0
- abirqu-1.0.0/abirqu/backends/ibm/results.py +72 -0
- abirqu-1.0.0/abirqu/backends/ibm/transpiler.py +155 -0
- abirqu-1.0.0/abirqu/backends/ionq/__init__.py +200 -0
- abirqu-1.0.0/abirqu/backends/oqc/__init__.py +158 -0
- abirqu-1.0.0/abirqu/backends/pasqal/__init__.py +177 -0
- abirqu-1.0.0/abirqu/backends/pasqal/noise.py +95 -0
- abirqu-1.0.0/abirqu/backends/pasqal/transpiler.py +104 -0
- abirqu-1.0.0/abirqu/backends/quantinuum/__init__.py +142 -0
- abirqu-1.0.0/abirqu/backends/quera/__init__.py +234 -0
- abirqu-1.0.0/abirqu/backends/quera/transpiler.py +128 -0
- abirqu-1.0.0/abirqu/backends/rigetti/__init__.py +197 -0
- abirqu-1.0.0/abirqu/backends/spinq/__init__.py +244 -0
- abirqu-1.0.0/abirqu/backends/spinq/calibration.py +112 -0
- abirqu-1.0.0/abirqu/backends/spinq/noise.py +84 -0
- abirqu-1.0.0/abirqu/backends/spinq/topology.py +69 -0
- abirqu-1.0.0/abirqu/backends/spinq/transpiler.py +93 -0
- abirqu-1.0.0/abirqu/benchmark/randomized_benchmarking.py +430 -0
- abirqu-1.0.0/abirqu/bio.py +99 -0
- abirqu-1.0.0/abirqu/bio_impl.py +154 -0
- abirqu-1.0.0/abirqu/chemistry/__init__.py +39 -0
- abirqu-1.0.0/abirqu/chemistry/chemistry_integration.py +506 -0
- abirqu-1.0.0/abirqu/chemistry/fermion_mappers.py +711 -0
- abirqu-1.0.0/abirqu/chemistry/matchgate_shadows.py +340 -0
- abirqu-1.0.0/abirqu/circuit.py +532 -0
- abirqu-1.0.0/abirqu/cli/quantum_os_cli.py +183 -0
- abirqu-1.0.0/abirqu/cli.py +191 -0
- abirqu-1.0.0/abirqu/cloud/__init__.py +3 -0
- abirqu-1.0.0/abirqu/cloud/abir_guard.py +470 -0
- abirqu-1.0.0/abirqu/compatibility.py +136 -0
- abirqu-1.0.0/abirqu/compression.py +111 -0
- abirqu-1.0.0/abirqu/converters.py +432 -0
- abirqu-1.0.0/abirqu/crypto/__init__.py +945 -0
- abirqu-1.0.0/abirqu/dag_circuit.py +522 -0
- abirqu-1.0.0/abirqu/devtools.py +226 -0
- abirqu-1.0.0/abirqu/devtools_phase.py +151 -0
- abirqu-1.0.0/abirqu/dwave/__init__.py +38 -0
- abirqu-1.0.0/abirqu/dwave/converter.py +118 -0
- abirqu-1.0.0/abirqu/dwave/embedding.py +144 -0
- abirqu-1.0.0/abirqu/dwave/hybrid.py +171 -0
- abirqu-1.0.0/abirqu/dwave/noise_profile.py +121 -0
- abirqu-1.0.0/abirqu/dwave/qubo.py +204 -0
- abirqu-1.0.0/abirqu/dwave/schedule.py +155 -0
- abirqu-1.0.0/abirqu/dwave/topology.py +182 -0
- abirqu-1.0.0/abirqu/dynamic_circuit.py +170 -0
- abirqu-1.0.0/abirqu/dynamics.py +38 -0
- abirqu-1.0.0/abirqu/entanglement_cutting.py +287 -0
- abirqu-1.0.0/abirqu/exceptions.py +51 -0
- abirqu-1.0.0/abirqu/formats/__init__.py +36 -0
- abirqu-1.0.0/abirqu/formats/openqasm2.py +111 -0
- abirqu-1.0.0/abirqu/formats/openqasm3.py +126 -0
- abirqu-1.0.0/abirqu/formats/qasm_xt.py +152 -0
- abirqu-1.0.0/abirqu/formats/qir.py +197 -0
- abirqu-1.0.0/abirqu/formats/quil.py +89 -0
- abirqu-1.0.0/abirqu/gates.py +230 -0
- abirqu-1.0.0/abirqu/gui/__init__.py +37 -0
- abirqu-1.0.0/abirqu/gui/bloch_sphere.py +227 -0
- abirqu-1.0.0/abirqu/gui/circuit_editor.py +308 -0
- abirqu-1.0.0/abirqu/gui/circuit_library.py +336 -0
- abirqu-1.0.0/abirqu/gui/code_editor.py +317 -0
- abirqu-1.0.0/abirqu/gui/hardware_panel.py +223 -0
- abirqu-1.0.0/abirqu/gui/job_dashboard.py +175 -0
- abirqu-1.0.0/abirqu/gui/measurement_panel.py +162 -0
- abirqu-1.0.0/abirqu/gui/server.py +427 -0
- abirqu-1.0.0/abirqu/gui/state_visualizer.py +186 -0
- abirqu-1.0.0/abirqu/gui/theme.py +184 -0
- abirqu-1.0.0/abirqu/hardware/__init__.py +35 -0
- abirqu-1.0.0/abirqu/hardware/calibration.py +263 -0
- abirqu-1.0.0/abirqu/hardware/characterization.py +257 -0
- abirqu-1.0.0/abirqu/hardware/cloud_manager.py +260 -0
- abirqu-1.0.0/abirqu/hardware/hw_compiler.py +281 -0
- abirqu-1.0.0/abirqu/hardware/noise_profiler.py +233 -0
- abirqu-1.0.0/abirqu/high_energy.py +163 -0
- abirqu-1.0.0/abirqu/industry.py +643 -0
- abirqu-1.0.0/abirqu/internet.py +120 -0
- abirqu-1.0.0/abirqu/library/__init__.py +34 -0
- abirqu-1.0.0/abirqu/library/benchmarks.py +180 -0
- abirqu-1.0.0/abirqu/library/encoders.py +166 -0
- abirqu-1.0.0/abirqu/library/n_local.py +139 -0
- abirqu-1.0.0/abirqu/library/qaoa_ansatz.py +88 -0
- abirqu-1.0.0/abirqu/library/vqe_ansatz.py +72 -0
- abirqu-1.0.0/abirqu/logging_config.py +53 -0
- abirqu-1.0.0/abirqu/measurement.py +293 -0
- abirqu-1.0.0/abirqu/mitigation.py +63 -0
- abirqu-1.0.0/abirqu/network.py +137 -0
- abirqu-1.0.0/abirqu/neutral_atom.py +265 -0
- abirqu-1.0.0/abirqu/noise.py +378 -0
- abirqu-1.0.0/abirqu/noise_toolkit.py +792 -0
- abirqu-1.0.0/abirqu/numpy_sim.py +186 -0
- abirqu-1.0.0/abirqu/optimize/__init__.py +9 -0
- abirqu-1.0.0/abirqu/optimize/adaptive.py +143 -0
- abirqu-1.0.0/abirqu/optimize/circuit_compiler.py +469 -0
- abirqu-1.0.0/abirqu/optimize/circuit_simplifier.py +277 -0
- abirqu-1.0.0/abirqu/optimize/depth.py +116 -0
- abirqu-1.0.0/abirqu/optimize/noise_adaptive.py +583 -0
- abirqu-1.0.0/abirqu/optimize/peephole.py +135 -0
- abirqu-1.0.0/abirqu/optimize/pipeline.py +93 -0
- abirqu-1.0.0/abirqu/optimize/transpiler.py +184 -0
- abirqu-1.0.0/abirqu/optimize/zx_calculus.py +164 -0
- abirqu-1.0.0/abirqu/orchestration.py +222 -0
- abirqu-1.0.0/abirqu/osint/__init__.py +627 -0
- abirqu-1.0.0/abirqu/osint/quantum_encoding.py +573 -0
- abirqu-1.0.0/abirqu/patterns/__init__.py +33 -0
- abirqu-1.0.0/abirqu/patterns/core_patterns.py +93 -0
- abirqu-1.0.0/abirqu/patterns/detector.py +48 -0
- abirqu-1.0.0/abirqu/patterns/registry.py +27 -0
- abirqu-1.0.0/abirqu/patterns/templates.py +66 -0
- abirqu-1.0.0/abirqu/phases/__init__.py +456 -0
- abirqu-1.0.0/abirqu/phases/phase1.py +33 -0
- abirqu-1.0.0/abirqu/phases/phase10.py +97 -0
- abirqu-1.0.0/abirqu/phases/phase11.py +164 -0
- abirqu-1.0.0/abirqu/phases/phase12.py +126 -0
- abirqu-1.0.0/abirqu/phases/phase13.py +119 -0
- abirqu-1.0.0/abirqu/phases/phase14.py +96 -0
- abirqu-1.0.0/abirqu/phases/phase15.py +62 -0
- abirqu-1.0.0/abirqu/phases/phase16.py +71 -0
- abirqu-1.0.0/abirqu/phases/phase17.py +104 -0
- abirqu-1.0.0/abirqu/phases/phase18.py +73 -0
- abirqu-1.0.0/abirqu/phases/phase19.py +78 -0
- abirqu-1.0.0/abirqu/phases/phase2.py +30 -0
- abirqu-1.0.0/abirqu/phases/phase20.py +59 -0
- abirqu-1.0.0/abirqu/phases/phase21.py +65 -0
- abirqu-1.0.0/abirqu/phases/phase22.py +60 -0
- abirqu-1.0.0/abirqu/phases/phase23.py +65 -0
- abirqu-1.0.0/abirqu/phases/phase24.py +61 -0
- abirqu-1.0.0/abirqu/phases/phase25.py +44 -0
- abirqu-1.0.0/abirqu/phases/phase26.py +40 -0
- abirqu-1.0.0/abirqu/phases/phase27.py +134 -0
- abirqu-1.0.0/abirqu/phases/phase28.py +51 -0
- abirqu-1.0.0/abirqu/phases/phase29.py +42 -0
- abirqu-1.0.0/abirqu/phases/phase3.py +25 -0
- abirqu-1.0.0/abirqu/phases/phase30.py +46 -0
- abirqu-1.0.0/abirqu/phases/phase31.py +115 -0
- abirqu-1.0.0/abirqu/phases/phase32.py +143 -0
- abirqu-1.0.0/abirqu/phases/phase33.py +258 -0
- abirqu-1.0.0/abirqu/phases/phase34.py +110 -0
- abirqu-1.0.0/abirqu/phases/phase35.py +153 -0
- abirqu-1.0.0/abirqu/phases/phase36.py +205 -0
- abirqu-1.0.0/abirqu/phases/phase37.py +176 -0
- abirqu-1.0.0/abirqu/phases/phase38.py +157 -0
- abirqu-1.0.0/abirqu/phases/phase39.py +140 -0
- abirqu-1.0.0/abirqu/phases/phase4.py +34 -0
- abirqu-1.0.0/abirqu/phases/phase40.py +100 -0
- abirqu-1.0.0/abirqu/phases/phase5.py +110 -0
- abirqu-1.0.0/abirqu/phases/phase6.py +20 -0
- abirqu-1.0.0/abirqu/phases/phase7.py +20 -0
- abirqu-1.0.0/abirqu/phases/phase8.py +23 -0
- abirqu-1.0.0/abirqu/phases/phase9.py +201 -0
- abirqu-1.0.0/abirqu/physics.py +59 -0
- abirqu-1.0.0/abirqu/plugin_market.py +222 -0
- abirqu-1.0.0/abirqu/plugins.py +594 -0
- abirqu-1.0.0/abirqu/primitives/__init__.py +32 -0
- abirqu-1.0.0/abirqu/primitives/estimator.py +57 -0
- abirqu-1.0.0/abirqu/primitives/pauli_optimizer.py +359 -0
- abirqu-1.0.0/abirqu/primitives/qnn.py +254 -0
- abirqu-1.0.0/abirqu/primitives/quantum_run.py +382 -0
- abirqu-1.0.0/abirqu/primitives/sampler.py +89 -0
- abirqu-1.0.0/abirqu/pulse_translator.py +448 -0
- abirqu-1.0.0/abirqu/q_agi.py +127 -0
- abirqu-1.0.0/abirqu/qec/__init__.py +41 -0
- abirqu-1.0.0/abirqu/qec/codes.py +529 -0
- abirqu-1.0.0/abirqu/qec/color_code.py +178 -0
- abirqu-1.0.0/abirqu/qec/decoder.py +367 -0
- abirqu-1.0.0/abirqu/qec/ft_compiler.py +268 -0
- abirqu-1.0.0/abirqu/qec/gpu_decoder.py +106 -0
- abirqu-1.0.0/abirqu/qec/lattice_surgery.py +6 -0
- abirqu-1.0.0/abirqu/qec/ldpc.py +175 -0
- abirqu-1.0.0/abirqu/qec/magic_state.py +248 -0
- abirqu-1.0.0/abirqu/qec/patch.py +180 -0
- abirqu-1.0.0/abirqu/qec/surface_code.py +210 -0
- abirqu-1.0.0/abirqu/qml.py +121 -0
- abirqu-1.0.0/abirqu/qnlp/__init__.py +21 -0
- abirqu-1.0.0/abirqu/qnlp/bitstream.py +140 -0
- abirqu-1.0.0/abirqu/qnlp/phonemes.py +177 -0
- abirqu-1.0.0/abirqu/qnlp/spae.py +313 -0
- abirqu-1.0.0/abirqu/qpinn.py +583 -0
- abirqu-1.0.0/abirqu/quantum_communication/__init__.py +40 -0
- abirqu-1.0.0/abirqu/quantum_communication/bb84.py +237 -0
- abirqu-1.0.0/abirqu/quantum_communication/cv_qkd.py +196 -0
- abirqu-1.0.0/abirqu/quantum_communication/di_qkd.py +205 -0
- abirqu-1.0.0/abirqu/quantum_communication/e91.py +274 -0
- abirqu-1.0.0/abirqu/quantum_communication/network.py +249 -0
- abirqu-1.0.0/abirqu/quantum_communication/repeaters.py +202 -0
- abirqu-1.0.0/abirqu/quantum_communication/satellite.py +162 -0
- abirqu-1.0.0/abirqu/quantum_optimizer.py +709 -0
- abirqu-1.0.0/abirqu/quantum_os/__init__.py +45 -0
- abirqu-1.0.0/abirqu/quantum_os/access.py +120 -0
- abirqu-1.0.0/abirqu/quantum_os/audit.py +165 -0
- abirqu-1.0.0/abirqu/quantum_os/cost.py +103 -0
- abirqu-1.0.0/abirqu/quantum_os/environment.py +143 -0
- abirqu-1.0.0/abirqu/quantum_os/job.py +113 -0
- abirqu-1.0.0/abirqu/quantum_os/monitor.py +137 -0
- abirqu-1.0.0/abirqu/quantum_os/partitioner.py +142 -0
- abirqu-1.0.0/abirqu/quantum_os/preemption.py +139 -0
- abirqu-1.0.0/abirqu/quantum_os/queue.py +180 -0
- abirqu-1.0.0/abirqu/quantum_os/rbac.py +115 -0
- abirqu-1.0.0/abirqu/quantum_os/reservation.py +198 -0
- abirqu-1.0.0/abirqu/quantum_os/resource_manager.py +138 -0
- abirqu-1.0.0/abirqu/quantum_os/scheduler.py +181 -0
- abirqu-1.0.0/abirqu/quantum_os/tenant.py +159 -0
- abirqu-1.0.0/abirqu/quantum_os/virtual_qpu.py +93 -0
- abirqu-1.0.0/abirqu/routing.py +183 -0
- abirqu-1.0.0/abirqu/sdk.py +339 -0
- abirqu-1.0.0/abirqu/security.py +84 -0
- abirqu-1.0.0/abirqu/simulation/__init__.py +47 -0
- abirqu-1.0.0/abirqu/simulation/approximate.py +6 -0
- abirqu-1.0.0/abirqu/simulation/clifford.py +270 -0
- abirqu-1.0.0/abirqu/simulation/density_sim.py +104 -0
- abirqu-1.0.0/abirqu/simulation/distributed_sim.py +7 -0
- abirqu-1.0.0/abirqu/simulation/gpu_sim.py +294 -0
- abirqu-1.0.0/abirqu/simulation/hybrid.py +266 -0
- abirqu-1.0.0/abirqu/simulation/monte_carlo.py +547 -0
- abirqu-1.0.0/abirqu/simulation/mps.py +415 -0
- abirqu-1.0.0/abirqu/simulation/multi_gpu_sim.py +9 -0
- abirqu-1.0.0/abirqu/simulation/ode_solver.py +515 -0
- abirqu-1.0.0/abirqu/simulation/tensor_network.py +6 -0
- abirqu-1.0.0/abirqu/simulation/waveform.py +568 -0
- abirqu-1.0.0/abirqu/simulator.py +135 -0
- abirqu-1.0.0/abirqu/space/__init__.py +432 -0
- abirqu-1.0.0/abirqu/space.py +126 -0
- abirqu-1.0.0/abirqu/sparse.py +110 -0
- abirqu-1.0.0/abirqu/tests/__init__.py +1 -0
- abirqu-1.0.0/abirqu/tomography.py +344 -0
- abirqu-1.0.0/abirqu/tracker.py +88 -0
- abirqu-1.0.0/abirqu/transpiler/__init__.py +247 -0
- abirqu-1.0.0/abirqu/transpiler/fidelity.py +120 -0
- abirqu-1.0.0/abirqu/transpiler/routing.py +83 -0
- abirqu-1.0.0/abirqu/transpiler/scheduling.py +108 -0
- abirqu-1.0.0/abirqu/transpiler/topology.py +104 -0
- abirqu-1.0.0/abirqu/unitary_synthesis.py +327 -0
- abirqu-1.0.0/abirqu/visualization/__init__.py +27 -0
- abirqu-1.0.0/abirqu/visualization/bloch.py +110 -0
- abirqu-1.0.0/abirqu/visualization/circuit_drawer.py +275 -0
- abirqu-1.0.0/abirqu/visualization/error_map.py +60 -0
- abirqu-1.0.0/abirqu/visualization/gate_map.py +49 -0
- abirqu-1.0.0/abirqu/visualization/histogram.py +60 -0
- abirqu-1.0.0/abirqu/visualization/noise_fingerprint.py +172 -0
- abirqu-1.0.0/abirqu/visualization/stateplot.py +106 -0
- abirqu-1.0.0/abirqu/viz/__init__.py +7 -0
- abirqu-1.0.0/abirqu/viz/circuit_viz.py +131 -0
- abirqu-1.0.0/abirqu/viz/export.py +174 -0
- abirqu-1.0.0/abirqu/viz/performance.py +156 -0
- abirqu-1.0.0/abirqu/viz/results_viz.py +129 -0
- abirqu-1.0.0/abirqu.egg-info/PKG-INFO +965 -0
- abirqu-1.0.0/abirqu.egg-info/SOURCES.txt +286 -0
- abirqu-1.0.0/abirqu.egg-info/dependency_links.txt +1 -0
- abirqu-1.0.0/abirqu.egg-info/entry_points.txt +2 -0
- abirqu-1.0.0/abirqu.egg-info/requires.txt +63 -0
- abirqu-1.0.0/abirqu.egg-info/top_level.txt +1 -0
- abirqu-1.0.0/pyproject.toml +97 -0
- abirqu-1.0.0/setup.cfg +4 -0
- abirqu-1.0.0/setup.py +63 -0
- abirqu-1.0.0/tests/test_comprehensive.py +544 -0
- abirqu-1.0.0/tests/test_gui.py +921 -0
- abirqu-1.0.0/tests/test_hardware.py +612 -0
- abirqu-1.0.0/tests/test_hybrid_simulator.py +203 -0
- abirqu-1.0.0/tests/test_novel_contributions.py +323 -0
- abirqu-1.0.0/tests/test_properties.py +272 -0
- abirqu-1.0.0/tests/test_qec.py +610 -0
- abirqu-1.0.0/tests/test_quantum_communication.py +243 -0
- abirqu-1.0.0/tests/test_tutorials.py +114 -0
|
@@ -0,0 +1,703 @@
|
|
|
1
|
+
# Contributing to AbirQu
|
|
2
|
+
|
|
3
|
+
Welcome — and thank you for your interest in AbirQu! This guide will help you get started testing, using, and contributing to the AbirQu Quantum SDK.
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
Whether you are a quantum researcher, a software developer, a student, or just curious about quantum computing, your contributions are welcome.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Table of Contents
|
|
12
|
+
|
|
13
|
+
1. [Getting Started](#1-getting-started)
|
|
14
|
+
2. [Quick Start](#2-quick-start)
|
|
15
|
+
3. [Testing the SDK](#3-testing-the-sdk)
|
|
16
|
+
4. [Running on Real Hardware](#4-running-on-real-hardware)
|
|
17
|
+
5. [Reporting Issues](#5-reporting-issues)
|
|
18
|
+
6. [Contributing Code](#6-contributing-code)
|
|
19
|
+
7. [Code Standards](#7-code-standards)
|
|
20
|
+
8. [Project Structure](#8-project-structure)
|
|
21
|
+
9. [Development Setup](#9-development-setup)
|
|
22
|
+
10. [Contact](#10-contact)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 1. Getting Started
|
|
27
|
+
|
|
28
|
+
### What is AbirQu?
|
|
29
|
+
|
|
30
|
+
AbirQu is a full-stack quantum computing SDK that eliminates the fragmentation across quantum providers. Instead of learning separate APIs for IBM Qiskit, Google Cirq, Amazon Braket, and others, AbirQu gives you:
|
|
31
|
+
|
|
32
|
+
- **One unified function** — `QuantumRun` — for sampling, estimation, error mitigation, and ML
|
|
33
|
+
- **One circuit library** — works across 12 hardware backends
|
|
34
|
+
- **One transpiler pipeline** — decomposes gates for any target architecture
|
|
35
|
+
- **5 simulation engines** — GPU, Clifford, MPS, Monte Carlo, NumPy
|
|
36
|
+
- **6 domain modules** — Chemistry, OSINT, Cryptanalysis, Space, Q-PINN, Agentic
|
|
37
|
+
- **7 quantum communication protocols** — BB84, E91, CV-QKD, and more
|
|
38
|
+
- **Fault-tolerant QEC** — Surface, Color, and Stabilizer codes with 5 decoders
|
|
39
|
+
|
|
40
|
+
### Who is AbirQu for?
|
|
41
|
+
|
|
42
|
+
- **Quantum Researchers** — single SDK with algorithms from multiple quantum domains
|
|
43
|
+
- **Software Developers** — unified API across different hardware backends
|
|
44
|
+
- **Students and Educators** — learn quantum computing with a hardware-independent SDK
|
|
45
|
+
- **Enterprise Teams** — post-quantum cryptography and job scheduling
|
|
46
|
+
- **Pharmaceutical Researchers** — quantum chemistry simulation
|
|
47
|
+
- **Cybersecurity Teams** — post-quantum cryptographic algorithms
|
|
48
|
+
|
|
49
|
+
### System Requirements
|
|
50
|
+
|
|
51
|
+
| Requirement | Minimum | Recommended |
|
|
52
|
+
|------------|---------|-------------|
|
|
53
|
+
| Python | 3.9+ | 3.10+ |
|
|
54
|
+
| NumPy | 1.21+ | 1.24+ |
|
|
55
|
+
| RAM | 4 GB | 16 GB+ |
|
|
56
|
+
| Disk | 100 MB | 500 MB |
|
|
57
|
+
| OS | Linux, macOS, Windows | Linux (best OpenBLAS support) |
|
|
58
|
+
|
|
59
|
+
Optional for GPU acceleration: CUDA 11.0+ with CuPy and an NVIDIA GPU (compute capability 3.5+).
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 2. Quick Start
|
|
64
|
+
|
|
65
|
+
### Install from Source
|
|
66
|
+
|
|
67
|
+
AbirQu is not yet published on PyPI. Install from the GitHub repository:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
git clone https://github.com/Abiress/abirqu.git
|
|
71
|
+
cd abirqu
|
|
72
|
+
pip install -e .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Install with Optional Features
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# GPU acceleration (requires CUDA + CuPy)
|
|
79
|
+
pip install -e ".[gpu]"
|
|
80
|
+
|
|
81
|
+
# Visualization (matplotlib, pillow)
|
|
82
|
+
pip install -e ".[visualization]"
|
|
83
|
+
|
|
84
|
+
# All optional features
|
|
85
|
+
pip install -e ".[gpu,visualization]"
|
|
86
|
+
|
|
87
|
+
# Development tools (pytest, pytest-cov, hypothesis)
|
|
88
|
+
pip install -e ".[dev]"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Verify Installation
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
import abirqu
|
|
95
|
+
print(f"AbirQu version: {abirqu.__version__}")
|
|
96
|
+
|
|
97
|
+
from abirqu import Circuit, H, CNOT
|
|
98
|
+
bell = Circuit(2)
|
|
99
|
+
bell.h(0)
|
|
100
|
+
bell.cnot(0, 1)
|
|
101
|
+
|
|
102
|
+
from abirqu.primitives import QuantumRun
|
|
103
|
+
result = QuantumRun(bell, shots=1000)
|
|
104
|
+
print(f"Bell state counts: {result.counts}")
|
|
105
|
+
# Expected: {'00': ~500, '11': ~500}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Run Your First Circuit
|
|
109
|
+
|
|
110
|
+
Create a file called `my_first_circuit.py`:
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
from abirqu import Circuit, H, CNOT
|
|
114
|
+
from abirqu.primitives import QuantumRun
|
|
115
|
+
|
|
116
|
+
# Create a Bell state — the "Hello World" of quantum computing
|
|
117
|
+
circuit = Circuit(2)
|
|
118
|
+
circuit.h(0) # Put qubit 0 into superposition
|
|
119
|
+
circuit.cnot(0, 1) # Entangle qubit 1 with qubit 0
|
|
120
|
+
circuit.measure([0, 1])
|
|
121
|
+
|
|
122
|
+
result = QuantumRun(circuit, shots=1000)
|
|
123
|
+
print(result.counts) # {'00': ~500, '11': ~500}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
python my_first_circuit.py
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Run More Examples
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Quick start with state visualization
|
|
134
|
+
python examples/quick_start.py
|
|
135
|
+
|
|
136
|
+
# Grover's search algorithm
|
|
137
|
+
python examples/grover_search.py
|
|
138
|
+
|
|
139
|
+
# QAOA for Max-Cut
|
|
140
|
+
python examples/qaoa_maxcut.py
|
|
141
|
+
|
|
142
|
+
# VQE for H2 molecule
|
|
143
|
+
python examples/vqe_h2.py
|
|
144
|
+
|
|
145
|
+
# Surface code error correction
|
|
146
|
+
python examples/qec_surface_code.py
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Run Benchmarks
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Run the full benchmark suite on local simulator
|
|
153
|
+
python benchmarks/run_benchmarks.py
|
|
154
|
+
|
|
155
|
+
# Run with a specific backend
|
|
156
|
+
python benchmarks/run_benchmarks.py --backend local
|
|
157
|
+
|
|
158
|
+
# Save results to JSON
|
|
159
|
+
python benchmarks/run_benchmarks.py --output results.json
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Benchmark results are saved to `benchmark_results.json` in the project root.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 3. Testing the SDK
|
|
167
|
+
|
|
168
|
+
### Running the Test Suite
|
|
169
|
+
|
|
170
|
+
AbirQu has **412 tests** covering all modules. Run them with:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Run all tests
|
|
174
|
+
pytest
|
|
175
|
+
|
|
176
|
+
# Run with verbose output
|
|
177
|
+
pytest -v
|
|
178
|
+
|
|
179
|
+
# Run with coverage report
|
|
180
|
+
pytest --cov=abirqu --cov-report=term-missing
|
|
181
|
+
|
|
182
|
+
# Run a specific test file
|
|
183
|
+
pytest tests/test_comprehensive.py
|
|
184
|
+
|
|
185
|
+
# Run a specific test class or method
|
|
186
|
+
pytest tests/test_comprehensive.py::TestCircuit::test_create_empty
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Test Files
|
|
190
|
+
|
|
191
|
+
| File | What It Tests |
|
|
192
|
+
|------|---------------|
|
|
193
|
+
| `tests/test_comprehensive.py` | Core circuits, backends, noise, primitives, chemistry, QEC, simulation |
|
|
194
|
+
| `tests/test_gui.py` | Quantum IDE/GUI components |
|
|
195
|
+
| `tests/test_hardware.py` | Hardware calibration, characterization, noise profiling |
|
|
196
|
+
| `tests/test_hybrid_simulator.py` | Hybrid MPS-Clifford simulator |
|
|
197
|
+
| `tests/test_novel_contributions.py` | Noise-adaptive compiler, SPAE, circuit cutting |
|
|
198
|
+
| `tests/test_properties.py` | Quantum circuit properties |
|
|
199
|
+
| `tests/test_qec.py` | Quantum error correction codes and decoders |
|
|
200
|
+
| `tests/test_quantum_communication.py` | BB84, E91, CV-QKD, and other protocols |
|
|
201
|
+
| `tests/test_tutorials.py` | Tutorial code snippets |
|
|
202
|
+
|
|
203
|
+
### Running Tutorials
|
|
204
|
+
|
|
205
|
+
AbirQu includes **205 tutorials** covering quantum computing from basics to advanced applications. Tutorials are in the `tutorials/` directory.
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# View the full tutorial index
|
|
209
|
+
cat tutorials/INDEX.md
|
|
210
|
+
|
|
211
|
+
# Run a specific tutorial (tutorials are markdown with code)
|
|
212
|
+
# For example, Tutorial 1 — Bell States:
|
|
213
|
+
python -c "
|
|
214
|
+
from abirqu import Circuit, H, CNOT
|
|
215
|
+
from abirqu.primitives import QuantumRun
|
|
216
|
+
|
|
217
|
+
circuit = Circuit(2)
|
|
218
|
+
circuit.h(0)
|
|
219
|
+
circuit.cnot(0, 1)
|
|
220
|
+
circuit.measure([0, 1])
|
|
221
|
+
|
|
222
|
+
result = QuantumRun(circuit, shots=1000)
|
|
223
|
+
print(result.counts)
|
|
224
|
+
"
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Tutorial categories:
|
|
228
|
+
|
|
229
|
+
| Category | Tutorials | Topics |
|
|
230
|
+
|----------|-----------|--------|
|
|
231
|
+
| Fundamentals | 1–10 | Superposition, entanglement, QFT, QPE, Grover, Shor, VQE |
|
|
232
|
+
| Algorithms | 11–20 | QAOA, HHL, quantum walk, amplitude estimation, QNN |
|
|
233
|
+
| Machine Learning | 21–30 | Quantum RL, GANs, PCA, clustering, anomaly detection |
|
|
234
|
+
| Chemistry & Info | 31–40 | Error mitigation, benchmarking, QRAM, molecular simulation |
|
|
235
|
+
| Advanced | 41–50 | Surface codes, fault-tolerant circuits, compilers, sensing |
|
|
236
|
+
| Expert | 51–100 | Spin chains, chaos, advanced optimization, QML |
|
|
237
|
+
| Cutting-Edge | 111–120 | Novel algorithms, research frontiers |
|
|
238
|
+
| Domain Apps | 121–150 | Medical, defense, finance, supply chain, agriculture |
|
|
239
|
+
| Industry | 151–170 | Manufacturing, retail, aerospace, telecom, energy |
|
|
240
|
+
| Business | 171–200 | R&D, IP, M&A, Web3, DevOps, ML Ops |
|
|
241
|
+
|
|
242
|
+
### Running Benchmarks
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Full benchmark suite
|
|
246
|
+
python benchmarks/run_benchmarks.py
|
|
247
|
+
|
|
248
|
+
# Specific backend
|
|
249
|
+
python benchmarks/run_benchmarks.py --backend local
|
|
250
|
+
|
|
251
|
+
# Save to custom output file
|
|
252
|
+
python benchmarks/run_benchmarks.py --output my_results.json
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Benchmarks measure wall-clock time and memory for: QFT, random circuits, VQE, Grover search, state preparation, and full pipeline simulation.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 4. Running on Real Hardware
|
|
260
|
+
|
|
261
|
+
AbirQu supports 12 hardware backends. IBM Quantum is the most complete integration.
|
|
262
|
+
|
|
263
|
+
### IBM Quantum Setup
|
|
264
|
+
|
|
265
|
+
**Step 1: Get an IBM Quantum Token**
|
|
266
|
+
|
|
267
|
+
1. Go to [quantum.ibm.com](https://quantum.ibm.com)
|
|
268
|
+
2. Create a free account (or sign in)
|
|
269
|
+
3. Navigate to **Account Settings** → **API Tokens**
|
|
270
|
+
4. Click **Create Token** and copy it
|
|
271
|
+
|
|
272
|
+
**Step 2: Set Your Token as an Environment Variable**
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
export IBM_QUANTUM_TOKEN="your_token_here"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Or add it to a `.env` file in the project root:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
cp .env.example .env
|
|
282
|
+
# Edit .env and set IBM_QUANTUM_TOKEN=your_token_here
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**Step 3: Install IBM Backend Dependencies**
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
pip install -e ".[ibm]"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Step 4: Run on Real Hardware**
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
# Dry run (local simulation, no credentials needed)
|
|
295
|
+
python examples/real_hardware_execution.py --dry-run
|
|
296
|
+
|
|
297
|
+
# Real hardware execution
|
|
298
|
+
python examples/real_hardware_execution.py --backend ibm_brisbane --shots 1024
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Other Hardware Backends
|
|
302
|
+
|
|
303
|
+
AbirQu also supports (with varying levels of verification):
|
|
304
|
+
|
|
305
|
+
| Backend | Install | Status |
|
|
306
|
+
|---------|---------|--------|
|
|
307
|
+
| IBM Quantum | `pip install -e ".[ibm]"` | SDK-wired |
|
|
308
|
+
| D-Wave | `pip install -e ".[dwave]"` | Verified |
|
|
309
|
+
| SpinQ | `pip install -e ".[spinq]"` | Verified |
|
|
310
|
+
| AWS Braket | `pip install -e ".[aws]"` | SDK-wired |
|
|
311
|
+
| Azure Quantum | `pip install -e ".[azure]"` | SDK-wired |
|
|
312
|
+
| Google Quantum | `pip install -e ".[cirq]"` | SDK-wired |
|
|
313
|
+
| IonQ | `pip install -e ".[ionq]"` | SDK-wired |
|
|
314
|
+
|
|
315
|
+
**Note:** "SDK-wired" means adapter code exists but has not been validated against real hardware. D-Wave and SpinQ have been verified.
|
|
316
|
+
|
|
317
|
+
### Provider API Keys
|
|
318
|
+
|
|
319
|
+
Set environment variables or create a `.env` file (see `.env.example` for a template):
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# IBM Quantum
|
|
323
|
+
export IBM_QUANTUM_TOKEN="your_token_here"
|
|
324
|
+
|
|
325
|
+
# AWS Braket
|
|
326
|
+
export AWS_ACCESS_KEY_ID="your_key"
|
|
327
|
+
export AWS_SECRET_ACCESS_KEY="your_secret"
|
|
328
|
+
|
|
329
|
+
# Azure Quantum
|
|
330
|
+
export AZURE_QUANTUM_RESOURCE_ID="your_resource_id"
|
|
331
|
+
|
|
332
|
+
# IonQ
|
|
333
|
+
export IONQ_API_KEY="your_key"
|
|
334
|
+
|
|
335
|
+
# Google Quantum
|
|
336
|
+
export GOOGLE_CLOUD_PROJECT="your_project_id"
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
AbirQu auto-discovers credentials from environment variables via `CloudManager`.
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## 5. Reporting Issues
|
|
344
|
+
|
|
345
|
+
If you find a bug, have a feature request, or run into a problem, please open a GitHub issue:
|
|
346
|
+
|
|
347
|
+
**[https://github.com/Abiress/abirqu/issues](https://github.com/Abiress/abirqu/issues)**
|
|
348
|
+
|
|
349
|
+
### What to Include
|
|
350
|
+
|
|
351
|
+
A good issue report helps us fix the problem faster. Please include:
|
|
352
|
+
|
|
353
|
+
1. **A clear title** — e.g., "QuantumRun raises IndexError on 3-qubit circuit"
|
|
354
|
+
2. **Your environment** — OS, Python version, NumPy version, AbirQu version
|
|
355
|
+
3. **Steps to reproduce** — minimal code that triggers the issue
|
|
356
|
+
4. **Expected behavior** — what you thought would happen
|
|
357
|
+
5. **Actual behavior** — the error message or unexpected output
|
|
358
|
+
6. **Full traceback** — if there is an error, paste the complete traceback
|
|
359
|
+
|
|
360
|
+
### Example Issue Report
|
|
361
|
+
|
|
362
|
+
```markdown
|
|
363
|
+
**Title:** QuantumRun crashes with empty circuit
|
|
364
|
+
|
|
365
|
+
**Environment:**
|
|
366
|
+
- OS: Ubuntu 22.04
|
|
367
|
+
- Python: 3.11.5
|
|
368
|
+
- NumPy: 2.4.4
|
|
369
|
+
- AbirQu: 1.0.0
|
|
370
|
+
|
|
371
|
+
**Steps to reproduce:**
|
|
372
|
+
```python
|
|
373
|
+
from abirqu import Circuit
|
|
374
|
+
from abirqu.primitives import QuantumRun
|
|
375
|
+
|
|
376
|
+
circuit = Circuit(0)
|
|
377
|
+
result = QuantumRun(circuit, shots=100)
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Expected:** Either a clear error message or an empty result.
|
|
381
|
+
|
|
382
|
+
**Actual:** `IndexError: list index out of range` in `abirqu/primitives/__init__.py:42`
|
|
383
|
+
|
|
384
|
+
**Full traceback:**
|
|
385
|
+
```
|
|
386
|
+
Traceback (most recent call last):
|
|
387
|
+
File "test.py", line 6, in <module>
|
|
388
|
+
result = QuantumRun(circuit, shots=100)
|
|
389
|
+
...
|
|
390
|
+
```
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### Quick Way to Get Your Environment Info
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
python -c "import sys, numpy, abirqu; print(f'Python {sys.version}\nNumPy {numpy.__version__}\nAbirQu {abirqu.__version__}')"
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## 6. Contributing Code
|
|
402
|
+
|
|
403
|
+
### Fork, Branch, Test, PR Workflow
|
|
404
|
+
|
|
405
|
+
1. **Fork** the repository on GitHub
|
|
406
|
+
2. **Clone** your fork locally:
|
|
407
|
+
```bash
|
|
408
|
+
git clone https://github.com/your-username/abirqu.git
|
|
409
|
+
cd abirqu
|
|
410
|
+
```
|
|
411
|
+
3. **Install** in development mode:
|
|
412
|
+
```bash
|
|
413
|
+
pip install -e ".[dev]"
|
|
414
|
+
```
|
|
415
|
+
4. **Create a branch** for your change:
|
|
416
|
+
```bash
|
|
417
|
+
git checkout -b feature/your-feature-name
|
|
418
|
+
```
|
|
419
|
+
Use a descriptive branch name: `feature/add-pauli-y`, `fix/noise-model-bug`, `docs/update-readme`
|
|
420
|
+
5. **Make your changes** and write tests
|
|
421
|
+
6. **Run the test suite** to make sure nothing is broken:
|
|
422
|
+
```bash
|
|
423
|
+
pytest
|
|
424
|
+
```
|
|
425
|
+
7. **Commit** with a clear message:
|
|
426
|
+
```bash
|
|
427
|
+
git add .
|
|
428
|
+
git commit -m "Add Pauli-Y gate to circuit library"
|
|
429
|
+
```
|
|
430
|
+
8. **Push** to your fork:
|
|
431
|
+
```bash
|
|
432
|
+
git push origin feature/your-feature-name
|
|
433
|
+
```
|
|
434
|
+
9. **Open a Pull Request** on the [main repository](https://github.com/Abiress/abirqu/pulls)
|
|
435
|
+
|
|
436
|
+
### Pull Request Guidelines
|
|
437
|
+
|
|
438
|
+
- Keep PRs focused — one feature or fix per PR
|
|
439
|
+
- Include a clear description of what changed and why
|
|
440
|
+
- Add tests for new functionality
|
|
441
|
+
- Update documentation if your change affects the public API
|
|
442
|
+
- Make sure all existing tests pass before submitting
|
|
443
|
+
- Reference any related issues (e.g., "Closes #42")
|
|
444
|
+
|
|
445
|
+
### What Makes a Good Contribution
|
|
446
|
+
|
|
447
|
+
- **Bug fixes** — anything that makes AbirQu more reliable
|
|
448
|
+
- **Tests** — improve coverage for under-tested modules
|
|
449
|
+
- **Documentation** — clarify confusing APIs, fix typos, add examples
|
|
450
|
+
- **New algorithms** — implement well-known quantum algorithms
|
|
451
|
+
- **Performance** — optimize simulation or compilation code
|
|
452
|
+
- **Backend improvements** — improve hardware adapter accuracy
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
## 7. Code Standards
|
|
457
|
+
|
|
458
|
+
### Python Style
|
|
459
|
+
|
|
460
|
+
AbirQu follows PEP 8 with a line length of 100 characters.
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
# Check style with ruff (configured in pyproject.toml)
|
|
464
|
+
ruff check abirqu/
|
|
465
|
+
|
|
466
|
+
# Auto-fix style issues
|
|
467
|
+
ruff check --fix abirqu/
|
|
468
|
+
|
|
469
|
+
# Format code
|
|
470
|
+
ruff format abirqu/
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
Key conventions:
|
|
474
|
+
|
|
475
|
+
- Use `snake_case` for functions and variables
|
|
476
|
+
- Use `PascalCase` for classes
|
|
477
|
+
- Use `UPPER_SNAKE_CASE` for constants
|
|
478
|
+
- Maximum line length: 100 characters
|
|
479
|
+
- Import sorting: standard library, third-party, local (enforced by ruff)
|
|
480
|
+
|
|
481
|
+
### Test Requirements
|
|
482
|
+
|
|
483
|
+
- Every new feature should include at least one test
|
|
484
|
+
- Test functions must start with `test_`
|
|
485
|
+
- Test classes must start with `Test`
|
|
486
|
+
- Tests should verify behavior, not just absence of errors
|
|
487
|
+
- Use `pytest` fixtures for shared setup
|
|
488
|
+
|
|
489
|
+
```python
|
|
490
|
+
# Example test
|
|
491
|
+
def test_circuit_create():
|
|
492
|
+
from abirqu import Circuit
|
|
493
|
+
c = Circuit(3, "test")
|
|
494
|
+
assert c.num_qubits == 3
|
|
495
|
+
assert len(c.gates) == 0
|
|
496
|
+
assert c.name == "test"
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
### Documentation Expectations
|
|
500
|
+
|
|
501
|
+
- All public functions and classes should have docstrings
|
|
502
|
+
- Use NumPy-style docstrings when possible
|
|
503
|
+
- Include type hints where practical
|
|
504
|
+
- Update `README.md` if you add a new feature
|
|
505
|
+
- Update `tutorials/INDEX.md` if you add a new tutorial
|
|
506
|
+
|
|
507
|
+
```python
|
|
508
|
+
def my_function(param1: int, param2: str = "default") -> bool:
|
|
509
|
+
"""Do something quantum.
|
|
510
|
+
|
|
511
|
+
Parameters
|
|
512
|
+
----------
|
|
513
|
+
param1 : int
|
|
514
|
+
The first parameter.
|
|
515
|
+
param2 : str, optional
|
|
516
|
+
The second parameter. Default is "default".
|
|
517
|
+
|
|
518
|
+
Returns
|
|
519
|
+
-------
|
|
520
|
+
bool
|
|
521
|
+
True if successful.
|
|
522
|
+
"""
|
|
523
|
+
return True
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
## 8. Project Structure
|
|
529
|
+
|
|
530
|
+
```
|
|
531
|
+
abirqu/
|
|
532
|
+
├── abirqu/ # Main package — the SDK itself
|
|
533
|
+
│ ├── __init__.py # Package entry point
|
|
534
|
+
│ ├── circuit.py # Circuit and Gate classes
|
|
535
|
+
│ ├── gates.py # Gate definitions (H, X, CNOT, etc.)
|
|
536
|
+
│ ├── primitives/ # QuantumRun, Sampler, Estimator, QNN
|
|
537
|
+
│ ├── library/ # Pre-built circuits (QFT, Grover, VQE, etc.)
|
|
538
|
+
│ ├── simulation/ # 5 simulation backends (GPU, Clifford, MPS, etc.)
|
|
539
|
+
│ ├── numpy_sim.py # Pure NumPy statevector simulator
|
|
540
|
+
│ ├── transpiler/ # Gate decomposition pipeline
|
|
541
|
+
│ ├── noise_toolkit.py # ZNE, readout mitigation, PEC
|
|
542
|
+
│ ├── qec/ # Quantum error correction codes and decoders
|
|
543
|
+
│ ├── quantum_communication/ # BB84, E91, CV-QKD, etc.
|
|
544
|
+
│ ├── chemistry/ # Molecular Hamiltonian mapping
|
|
545
|
+
│ ├── osint/ # Graph optimization → Ising/QUBO
|
|
546
|
+
│ ├── crypto/ # Shor, Grover, Kyber, Dilithium
|
|
547
|
+
│ ├── space/ # HHL, CFD, structural solvers
|
|
548
|
+
│ ├── qpinn.py # Quantum PDE solvers
|
|
549
|
+
│ ├── agentic/ # Task orchestration
|
|
550
|
+
│ ├── hardware/ # Calibration, characterization, noise profiling
|
|
551
|
+
│ ├── backends/ # Hardware backend adapters (IBM, D-Wave, etc.)
|
|
552
|
+
│ ├── cloud/ # Cloud manager, credential management
|
|
553
|
+
│ ├── quantum_os/ # Job scheduling, resource management
|
|
554
|
+
│ ├── visualization/ # Circuit drawer, Bloch sphere, histograms
|
|
555
|
+
│ ├── gui/ # Full IDE/GUI
|
|
556
|
+
│ ├── optimize/ # Noise-adaptive compiler, circuit simplifier
|
|
557
|
+
│ ├── addons/ # Trotter, circuit cutting, AQCTensor
|
|
558
|
+
│ ├── formats/ # Import/export (Qiskit, Cirq, Braket, etc.)
|
|
559
|
+
│ ├── docs/ # Beginner guide
|
|
560
|
+
│ └── cli.py # Command-line interface
|
|
561
|
+
├── tests/ # Test suite (412 tests)
|
|
562
|
+
│ ├── test_comprehensive.py
|
|
563
|
+
│ ├── test_gui.py
|
|
564
|
+
│ ├── test_hardware.py
|
|
565
|
+
│ ├── test_hybrid_simulator.py
|
|
566
|
+
│ ├── test_novel_contributions.py
|
|
567
|
+
│ ├── test_properties.py
|
|
568
|
+
│ ├── test_qec.py
|
|
569
|
+
│ ├── test_quantum_communication.py
|
|
570
|
+
│ └── test_tutorials.py
|
|
571
|
+
├── tutorials/ # 205 tutorials (markdown with code)
|
|
572
|
+
│ ├── INDEX.md # Full tutorial index
|
|
573
|
+
│ ├── 01_bell_states_and_circuits.md
|
|
574
|
+
│ ├── 02_quantum_algorithms.md
|
|
575
|
+
│ └── ... (1.md through 200.md)
|
|
576
|
+
├── examples/ # Runnable example scripts
|
|
577
|
+
│ ├── quick_start.py
|
|
578
|
+
│ ├── grover_search.py
|
|
579
|
+
│ ├── qaoa_maxcut.py
|
|
580
|
+
│ ├── vqe_h2.py
|
|
581
|
+
│ ├── qec_surface_code.py
|
|
582
|
+
│ ├── real_hardware_execution.py
|
|
583
|
+
│ └── ...
|
|
584
|
+
├── benchmarks/ # Benchmark suite
|
|
585
|
+
│ └── run_benchmarks.py
|
|
586
|
+
├── scripts/ # Utility scripts
|
|
587
|
+
├── assets/ # Logo, architecture diagrams
|
|
588
|
+
├── pyproject.toml # Build config, dependencies, tool settings
|
|
589
|
+
├── setup.py # Backward-compatible setup script
|
|
590
|
+
├── README.md # Project overview and documentation
|
|
591
|
+
├── CONTRIBUTING.md # This file
|
|
592
|
+
├── CODE_OF_CONDUCT.md # Community standards
|
|
593
|
+
├── SECURITY.md # Security policy
|
|
594
|
+
├── LICENSE # MIT License
|
|
595
|
+
└── .env.example # Provider credentials template
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
## 9. Development Setup
|
|
601
|
+
|
|
602
|
+
### Full Development Environment
|
|
603
|
+
|
|
604
|
+
```bash
|
|
605
|
+
# Clone and install
|
|
606
|
+
git clone https://github.com/Abiress/abirqu.git
|
|
607
|
+
cd abirqu
|
|
608
|
+
pip install -e ".[dev,visualization]"
|
|
609
|
+
|
|
610
|
+
# Verify everything works
|
|
611
|
+
pytest -v
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
### Running Tests
|
|
615
|
+
|
|
616
|
+
```bash
|
|
617
|
+
# All tests
|
|
618
|
+
pytest
|
|
619
|
+
|
|
620
|
+
# Verbose output
|
|
621
|
+
pytest -v
|
|
622
|
+
|
|
623
|
+
# With coverage
|
|
624
|
+
pytest --cov=abirqu --cov-report=term-missing
|
|
625
|
+
|
|
626
|
+
# Specific file
|
|
627
|
+
pytest tests/test_comprehensive.py
|
|
628
|
+
|
|
629
|
+
# Specific test
|
|
630
|
+
pytest tests/test_comprehensive.py::TestCircuit::test_create_empty
|
|
631
|
+
|
|
632
|
+
# Stop on first failure
|
|
633
|
+
pytest -x
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
### Linting and Formatting
|
|
637
|
+
|
|
638
|
+
```bash
|
|
639
|
+
# Check for style issues
|
|
640
|
+
ruff check abirqu/
|
|
641
|
+
|
|
642
|
+
# Auto-fix style issues
|
|
643
|
+
ruff check --fix abirqu/
|
|
644
|
+
|
|
645
|
+
# Format code
|
|
646
|
+
ruff format abirqu/
|
|
647
|
+
|
|
648
|
+
# Type checking (if you set it up)
|
|
649
|
+
mypy abirqu/
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Pre-commit Checks
|
|
653
|
+
|
|
654
|
+
Before submitting a PR, run this full check:
|
|
655
|
+
|
|
656
|
+
```bash
|
|
657
|
+
ruff check abirqu/ && ruff format --check abirqu/ && pytest
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
If any of these fail, fix the issues before pushing.
|
|
661
|
+
|
|
662
|
+
### Git Configuration (Optional)
|
|
663
|
+
|
|
664
|
+
```bash
|
|
665
|
+
# Set up a pre-commit hook to run tests automatically
|
|
666
|
+
cat > .git/hooks/pre-commit << 'EOF'
|
|
667
|
+
#!/bin/bash
|
|
668
|
+
echo "Running tests before commit..."
|
|
669
|
+
pytest --tb=short -q
|
|
670
|
+
if [ $? -ne 0 ]; then
|
|
671
|
+
echo "Tests failed. Commit aborted."
|
|
672
|
+
exit 1
|
|
673
|
+
fi
|
|
674
|
+
EOF
|
|
675
|
+
chmod +x .git/hooks/pre-commit
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
---
|
|
679
|
+
|
|
680
|
+
## 10. Contact
|
|
681
|
+
|
|
682
|
+
- **GitHub Issues:** [https://github.com/Abiress/abirqu/issues](https://github.com/Abiress/abirqu/issues) — for bug reports, feature requests, and questions
|
|
683
|
+
- **Email:** abhirsxn@gmail.com — for private inquiries
|
|
684
|
+
- **Website:** [aqdi.world](https://aqdi.world) — Artificial Quantum Dyson Intelligence
|
|
685
|
+
|
|
686
|
+
### Getting Help
|
|
687
|
+
|
|
688
|
+
- Read the [Beginner Guide](abirqu/docs/beginner_guide.md)
|
|
689
|
+
- Browse the [Tutorial Index](tutorials/INDEX.md)
|
|
690
|
+
- Check the [README](README.md) for a full feature overview
|
|
691
|
+
- Search [existing issues](https://github.com/Abiress/abirqu/issues) before opening a new one
|
|
692
|
+
|
|
693
|
+
---
|
|
694
|
+
|
|
695
|
+
## License
|
|
696
|
+
|
|
697
|
+
By contributing to AbirQu, you agree that your contributions will be licensed under the [MIT License](LICENSE).
|
|
698
|
+
|
|
699
|
+
**Copyright 2026 Abir Maheshwari.**
|
|
700
|
+
|
|
701
|
+
---
|
|
702
|
+
|
|
703
|
+
Thank you for contributing to AbirQu! Every improvement — no matter how small — helps make quantum computing more accessible.
|