Comprehensive quantum machine learning library with AutoML, GPU acceleration, advanced algorithms (QGANs, Quantum RL), transfer learning, and multi-framework support (Qiskit, PennyLane, Cirq, TensorFlow, PyTorch)
Project description
Quantum Debugger
The Most Comprehensive Quantum Machine Learning Library with AutoML
A powerful Python library for quantum circuit debugging, state inspection, performance analysis, and quantum machine learning. From basic circuits to QML with one-line AutoML.
What's New in v0.6.1
Correctness, performance, and "make the advertised features real" release:
- Faster core - gate application is now O(2ⁿ) per gate (was O(4ⁿ)); optional
GPU state-vector simulation (
get_statevector(use_gpu=True), up to ~50-75x at 20+ qubits in single precision). - Genuinely quantum QML - the quantum kernel/QSVM, hybrid PyTorch/TF layers, Quantum GAN, Quantum RL, and error mitigation (PEC, CDR, QNG, ZNE) are now real circuit-based implementations with real gradients, each verified — not the classical/placeholder stand-ins they were before.
- Robust imports - a broken optional dependency no longer breaks
import quantum_debugger.
See CHANGELOG.md for the full list.
What's New in v0.6.0
ONE-LINE QUANTUM MACHINE LEARNING
# NEW: AutoML - Quantum ML for everyone
from quantum_debugger.qml.automl import auto_qnn
model = auto_qnn(X_train, y_train)
predictions = model.predict(X_test)
No quantum expertise required. AutoML automatically:
- Selects optimal number of qubits
- Chooses best ansatz architecture
- Tunes all hyperparameters
- Finds best model configuration
v0.6.0 Complete Feature Set
Advanced QML (Weeks 1-3)
- Hybrid Models - TensorFlow and PyTorch quantum layers
- Quantum Kernels - QSVM with multiple kernel types
- Transfer Learning - PretrainedQNN, model zoo, fine-tuning
Production Tools (Weeks 4-5)
- Error Mitigation - PEC, CDR, realistic noise models
- Circuit Optimization - Gate reduction, compilation, transpilation
Universal Compatibility (Week 6)
- Framework Integrations - Qiskit, PennyLane, Cirq bridges
Hardware and Performance (Weeks 7-8)
- Real Quantum Computers - IBM Quantum (FREE), AWS Braket
- Benchmarking - QML vs Classical performance analysis
AutoML (Week 9)
- auto_qnn() - One-line interface for quantum ML
- Automatic Ansatz Selection - Finds best circuit architecture
- Hyperparameter Tuning - Grid and random search
- Neural Architecture Search - Optimizes qubit and layer counts
Jupyter Notebooks (Week 10)
- 5 Example Notebooks - AutoML, Transfer Learning, Hardware, Optimization, Benchmarking
- Google Colab Compatible - Run in browser
Advanced Algorithms (Week 11 - NEW)
- Quantum GANs - Generative adversarial networks for quantum states
- Quantum RL - Q-learning with quantum circuits
- SimpleEnvironment - Test environment for RL
CI/CD Automation (Week 12 - NEW)
- GitHub Actions - Auto-testing on Python 3.9-3.12
- Auto-Publishing - Automatic PyPI releases
- Code Quality - Linting, formatting checks
GPU Acceleration (v0.6.1)
- GPU state-vector simulation -
circuit.get_statevector(use_gpu=True)runs the whole circuit on the GPU (CuPy). Measured on an RTX 5060 vs CPU: ~6x in double precision, and 50-75x in single precision (precision='single') at 20-22 qubits, where the CPU becomes the bottleneck. - Distributed / mixed-precision training - real data-parallel gradient averaging and mixed-precision steps. (Multi-GPU wall-clock speedup requires multiple physical GPUs; on one device these run correctly but sequentially.)
- Windows-friendly - auto-discovers pip-installed CUDA runtime wheels
(
nvidia-*-cu12) so the GPU backend works without a manual CUDA toolkit setup.
See complete documentation for details.
Features
Core Debugging
- Step-through Debugging - Execute circuits gate-by-gate with breakpoints
- State Inspection - Analyze quantum states at any point
- Circuit Profiling - Depth analysis, gate statistics, optimization suggestions
- Visualization - State vectors, Bloch spheres, and more
- Noise Simulation - Realistic hardware noise models
- Qiskit Integration - Import/export circuits from Qiskit
Quantum Machine Learning (v0.6.0)
- AutoML - One-line interface with automatic optimization
- Advanced Algorithms - Quantum GANs and Quantum Reinforcement Learning
- Transfer Learning - PretrainedQNN, model zoo, fine-tuning
- GPU Acceleration - Multi-GPU, mixed precision (2-3x speedup)
- Error Mitigation - PEC, CDR, realistic noise models
- Circuit Optimization - Gate reduction, compilation, transpilation
- Framework Bridges - Qiskit, PennyLane, Cirq compatibility
- Hardware Backends - IBM Quantum (FREE), AWS Braket
- Benchmarking - QML vs Classical performance analysis
- Hybrid Models - TensorFlow and PyTorch quantum layers
- Quantum Kernels - QSVM with multiple kernel types
- VQE and QAOA - Molecular chemistry and optimization
- Advanced Optimizers - 7 optimizers including QNG
- Ansatz Library - 8 pre-built quantum circuit templates
- Example Notebooks - 5 comprehensive Jupyter tutorials
Quick Start
Installation
pip install quantum-debugger
Basic Circuit Debugging
from quantum_debugger import QuantumCircuit, QuantumDebugger
# Create a Bell state
qc = QuantumCircuit(2)
qc.h(0)
qc.cnot(0, 1)
# Debug step-by-step
debugger = QuantumDebugger(qc)
debugger.step() # Execute first gate
print(debugger.get_current_state())
debugger.step() # Execute second gate
print(debugger.get_current_state())
Quantum Machine Learning with AutoML
from quantum_debugger.qml.automl import auto_qnn
import numpy as np
# Load your data
X_train = np.random.randn(100, 4)
y_train = np.random.randint(0, 2, 100)
# One line to train quantum model
model = auto_qnn(X_train, y_train)
# Make predictions
X_test = np.random.randn(20, 4)
predictions = model.predict(X_test)
Manual QNN Configuration
For more control over your quantum neural network:
from quantum_debugger.qml.qnn import QuantumNeuralNetwork
# Create network
qnn = QuantumNeuralNetwork(n_qubits=4)
qnn.compile(optimizer='adam', loss='mse')
# Train
history = qnn.fit(X_train, y_train, epochs=50, batch_size=16)
# Predict
predictions = qnn.predict(X_test)
Advanced Features
Transfer Learning
from quantum_debugger.qml.transfer import PretrainedQNN
# Load pretrained model
pretrained = PretrainedQNN.from_zoo('iris_classifier')
# Fine-tune on your data
pretrained.fine_tune(X_new, y_new, epochs=10, freeze_layers=2)
# Save your model
pretrained.save('models/my_qnn.pkl')
Error Mitigation
from quantum_debugger.qml.mitigation import PEC, CDR
# Probabilistic Error Cancellation
pec = PEC(gate_error_rates={'rx': 0.01, 'cnot': 0.02})
mitigated_result, uncertainty = pec.apply_pec(circuit)
# Clifford Data Regression
cdr = CDR(n_clifford_circuits=50)
training_data = cdr.generate_training_data(n_qubits=4, depth=3)
cdr.train(training_data, noisy_executor)
mitigated = cdr.apply_cdr(noisy_measurement)
Circuit Optimization
from quantum_debugger.optimization import optimize_circuit, compile_circuit
# Simple optimization
gates = [('h', 0), ('h', 0), ('x', 1)] # H cancels itself
optimized = optimize_circuit(gates) # Returns: [('x', 1)]
# Multi-level compilation
compiled = compile_circuit(gates, optimization_level=3)
Hardware Deployment
from quantum_debugger.backends import IBMQuantumBackend
# Connect to IBM Quantum (FREE tier)
backend = IBMQuantumBackend()
backend.connect({'token': 'YOUR_FREE_IBM_TOKEN'})
# Execute on real quantum computer
gates = [('h', 0), ('cnot', (0, 1))]
counts = backend.execute(gates, n_shots=1024)
Get your free IBM Quantum token at: https://quantum.ibm.com
Framework Integration
from quantum_debugger.integrations import to_qiskit, from_qiskit, to_pennylane, to_cirq
# Convert to Qiskit
qiskit_circuit = to_qiskit(gates)
# Convert to PennyLane
pennylane_qnode = to_pennylane(gates)
# Convert to Cirq
cirq_circuit = to_cirq(gates)
Installation Options
Basic Installation
pip install quantum-debugger
With Optional Dependencies
# All frameworks
pip install quantum-debugger[all]
# Individual frameworks
pip install quantum-debugger[qiskit]
pip install quantum-debugger[pennylane]
pip install quantum-debugger[cirq]
pip install quantum-debugger[tensorflow]
pip install quantum-debugger[pytorch]
# Hardware backends
pip install quantum-debugger[ibm] # FREE
pip install quantum-debugger[aws] # Paid service
# Development tools
pip install quantum-debugger[dev]
Documentation
v0.6.0 Guides:
- V0.6.0 Features - Complete feature reference
- Transfer Learning Guide
- Error Mitigation Guide
- Circuit Optimization Guide
- Hardware Backends Guide
v0.5.0 Guides (still valid):
Testing
# Run all tests
pytest tests/ -v
# Run specific test suites
pytest tests/qml/ -v
pytest tests/test_optimization.py -v
pytest tests/test_integrations.py -v
# With coverage
pytest tests/ --cov=quantum_debugger --cov-report=html
See FINAL_TEST_SUMMARY.md for detailed test information.
Test Statistics (v0.6.1):
- ~980 tests passing (
pytest tests/ -m "not aws") - GPU-hardware tests require a working CUDA + CuPy install; they skip otherwise
- A few tests are performance/timing based and may vary by machine
Contributing
Contributions are welcome. Please ensure:
- All tests pass
- Code follows PEP 8 style guidelines
- Documentation is updated
- New features include tests
License
MIT License - see LICENSE file.
Citation
If you use quantum-debugger in your research, please cite:
@software{quantum_debugger_2026,
title = {Quantum Debugger: Production-Grade Quantum Machine Learning Library},
author = {Gupta, Raunak Kumar},
year = {2026},
url = {https://github.com/Raunakg2005/quantum-debugger}
}
Acknowledgments
Author: Raunak Kumar Gupta
GitHub: @Raunakg2005
LinkedIn: Raunak Kumar Gupta
Supervised by: Dr. Vaibhav Prakash Vasani
Supervisor LinkedIn: Dr. Vaibhav Vasani
Institution: K.J. Somaiya School of Engineering
Links
PyPI: https://pypi.org/project/quantum-debugger/
GitHub: https://github.com/Raunakg2005/quantum-debugger
Issues: https://github.com/Raunakg2005/quantum-debugger/issues
Documentation: https://github.com/Raunakg2005/quantum-debugger#readme
Version: 0.6.1
Last Updated: July 2026
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 quantum_debugger-0.6.1.tar.gz.
File metadata
- Download URL: quantum_debugger-0.6.1.tar.gz
- Upload date:
- Size: 287.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abbc14ee2d6ac8786413e0075da41186d071abae2beb5aaced2e1be3f314b3f6
|
|
| MD5 |
4a1ee2a1cdd66df171b6af96165fc408
|
|
| BLAKE2b-256 |
81983926aa6fd4ccdf542f95bb164688553609623326124aaa22075c671ad2a5
|
File details
Details for the file quantum_debugger-0.6.1-py3-none-any.whl.
File metadata
- Download URL: quantum_debugger-0.6.1-py3-none-any.whl
- Upload date:
- Size: 362.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b68b9daf748be7dbb10a758b6b3d4a48b9d3d2079667abe51e15669fa518435
|
|
| MD5 |
61a5176ca26379ee4716624847805a8e
|
|
| BLAKE2b-256 |
771c3ee0797f7c4fd0170630561b1d2e1372928552e8c1a834e44c9b945ef6fa
|