Skip to main content

Quantum Debugger

The Most Comprehensive Quantum Machine Learning Library with AutoML

PyPI version Tests CI Codecov Python License

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.9.1

Correctness patch: DepolarizingNoise.get_kraus_operators() now implements the same channel as apply() and the class docstring — the Pauli-error convention ρ → (1−p)ρ + (p/3)(XρX + YρY + ZρZ) (K₀ = √(1−p)·I, K₁₋₃ = √(p/3)·{X, Y, Z}). The old √(p/4) weighting made StochasticNoiseSampler's Monte-Carlo depolarizing noise 4/3× too strong for a given p. Trace preservation is unchanged; channel-equivalence and sampler regression tests added. See CHANGELOG.md.

What's New in v0.9.0

Quantum chemistry, many-body physics & advanced simulation — every routine verified against a closed form or an independent computation:

  • Fermionic systems — Jordan-Wigner transform, the Fermi-Hubbard model, and the Kitaev topological chain (Majorana edge modes).
  • Ground- & excited-state solvers — chemistry via VQE with Pauli decomposition, imaginary-time cooling, Krylov/Lanczos, and adiabatic evolution.
  • Finite-temperature physics — Gibbs states and thermodynamic quantities.
  • Quantum dynamics — Trotter error scaling, the Loschmidt echo & dynamical quantum phase transitions, out-of-time-order correlators (scrambling), and entanglement growth.
  • Quantum chaos — level-spacing statistics (GOE vs Poisson).
  • Metrology — spin squeezing and mixed-state quantum Fisher information.
  • Modern measurement & tensor-network toolkit — classical shadows, Schmidt decomposition, and the area law.

(Open systems, noise, and fault tolerance shipped in v0.8.0.)

See CHANGELOG.md for the full, itemized list.

What's New in v0.7.0

A second simulation engine plus a large, verified quantum-algorithms library:

  • Clifford / stabilizer simulator (StabilizerSimulator) — the Aaronson-Gottesman tableau: GHZ, graph/cluster states, and randomized benchmarking on hundreds of qubits instantly, far past the state-vector wall.
  • Big algorithms library — Shor factoring, Simon, quantum error correction (bit-flip / phase-flip / the 9-qubit Shor code), Trotter Hamiltonian simulation, gate decomposition (ZYZ/KAK), quantum arithmetic (Fourier + ripple-carry adders), teleportation / superdense / entanglement swapping, Bell-CHSH & GHZ-Mermin nonlocality, and BB84 QKD — each verified against its known outcome.
  • VQE ground-state solver converges to machine precision on larger chains (BFGS optimizer).

v0.8.0 — density-matrix engine & open systems

  • Density-matrix simulator (DensityMatrix) — open quantum systems with Kraus channels, Lindblad master-equation evolution, and channel metrics (process / average gate fidelity, Choi matrix, CPTP checks).
  • QEC under continuous noise — a code run against an independent bit-/phase-flip channel on every qubit, exactly, with CPTP syndrome recovery.
  • Quantum multiplier and a ripple-carry subtractor.

See CHANGELOG.md for the full list.

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.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.7.0):

  • ~1400 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:

  1. All tests pass
  2. Code follows PEP 8 style guidelines
  3. Documentation is updated
  4. 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.9.1 (latest on PyPI) · 0.9.0, 0.8.0 (previous)
Last Updated: August 2026

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantum_debugger-0.9.1.tar.gz (481.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quantum_debugger-0.9.1-py3-none-any.whl (602.5 kB view details)

Uploaded Python 3

File details

Details for the file quantum_debugger-0.9.1.tar.gz.

File metadata

  • Download URL: quantum_debugger-0.9.1.tar.gz
  • Upload date:
  • Size: 481.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quantum_debugger-0.9.1.tar.gz
Algorithm Hash digest
SHA256 8aad64f301df3e5260858aa5fddd3f271c30e0fe4e3b24e14a2210f776ad171f
MD5 2ec80ef91c11de23873e19ed9afb1096
BLAKE2b-256 07f61028aa58687723c1e5a3591dd40946e9c9a899883900a4c52663afd744bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantum_debugger-0.9.1.tar.gz:

Publisher: publish.yml on Raunakg2005/quantum-debugger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quantum_debugger-0.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for quantum_debugger-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d810125ca76afdc763eeda84a68c64311e0a1c11b85406fb736a033a485b8be4
MD5 bf410b2ebc952884ddd60f78f4cf81e9
BLAKE2b-256 207ad2b4799e6e74167f7268ace0321b1ae681b0be5137300436fb22cb0617ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantum_debugger-0.9.1-py3-none-any.whl:

Publisher: publish.yml on Raunakg2005/quantum-debugger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.1

2 files

1.0.0

2 files

This release

0.9.1 This release

2 files

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page