Skip to main content

Quantum Debugger

The Most Comprehensive Quantum Machine Learning Library with AutoML

Documentation Status PyPI version Tests CI Codecov Python License

What's New in v1.1.0

Theme: Quantum Singular Value Transformation (QSVT) & Modern Algorithm Primitives — the grand unification framework behind modern quantum algorithms, verified bottom-up to machine precision:

  • Quantum Signal Processing (QSP) (qsp_unitary, qsp_response, chebyshev_via_qsp, signal_operator) — one-qubit signal transformation engine producing designable polynomials via interleaved signal and phase rotations. Zero phases recover Chebyshev polynomials $T_d(x)$ to machine precision.
  • Block Encoding & Qubitization (block_encode, qubitization_walk, chebyshev_of_matrix) — embedding arbitrary non-unitary Hermitian matrices into unitaries ($\langle 0|U|0\rangle = A$), with the qubitization walk generating matrix Chebyshev polynomials $T_d(A) = \langle 0|W^d|0\rangle$.
  • Linear Combination of Unitaries (LCU) (lcu_block_encoding, lcu_matrix) — exact PREPARE and SELECT state preparation for Pauli expansions and Hamiltonians ($H = \sum \alpha_k U_k$).
  • Quantum Singular Value Transformation (QSVT) (qsvt_transform, qsvt_scalar_response) — the grand unification paradigm, applying polynomial matrix functions eigenvalue-by-eigenvalue ($P(A) = \sum_i P(\lambda_i)|v_i\rangle\langle v_i|$).
  • Quantum Linear Systems via QSVT (solve_linear_system_qsvt, matrix_inverse_qsvt) — optimal polynomial inversion solving $A x = b$ without phase estimation, matching exact classical solutions.
  • Matrix Functions & Hamiltonian Simulation (matrix_function_chebyshev, hamiltonian_simulation_qsvt, matrix_exp_qsvt, matrix_log_qsvt, matrix_sqrt_qsvt) — smooth matrix functions and real-time unitary evolution $e^{-i H t}$ with geometric Chebyshev convergence.
  • Spectral Filtering & Projectors (spectral_projector_qsvt, ground_state_projector_qsvt, bandpass_filter_qsvt, pseudo_inverse_qsvt) — ground-state projection, sign functions, and regularized inverses.
  • Kernel Polynomial Method (KPM) & Spectral Estimation (spectral_moments, density_of_states_kpm, eigenvalue_count_in_interval, trace_of_function) — Jackson-damped Chebyshev moment estimation of density of states and eigenvalue counting without full diagonalization.
  • Amplitude Amplification as QSVT (amplitude_amplification_qsvt) — generalized Grover search unified under odd Chebyshev polynomials.

See the QSVT Guide, Online Documentation, and CHANGELOG.md.

What's New in v1.0.0

Scale & tensor networks — breaking the exponential state-vector wall:

  • Matrix Product State Simulator (MPS) — O(n·χ²) memory instead of 2ⁿ. Represents large, lightly-entangled quantum systems (e.g. 100-qubit GHZ states, area-law ground states) with exact single-qubit gates, SVD-truncated two-qubit gates, and long-range connectivity via SWAP networks.
  • Matrix Product Operators (MPO) — compact tensor chains for TFIM (tfim_mpo) and Heisenberg (heisenberg_mpo) models; evaluate <ψ|H|ψ> in O(n·χ²·D²) time without dense matrices.
  • TEBD Real-Time Dynamics (tebd_tfim, tebd_magnetization) — Trotterized time evolution on the MPS engine with automatic SVD bond truncation.
  • Imaginary-Time DMRG-Style Ground States (imaginary_tebd_ground_state) — cool MPS into true ground states on 24+ qubit chains unreachable by dense diagonalizers.
  • Arbitrary Pauli & Energy Readout — MPS.expectation_pauli and MPS.energy evaluate arbitrary Pauli strings and Hamiltonians by tensor contraction.
  • Born-Rule Measurement Sampling (MPS.sample) — sequential conditional sampling with precomputed environments, drawing shots directly from the MPS.
  • Circuit-to-MPS Converter (MPS.from_circuit) — execute QuantumCircuit instances directly on the tensor-network engine.

See the Matrix Product States Guide and CHANGELOG.md.

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

Full Documentation & API Reference: https://quantum-debugger.readthedocs.io/en/latest/

Key Guides:

Testing

# Run all tests
pytest tests/ -v

# Run QSVT & modern primitives suite
pytest tests/test_qsvt.py tests/test_qsvt_applications.py tests/test_qsvt_linear_systems.py tests/test_qsp.py tests/test_block_encoding.py tests/test_lcu.py tests/test_matrix_functions.py -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 tests/README.md for detailed test information.

Test Statistics (v1.1.0):

  • 2,468 comprehensive tests passing across the repository (100% pass rate)
  • Complete coverage of QSVT, QSP, LCU, block encoding, MPS, stabilizer, open systems, QML, and circuit optimization
  • GPU-hardware tests require a working CUDA + CuPy install; they skip gracefully otherwise

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: Interactive Circuit Debugging, Multi-Engine Simulation, and Quantum Machine Learning Framework},
  author = {Raunak Kumar Gupta},
  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

Documentation (ReadTheDocs): https://quantum-debugger.readthedocs.io/en/latest/
PyPI: https://pypi.org/project/quantum-debugger/
GitHub: https://github.com/Raunakg2005/quantum-debugger
Issues: https://github.com/Raunakg2005/quantum-debugger/issues


Version: 1.1.0 (latest) · 1.0.1, 1.0.0, 0.9.1, 0.9.0 (previous)
Last Updated: October 2026

Metadata

Release files for quantum-debugger 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quantum-debugger 1.1.0
File Size Uploaded Provenance Actions
quantum_debugger-1.1.0.tar.gz 527.7 kB With provenance Details for quantum_debugger-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quantum-debugger 1.1.0
File Interpreter ABI Platform Actions
quantum_debugger-1.1.0-py3-none-any.whl Python 3 none any Details for quantum_debugger-1.1.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / quantum_debugger-1.1.0.tar.gz

Download URL quantum_debugger-1.1.0.tar.gz
Size 527.7 kB
Tags Source
SHA-256 checksum
How to use checksums
34d51671999b13033b60f9e58ac8573a949cd2a9e02df3e6fbfab6d70be0c465
BLAKE2b-256 checksum
How to use checksums
d9da985edced673657a43ec1e1b1599b2b281f0f05588e8a6f8dc566a911be02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / quantum_debugger-1.1.0-py3-none-any.whl

Download URL quantum_debugger-1.1.0-py3-none-any.whl
Size 650.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7733f160c4f0bc1e17649957594ab3e3fe6c7a0892886f03702bc96eeaebcff
BLAKE2b-256 checksum
How to use checksums
671610b668ad6e6cacf4e806be926371b2ecfa745d7b1c4bb9d288a88105f5c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Security for quantum-debugger 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for quantum_debugger-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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