quantum-debugger 0.4.2__tar.gz → 0.5.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.
- {quantum_debugger-0.4.2/quantum_debugger.egg-info → quantum_debugger-0.5.0}/PKG-INFO +123 -39
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/README.md +122 -38
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/__init__.py +11 -0
- quantum_debugger-0.5.0/quantum_debugger/backends/gpu_backend.py +296 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/__init__.py +27 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/__init__.py +46 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/excitation_preserving.py +152 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/real_amplitudes.py +120 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/strongly_entangling.py +162 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/two_local.py +162 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/data/__init__.py +26 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/data/dataset.py +296 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/data/feature_maps.py +228 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/error_mitigation/__init__.py +15 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/error_mitigation/zne.py +250 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/hamiltonians/molecular.py +390 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/optimizers/__init__.py +24 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/optimizers/advanced.py +351 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/qnn/__init__.py +34 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/qnn/base.py +90 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/qnn/encoding.py +75 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/qnn/losses.py +114 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/qnn/network.py +324 -0
- quantum_debugger-0.5.0/quantum_debugger/qml/qnn/variational.py +95 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0/quantum_debugger.egg-info}/PKG-INFO +123 -39
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger.egg-info/SOURCES.txt +26 -1
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/setup.py +1 -1
- quantum_debugger-0.5.0/tests/integration/test_qiskit_integration.py +218 -0
- quantum_debugger-0.5.0/tests/qml/test_advanced_optimizers.py +278 -0
- quantum_debugger-0.5.0/tests/qml/test_ansatz_library.py +271 -0
- quantum_debugger-0.5.0/tests/qml/test_dataset.py +353 -0
- quantum_debugger-0.5.0/tests/qml/test_hamiltonians.py +304 -0
- quantum_debugger-0.5.0/tests/qml/test_qnn.py +283 -0
- quantum_debugger-0.5.0/tests/qml/test_zne.py +151 -0
- quantum_debugger-0.5.0/tests/unit/test_error_handling.py +261 -0
- quantum_debugger-0.5.0/tests/unit/test_performance.py +93 -0
- quantum_debugger-0.4.2/quantum_debugger/qml/__init__.py +0 -31
- quantum_debugger-0.4.2/quantum_debugger/qml/ansatz/__init__.py +0 -158
- quantum_debugger-0.4.2/quantum_debugger/qml/hamiltonians/molecular.py +0 -107
- quantum_debugger-0.4.2/quantum_debugger/qml/optimizers/__init__.py +0 -219
- quantum_debugger-0.4.2/tests/unit/test_v0.4.0_integration.py +0 -118
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/CHANGELOG.md +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/LICENSE +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/MANIFEST.in +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/bell_state_debug.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/benchmarks.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/grover_profiling.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/interactive_demo.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/qaoa_maxcut_example.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/qiskit_integration_demo.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/qml_basic_example.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/vqe_h2_example.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/base.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/cupy_backend.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/numba_backend.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/numpy_backend.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/sparse_backend.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/core/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/core/circuit.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/core/gates.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/core/quantum_state.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/debugger/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/debugger/breakpoints.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/debugger/debugger.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/debugger/inspector.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/integrations/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/integrations/cirq_adapter.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/integrations/qiskit_adapter.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/core/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/core/extrapolator.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/core/folder.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/zne.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/composite_noise.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/hardware_profiles.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/noise_helpers.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/noise_models.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/stochastic_sampler.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/parallel/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/parallel/executor.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/profiler/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/profiler/metrics.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/profiler/profiler.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/algorithms/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/algorithms/qaoa.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/algorithms/vqe.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/gates/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/gates/parameterized.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/hamiltonians/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/training/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/utils/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/utils/gradients.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/visualization/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/visualization/bloch_sphere.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/visualization/state_viz.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger.egg-info/dependency_links.txt +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger.egg-info/requires.txt +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger.egg-info/top_level.txt +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/requirements.txt +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/setup.cfg +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/cirq/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/cirq/test_cirq_advanced.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/cirq/test_cirq_edge_cases.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/cirq/test_cirq_integration.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/conftest.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/integration/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/integration/test_integration.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_edge_cases.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_properties.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_qaoa.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_qml_parameterized_gates.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_regression.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_training.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_vqe.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/CONVERSION_TRACKER.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/__init__.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_advanced.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backend_comprehensive.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backend_integration.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backends.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backends_advanced.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backends_comprehensive.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backends_fast.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_circuit_noise.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_circuit_noise_advanced.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_circuit_noise_unique.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_compatibility.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_comprehensive.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_distribution.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_docstrings.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_extreme.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_gpu_quick.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_hardware_profiles_extended.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_hardware_profiles_phase3.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_mitigation_comprehensive.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_mitigation_final.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_mitigation_observables.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_mitigation_zne.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_advanced.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_extreme.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_final.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_performance.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_quantum_info.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_ultimate.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_parallel.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_production.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qiskit_complex.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qiskit_extreme.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qiskit_ultra.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_advanced.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_comprehensive.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_memory.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_threading.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_tricky.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_quickstart.py +0 -0
- {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantum-debugger
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Interactive quantum circuit debugger and Quantum Machine Learning library with VQE, QAOA, and parameterized gates
|
|
5
5
|
Home-page: https://github.com/Raunakg2005/quantum-debugger
|
|
6
6
|
Author: Raunak Kumar Gupta
|
|
@@ -55,37 +55,49 @@ Dynamic: summary
|
|
|
55
55
|
**Interactive debugger, profiler, and quantum machine learning library for quantum circuits**
|
|
56
56
|
|
|
57
57
|
[](https://pypi.org/project/quantum-debugger/)
|
|
58
|
-
[](https://github.com/Raunakg2005/quantum-debugger/blob/main/tests/FINAL_TEST_SUMMARY.md)
|
|
59
59
|
[]()
|
|
60
60
|
[]()
|
|
61
61
|
|
|
62
62
|
A powerful Python library for quantum circuit debugging, state inspection, performance analysis, and **quantum machine learning**. Now with VQE, QAOA, and parameterized quantum circuits!
|
|
63
63
|
|
|
64
|
-
## ✨ What's New in v0.
|
|
64
|
+
## ✨ What's New in v0.5.0
|
|
65
65
|
|
|
66
|
-
**Quantum Machine Learning
|
|
66
|
+
**Advanced Quantum Machine Learning** 🚀
|
|
67
67
|
|
|
68
68
|
```python
|
|
69
|
-
|
|
69
|
+
# NEW: Quantum Neural Networks
|
|
70
|
+
from quantum_debugger.qml.qnn import QuantumNeuralNetwork, EncodingLayer, VariationalLayer
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
qnn = QuantumNeuralNetwork(n_qubits=4)
|
|
73
|
+
qnn.add(EncodingLayer(4, feature_map='zz'))
|
|
74
|
+
qnn.add(VariationalLayer(4, ansatz='real_amplitudes', reps=2))
|
|
75
|
+
qnn.compile(optimizer='adam', loss='mse', learning_rate=0.01)
|
|
76
|
+
history = qnn.fit(X_train, y_train, epochs=50, batch_size=16)
|
|
77
|
+
|
|
78
|
+
# NEW: Zero-Noise Extrapolation (Error Mitigation)
|
|
79
|
+
from quantum_debugger.qml.error_mitigation import ZeroNoiseExtrapolation
|
|
80
|
+
|
|
81
|
+
zne = ZeroNoiseExtrapolation(scale_factors=[1.0, 2.0, 3.0])
|
|
82
|
+
mitigated_value = zne.execute(circuit_function)
|
|
83
|
+
|
|
84
|
+
# NEW: GPU Acceleration
|
|
85
|
+
from quantum_debugger.backends import GPUBackend
|
|
86
|
+
|
|
87
|
+
backend = GPUBackend() # Auto-detects GPU, falls back to CPU
|
|
88
|
+
state = backend.allocate_state(n_qubits=15) # 2-5x faster on GPU
|
|
77
89
|
```
|
|
78
90
|
|
|
79
|
-
**
|
|
80
|
-
- ✅ **
|
|
81
|
-
- ✅ **
|
|
82
|
-
- ✅ **
|
|
83
|
-
- ✅ **
|
|
84
|
-
- ✅ **
|
|
85
|
-
- ✅ **
|
|
86
|
-
- ✅ **
|
|
87
|
-
- ✅ **
|
|
88
|
-
- ✅ **
|
|
91
|
+
**v0.5.0 Features:**
|
|
92
|
+
- ✅ **Quantum Neural Networks** (Layer-based QML with batch training)
|
|
93
|
+
- ✅ **Zero-Noise Extrapolation** (Error mitigation for noisy circuits)
|
|
94
|
+
- ✅ **GPU Acceleration** (CuPy integration with automatic CPU fallback)
|
|
95
|
+
- ✅ **Advanced Ansätze** (4 new templates: RealAmplitudes, TwoLocal, etc.)
|
|
96
|
+
- ✅ **Dataset Integration** (CSV/JSON loading, preprocessing, feature maps)
|
|
97
|
+
- ✅ **Molecular Hamiltonians** (LiH, H2O, BeH2 with accurate energies)
|
|
98
|
+
- ✅ **Advanced Optimizers** (QNG, Nelder-Mead, L-BFGS-B)
|
|
99
|
+
- ✅ **190+ comprehensive tests** (all passing ✅)
|
|
100
|
+
- ✅ **Professional documentation** (7 detailed guides)
|
|
89
101
|
|
|
90
102
|
See full [QML Documentation](#quantum-machine-learning-v040) below.
|
|
91
103
|
|
|
@@ -99,12 +111,14 @@ See full [QML Documentation](#quantum-machine-learning-v040) below.
|
|
|
99
111
|
- **Noise Simulation** - Realistic hardware noise models
|
|
100
112
|
- **Qiskit Integration** - Import/export circuits from Qiskit
|
|
101
113
|
|
|
102
|
-
### Quantum Machine Learning (v0.
|
|
103
|
-
- **
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
106
|
-
- **
|
|
107
|
-
- **
|
|
114
|
+
### Quantum Machine Learning (v0.5.0)
|
|
115
|
+
- **Quantum Neural Networks** - Layer-based deep learning on quantum hardware
|
|
116
|
+
- **Error Mitigation** - Zero-noise extrapolation for accurate results
|
|
117
|
+
- **GPU Acceleration** - Hardware-accelerated simulations (2-5x speedup)
|
|
118
|
+
- **VQE & QAOA** - Molecular chemistry and optimization
|
|
119
|
+
- **Advanced Optimizers** - 7 optimizers including quantum natural gradient
|
|
120
|
+
- **Ansätze Library** - 8 pre-built quantum circuit templates
|
|
121
|
+
- **Dataset Tools** - Loading, preprocessing, quantum feature encoding
|
|
108
122
|
|
|
109
123
|
## Quick Start
|
|
110
124
|
|
|
@@ -146,7 +160,77 @@ rx.parameter = 0.7
|
|
|
146
160
|
new_matrix = rx.matrix() # Automatically cached for performance
|
|
147
161
|
```
|
|
148
162
|
|
|
149
|
-
##
|
|
163
|
+
## v0.5.0 Feature Spotlight
|
|
164
|
+
|
|
165
|
+
### 1. Quantum Neural Networks
|
|
166
|
+
|
|
167
|
+
Build and train quantum machine learning models:
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
from quantum_debugger.qml.qnn import (
|
|
171
|
+
QuantumNeuralNetwork,
|
|
172
|
+
EncodingLayer,
|
|
173
|
+
VariationalLayer
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
# Create network
|
|
177
|
+
qnn = QuantumNeuralNetwork(n_qubits=4)
|
|
178
|
+
qnn.add(EncodingLayer(4, feature_map='zz'))
|
|
179
|
+
qnn.add(VariationalLayer(4, ansatz='real_amplitudes', reps=2))
|
|
180
|
+
|
|
181
|
+
# Train
|
|
182
|
+
qnn.compile(optimizer='adam', loss='mse')
|
|
183
|
+
history = qnn.fit(X_train, y_train, epochs=50, batch_size=16)
|
|
184
|
+
|
|
185
|
+
# Predict
|
|
186
|
+
predictions = qnn.predict(X_test)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
📖 **Documentation:** [QNN Guide](docs/qnn_guide.md)
|
|
190
|
+
|
|
191
|
+
### 2. Zero-Noise Extrapolation (Error Mitigation)
|
|
192
|
+
|
|
193
|
+
Reduce quantum noise effects:
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
from quantum_debugger.qml.error_mitigation import ZeroNoiseExtrapolation
|
|
197
|
+
|
|
198
|
+
# Setup ZNE
|
|
199
|
+
zne = ZeroNoiseExtrapolation(
|
|
200
|
+
scale_factors=[1.0, 2.0, 3.0],
|
|
201
|
+
extrapolator='polynomial'
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
# Apply to circuit
|
|
205
|
+
mitigated_result = zne.execute(circuit_function)
|
|
206
|
+
|
|
207
|
+
# Check improvement
|
|
208
|
+
improvement = zne.get_improvement()
|
|
209
|
+
print(f"Error reduced by {improvement:.1f}%")
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
📖 **Documentation:** [ZNE Guide](docs/zne_guide.md)
|
|
213
|
+
|
|
214
|
+
### 3. GPU Acceleration
|
|
215
|
+
|
|
216
|
+
Hardware-accelerated quantum simulations:
|
|
217
|
+
|
|
218
|
+
```python
|
|
219
|
+
from quantum_debugger.backends import GPUBackend
|
|
220
|
+
|
|
221
|
+
# Auto-detect GPU (falls back to CPU)
|
|
222
|
+
backend = GPUBackend()
|
|
223
|
+
|
|
224
|
+
# Allocate on GPU
|
|
225
|
+
state = backend.allocate_state(n_qubits=15)
|
|
226
|
+
|
|
227
|
+
# 2-5x faster for large circuits
|
|
228
|
+
# Transparent API - same code for CPU/GPU
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
📖 **Documentation:** [GPU Guide](docs/gpu_guide.md)
|
|
232
|
+
|
|
233
|
+
## Quantum Machine Learning (v0.4.0+)
|
|
150
234
|
|
|
151
235
|
### 1. Parameterized Gates
|
|
152
236
|
|
|
@@ -364,16 +448,16 @@ See [test files](.) for details.
|
|
|
364
448
|
## 📖 Documentation
|
|
365
449
|
|
|
366
450
|
- **Tutorials:**
|
|
367
|
-
- [Parameterized Gates Tutorial](
|
|
368
|
-
- [VQE Preparation Guide](
|
|
369
|
-
- [QAOA Tutorial](
|
|
370
|
-
- [Noise Tutorial](
|
|
371
|
-
- [ZNE Tutorial](
|
|
451
|
+
- [Parameterized Gates Tutorial](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/parameterized_gates_tutorial.md)
|
|
452
|
+
- [VQE Preparation Guide](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/vqe_preparation.md)
|
|
453
|
+
- [QAOA Tutorial](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/qaoa_tutorial.md)
|
|
454
|
+
- [Noise Tutorial](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/noise_tutorial.md)
|
|
455
|
+
- [ZNE Tutorial](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/zne_tutorial.md)
|
|
372
456
|
|
|
373
457
|
- **Examples:**
|
|
374
|
-
- [VQE H2 Molecule](
|
|
375
|
-
- [QAOA MaxCut](
|
|
376
|
-
- [QML Basic Example](
|
|
458
|
+
- [VQE H2 Molecule](https://github.com/Raunakg2005/quantum-debugger/blob/main/examples/vqe_h2_example.py)
|
|
459
|
+
- [QAOA MaxCut](https://github.com/Raunakg2005/quantum-debugger/blob/main/examples/qaoa_maxcut_example.py)
|
|
460
|
+
- [QML Basic Example](https://github.com/Raunakg2005/quantum-debugger/blob/main/examples/qml_basic_example.py)
|
|
377
461
|
|
|
378
462
|
## 📈 Version History
|
|
379
463
|
|
|
@@ -446,8 +530,8 @@ pytest tests/unit/test_hardware_profiles_phase3.py -v
|
|
|
446
530
|
```
|
|
447
531
|
|
|
448
532
|
### Test Documentation
|
|
449
|
-
- 📊 [Complete Test Summary](
|
|
450
|
-
- 📁 [Test Structure](
|
|
533
|
+
- 📊 [Complete Test Summary](https://github.com/Raunakg2005/quantum-debugger/blob/main/tests/FINAL_TEST_SUMMARY.md) - Full breakdown of all 656 tests
|
|
534
|
+
- 📁 [Test Structure](https://github.com/Raunakg2005/quantum-debugger/blob/main/tests/README.md) - Organization and conventions
|
|
451
535
|
|
|
452
536
|
### Test Categories
|
|
453
537
|
1. **Backend Tests** (59 tests) - NumPy, Sparse, GPU backends
|
|
@@ -469,7 +553,7 @@ See [Testing Section](#testing) for details.
|
|
|
469
553
|
|
|
470
554
|
## 📄 License
|
|
471
555
|
|
|
472
|
-
MIT License - see [LICENSE](
|
|
556
|
+
MIT License - see [LICENSE](https://github.com/Raunakg2005/quantum-debugger/blob/main/LICENSE) file.
|
|
473
557
|
|
|
474
558
|
---
|
|
475
559
|
|
|
@@ -3,37 +3,49 @@
|
|
|
3
3
|
**Interactive debugger, profiler, and quantum machine learning library for quantum circuits**
|
|
4
4
|
|
|
5
5
|
[](https://pypi.org/project/quantum-debugger/)
|
|
6
|
-
[](https://github.com/Raunakg2005/quantum-debugger/blob/main/tests/FINAL_TEST_SUMMARY.md)
|
|
7
7
|
[]()
|
|
8
8
|
[]()
|
|
9
9
|
|
|
10
10
|
A powerful Python library for quantum circuit debugging, state inspection, performance analysis, and **quantum machine learning**. Now with VQE, QAOA, and parameterized quantum circuits!
|
|
11
11
|
|
|
12
|
-
## ✨ What's New in v0.
|
|
12
|
+
## ✨ What's New in v0.5.0
|
|
13
13
|
|
|
14
|
-
**Quantum Machine Learning
|
|
14
|
+
**Advanced Quantum Machine Learning** 🚀
|
|
15
15
|
|
|
16
16
|
```python
|
|
17
|
-
|
|
17
|
+
# NEW: Quantum Neural Networks
|
|
18
|
+
from quantum_debugger.qml.qnn import QuantumNeuralNetwork, EncodingLayer, VariationalLayer
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
qnn = QuantumNeuralNetwork(n_qubits=4)
|
|
21
|
+
qnn.add(EncodingLayer(4, feature_map='zz'))
|
|
22
|
+
qnn.add(VariationalLayer(4, ansatz='real_amplitudes', reps=2))
|
|
23
|
+
qnn.compile(optimizer='adam', loss='mse', learning_rate=0.01)
|
|
24
|
+
history = qnn.fit(X_train, y_train, epochs=50, batch_size=16)
|
|
25
|
+
|
|
26
|
+
# NEW: Zero-Noise Extrapolation (Error Mitigation)
|
|
27
|
+
from quantum_debugger.qml.error_mitigation import ZeroNoiseExtrapolation
|
|
28
|
+
|
|
29
|
+
zne = ZeroNoiseExtrapolation(scale_factors=[1.0, 2.0, 3.0])
|
|
30
|
+
mitigated_value = zne.execute(circuit_function)
|
|
31
|
+
|
|
32
|
+
# NEW: GPU Acceleration
|
|
33
|
+
from quantum_debugger.backends import GPUBackend
|
|
34
|
+
|
|
35
|
+
backend = GPUBackend() # Auto-detects GPU, falls back to CPU
|
|
36
|
+
state = backend.allocate_state(n_qubits=15) # 2-5x faster on GPU
|
|
25
37
|
```
|
|
26
38
|
|
|
27
|
-
**
|
|
28
|
-
- ✅ **
|
|
29
|
-
- ✅ **
|
|
30
|
-
- ✅ **
|
|
31
|
-
- ✅ **
|
|
32
|
-
- ✅ **
|
|
33
|
-
- ✅ **
|
|
34
|
-
- ✅ **
|
|
35
|
-
- ✅ **
|
|
36
|
-
- ✅ **
|
|
39
|
+
**v0.5.0 Features:**
|
|
40
|
+
- ✅ **Quantum Neural Networks** (Layer-based QML with batch training)
|
|
41
|
+
- ✅ **Zero-Noise Extrapolation** (Error mitigation for noisy circuits)
|
|
42
|
+
- ✅ **GPU Acceleration** (CuPy integration with automatic CPU fallback)
|
|
43
|
+
- ✅ **Advanced Ansätze** (4 new templates: RealAmplitudes, TwoLocal, etc.)
|
|
44
|
+
- ✅ **Dataset Integration** (CSV/JSON loading, preprocessing, feature maps)
|
|
45
|
+
- ✅ **Molecular Hamiltonians** (LiH, H2O, BeH2 with accurate energies)
|
|
46
|
+
- ✅ **Advanced Optimizers** (QNG, Nelder-Mead, L-BFGS-B)
|
|
47
|
+
- ✅ **190+ comprehensive tests** (all passing ✅)
|
|
48
|
+
- ✅ **Professional documentation** (7 detailed guides)
|
|
37
49
|
|
|
38
50
|
See full [QML Documentation](#quantum-machine-learning-v040) below.
|
|
39
51
|
|
|
@@ -47,12 +59,14 @@ See full [QML Documentation](#quantum-machine-learning-v040) below.
|
|
|
47
59
|
- **Noise Simulation** - Realistic hardware noise models
|
|
48
60
|
- **Qiskit Integration** - Import/export circuits from Qiskit
|
|
49
61
|
|
|
50
|
-
### Quantum Machine Learning (v0.
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
54
|
-
- **
|
|
55
|
-
- **
|
|
62
|
+
### Quantum Machine Learning (v0.5.0)
|
|
63
|
+
- **Quantum Neural Networks** - Layer-based deep learning on quantum hardware
|
|
64
|
+
- **Error Mitigation** - Zero-noise extrapolation for accurate results
|
|
65
|
+
- **GPU Acceleration** - Hardware-accelerated simulations (2-5x speedup)
|
|
66
|
+
- **VQE & QAOA** - Molecular chemistry and optimization
|
|
67
|
+
- **Advanced Optimizers** - 7 optimizers including quantum natural gradient
|
|
68
|
+
- **Ansätze Library** - 8 pre-built quantum circuit templates
|
|
69
|
+
- **Dataset Tools** - Loading, preprocessing, quantum feature encoding
|
|
56
70
|
|
|
57
71
|
## Quick Start
|
|
58
72
|
|
|
@@ -94,7 +108,77 @@ rx.parameter = 0.7
|
|
|
94
108
|
new_matrix = rx.matrix() # Automatically cached for performance
|
|
95
109
|
```
|
|
96
110
|
|
|
97
|
-
##
|
|
111
|
+
## v0.5.0 Feature Spotlight
|
|
112
|
+
|
|
113
|
+
### 1. Quantum Neural Networks
|
|
114
|
+
|
|
115
|
+
Build and train quantum machine learning models:
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
from quantum_debugger.qml.qnn import (
|
|
119
|
+
QuantumNeuralNetwork,
|
|
120
|
+
EncodingLayer,
|
|
121
|
+
VariationalLayer
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
# Create network
|
|
125
|
+
qnn = QuantumNeuralNetwork(n_qubits=4)
|
|
126
|
+
qnn.add(EncodingLayer(4, feature_map='zz'))
|
|
127
|
+
qnn.add(VariationalLayer(4, ansatz='real_amplitudes', reps=2))
|
|
128
|
+
|
|
129
|
+
# Train
|
|
130
|
+
qnn.compile(optimizer='adam', loss='mse')
|
|
131
|
+
history = qnn.fit(X_train, y_train, epochs=50, batch_size=16)
|
|
132
|
+
|
|
133
|
+
# Predict
|
|
134
|
+
predictions = qnn.predict(X_test)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
📖 **Documentation:** [QNN Guide](docs/qnn_guide.md)
|
|
138
|
+
|
|
139
|
+
### 2. Zero-Noise Extrapolation (Error Mitigation)
|
|
140
|
+
|
|
141
|
+
Reduce quantum noise effects:
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from quantum_debugger.qml.error_mitigation import ZeroNoiseExtrapolation
|
|
145
|
+
|
|
146
|
+
# Setup ZNE
|
|
147
|
+
zne = ZeroNoiseExtrapolation(
|
|
148
|
+
scale_factors=[1.0, 2.0, 3.0],
|
|
149
|
+
extrapolator='polynomial'
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
# Apply to circuit
|
|
153
|
+
mitigated_result = zne.execute(circuit_function)
|
|
154
|
+
|
|
155
|
+
# Check improvement
|
|
156
|
+
improvement = zne.get_improvement()
|
|
157
|
+
print(f"Error reduced by {improvement:.1f}%")
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
📖 **Documentation:** [ZNE Guide](docs/zne_guide.md)
|
|
161
|
+
|
|
162
|
+
### 3. GPU Acceleration
|
|
163
|
+
|
|
164
|
+
Hardware-accelerated quantum simulations:
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
from quantum_debugger.backends import GPUBackend
|
|
168
|
+
|
|
169
|
+
# Auto-detect GPU (falls back to CPU)
|
|
170
|
+
backend = GPUBackend()
|
|
171
|
+
|
|
172
|
+
# Allocate on GPU
|
|
173
|
+
state = backend.allocate_state(n_qubits=15)
|
|
174
|
+
|
|
175
|
+
# 2-5x faster for large circuits
|
|
176
|
+
# Transparent API - same code for CPU/GPU
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
📖 **Documentation:** [GPU Guide](docs/gpu_guide.md)
|
|
180
|
+
|
|
181
|
+
## Quantum Machine Learning (v0.4.0+)
|
|
98
182
|
|
|
99
183
|
### 1. Parameterized Gates
|
|
100
184
|
|
|
@@ -312,16 +396,16 @@ See [test files](.) for details.
|
|
|
312
396
|
## 📖 Documentation
|
|
313
397
|
|
|
314
398
|
- **Tutorials:**
|
|
315
|
-
- [Parameterized Gates Tutorial](
|
|
316
|
-
- [VQE Preparation Guide](
|
|
317
|
-
- [QAOA Tutorial](
|
|
318
|
-
- [Noise Tutorial](
|
|
319
|
-
- [ZNE Tutorial](
|
|
399
|
+
- [Parameterized Gates Tutorial](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/parameterized_gates_tutorial.md)
|
|
400
|
+
- [VQE Preparation Guide](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/vqe_preparation.md)
|
|
401
|
+
- [QAOA Tutorial](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/qaoa_tutorial.md)
|
|
402
|
+
- [Noise Tutorial](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/noise_tutorial.md)
|
|
403
|
+
- [ZNE Tutorial](https://github.com/Raunakg2005/quantum-debugger/blob/main/tutorials/zne_tutorial.md)
|
|
320
404
|
|
|
321
405
|
- **Examples:**
|
|
322
|
-
- [VQE H2 Molecule](
|
|
323
|
-
- [QAOA MaxCut](
|
|
324
|
-
- [QML Basic Example](
|
|
406
|
+
- [VQE H2 Molecule](https://github.com/Raunakg2005/quantum-debugger/blob/main/examples/vqe_h2_example.py)
|
|
407
|
+
- [QAOA MaxCut](https://github.com/Raunakg2005/quantum-debugger/blob/main/examples/qaoa_maxcut_example.py)
|
|
408
|
+
- [QML Basic Example](https://github.com/Raunakg2005/quantum-debugger/blob/main/examples/qml_basic_example.py)
|
|
325
409
|
|
|
326
410
|
## 📈 Version History
|
|
327
411
|
|
|
@@ -394,8 +478,8 @@ pytest tests/unit/test_hardware_profiles_phase3.py -v
|
|
|
394
478
|
```
|
|
395
479
|
|
|
396
480
|
### Test Documentation
|
|
397
|
-
- 📊 [Complete Test Summary](
|
|
398
|
-
- 📁 [Test Structure](
|
|
481
|
+
- 📊 [Complete Test Summary](https://github.com/Raunakg2005/quantum-debugger/blob/main/tests/FINAL_TEST_SUMMARY.md) - Full breakdown of all 656 tests
|
|
482
|
+
- 📁 [Test Structure](https://github.com/Raunakg2005/quantum-debugger/blob/main/tests/README.md) - Organization and conventions
|
|
399
483
|
|
|
400
484
|
### Test Categories
|
|
401
485
|
1. **Backend Tests** (59 tests) - NumPy, Sparse, GPU backends
|
|
@@ -417,7 +501,7 @@ See [Testing Section](#testing) for details.
|
|
|
417
501
|
|
|
418
502
|
## 📄 License
|
|
419
503
|
|
|
420
|
-
MIT License - see [LICENSE](
|
|
504
|
+
MIT License - see [LICENSE](https://github.com/Raunakg2005/quantum-debugger/blob/main/LICENSE) file.
|
|
421
505
|
|
|
422
506
|
---
|
|
423
507
|
|
|
@@ -123,3 +123,14 @@ if HAS_SPARSE:
|
|
|
123
123
|
|
|
124
124
|
if HAS_CUPY:
|
|
125
125
|
__all__.append('CuPyBackend')
|
|
126
|
+
|
|
127
|
+
# Add GPU backend
|
|
128
|
+
try:
|
|
129
|
+
from .gpu_backend import (
|
|
130
|
+
GPUBackend,
|
|
131
|
+
get_optimal_backend,
|
|
132
|
+
benchmark_backends
|
|
133
|
+
)
|
|
134
|
+
__all__.extend(['GPUBackend', 'get_optimal_backend', 'benchmark_backends'])
|
|
135
|
+
except ImportError:
|
|
136
|
+
pass
|