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.
Files changed (161) hide show
  1. {quantum_debugger-0.4.2/quantum_debugger.egg-info → quantum_debugger-0.5.0}/PKG-INFO +123 -39
  2. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/README.md +122 -38
  3. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/__init__.py +11 -0
  4. quantum_debugger-0.5.0/quantum_debugger/backends/gpu_backend.py +296 -0
  5. quantum_debugger-0.5.0/quantum_debugger/qml/__init__.py +27 -0
  6. quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/__init__.py +46 -0
  7. quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/excitation_preserving.py +152 -0
  8. quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/real_amplitudes.py +120 -0
  9. quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/strongly_entangling.py +162 -0
  10. quantum_debugger-0.5.0/quantum_debugger/qml/ansatz/two_local.py +162 -0
  11. quantum_debugger-0.5.0/quantum_debugger/qml/data/__init__.py +26 -0
  12. quantum_debugger-0.5.0/quantum_debugger/qml/data/dataset.py +296 -0
  13. quantum_debugger-0.5.0/quantum_debugger/qml/data/feature_maps.py +228 -0
  14. quantum_debugger-0.5.0/quantum_debugger/qml/error_mitigation/__init__.py +15 -0
  15. quantum_debugger-0.5.0/quantum_debugger/qml/error_mitigation/zne.py +250 -0
  16. quantum_debugger-0.5.0/quantum_debugger/qml/hamiltonians/molecular.py +390 -0
  17. quantum_debugger-0.5.0/quantum_debugger/qml/optimizers/__init__.py +24 -0
  18. quantum_debugger-0.5.0/quantum_debugger/qml/optimizers/advanced.py +351 -0
  19. quantum_debugger-0.5.0/quantum_debugger/qml/qnn/__init__.py +34 -0
  20. quantum_debugger-0.5.0/quantum_debugger/qml/qnn/base.py +90 -0
  21. quantum_debugger-0.5.0/quantum_debugger/qml/qnn/encoding.py +75 -0
  22. quantum_debugger-0.5.0/quantum_debugger/qml/qnn/losses.py +114 -0
  23. quantum_debugger-0.5.0/quantum_debugger/qml/qnn/network.py +324 -0
  24. quantum_debugger-0.5.0/quantum_debugger/qml/qnn/variational.py +95 -0
  25. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0/quantum_debugger.egg-info}/PKG-INFO +123 -39
  26. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger.egg-info/SOURCES.txt +26 -1
  27. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/setup.py +1 -1
  28. quantum_debugger-0.5.0/tests/integration/test_qiskit_integration.py +218 -0
  29. quantum_debugger-0.5.0/tests/qml/test_advanced_optimizers.py +278 -0
  30. quantum_debugger-0.5.0/tests/qml/test_ansatz_library.py +271 -0
  31. quantum_debugger-0.5.0/tests/qml/test_dataset.py +353 -0
  32. quantum_debugger-0.5.0/tests/qml/test_hamiltonians.py +304 -0
  33. quantum_debugger-0.5.0/tests/qml/test_qnn.py +283 -0
  34. quantum_debugger-0.5.0/tests/qml/test_zne.py +151 -0
  35. quantum_debugger-0.5.0/tests/unit/test_error_handling.py +261 -0
  36. quantum_debugger-0.5.0/tests/unit/test_performance.py +93 -0
  37. quantum_debugger-0.4.2/quantum_debugger/qml/__init__.py +0 -31
  38. quantum_debugger-0.4.2/quantum_debugger/qml/ansatz/__init__.py +0 -158
  39. quantum_debugger-0.4.2/quantum_debugger/qml/hamiltonians/molecular.py +0 -107
  40. quantum_debugger-0.4.2/quantum_debugger/qml/optimizers/__init__.py +0 -219
  41. quantum_debugger-0.4.2/tests/unit/test_v0.4.0_integration.py +0 -118
  42. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/CHANGELOG.md +0 -0
  43. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/LICENSE +0 -0
  44. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/MANIFEST.in +0 -0
  45. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/bell_state_debug.py +0 -0
  46. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/benchmarks.py +0 -0
  47. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/grover_profiling.py +0 -0
  48. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/interactive_demo.py +0 -0
  49. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/qaoa_maxcut_example.py +0 -0
  50. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/qiskit_integration_demo.py +0 -0
  51. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/qml_basic_example.py +0 -0
  52. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/examples/vqe_h2_example.py +0 -0
  53. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/__init__.py +0 -0
  54. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/base.py +0 -0
  55. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/cupy_backend.py +0 -0
  56. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/numba_backend.py +0 -0
  57. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/numpy_backend.py +0 -0
  58. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/backends/sparse_backend.py +0 -0
  59. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/core/__init__.py +0 -0
  60. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/core/circuit.py +0 -0
  61. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/core/gates.py +0 -0
  62. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/core/quantum_state.py +0 -0
  63. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/debugger/__init__.py +0 -0
  64. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/debugger/breakpoints.py +0 -0
  65. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/debugger/debugger.py +0 -0
  66. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/debugger/inspector.py +0 -0
  67. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/integrations/__init__.py +0 -0
  68. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/integrations/cirq_adapter.py +0 -0
  69. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/integrations/qiskit_adapter.py +0 -0
  70. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/__init__.py +0 -0
  71. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/core/__init__.py +0 -0
  72. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/core/extrapolator.py +0 -0
  73. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/core/folder.py +0 -0
  74. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/mitigation/zne.py +0 -0
  75. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/__init__.py +0 -0
  76. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/composite_noise.py +0 -0
  77. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/hardware_profiles.py +0 -0
  78. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/noise_helpers.py +0 -0
  79. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/noise_models.py +0 -0
  80. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/noise/stochastic_sampler.py +0 -0
  81. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/parallel/__init__.py +0 -0
  82. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/parallel/executor.py +0 -0
  83. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/profiler/__init__.py +0 -0
  84. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/profiler/metrics.py +0 -0
  85. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/profiler/profiler.py +0 -0
  86. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/algorithms/__init__.py +0 -0
  87. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/algorithms/qaoa.py +0 -0
  88. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/algorithms/vqe.py +0 -0
  89. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/gates/__init__.py +0 -0
  90. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/gates/parameterized.py +0 -0
  91. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/hamiltonians/__init__.py +0 -0
  92. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/training/__init__.py +0 -0
  93. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/utils/__init__.py +0 -0
  94. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/qml/utils/gradients.py +0 -0
  95. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/visualization/__init__.py +0 -0
  96. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/visualization/bloch_sphere.py +0 -0
  97. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger/visualization/state_viz.py +0 -0
  98. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger.egg-info/dependency_links.txt +0 -0
  99. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger.egg-info/requires.txt +0 -0
  100. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/quantum_debugger.egg-info/top_level.txt +0 -0
  101. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/requirements.txt +0 -0
  102. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/setup.cfg +0 -0
  103. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/__init__.py +0 -0
  104. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/cirq/__init__.py +0 -0
  105. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/cirq/test_cirq_advanced.py +0 -0
  106. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/cirq/test_cirq_edge_cases.py +0 -0
  107. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/cirq/test_cirq_integration.py +0 -0
  108. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/conftest.py +0 -0
  109. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/integration/__init__.py +0 -0
  110. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/integration/test_integration.py +0 -0
  111. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/__init__.py +0 -0
  112. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_edge_cases.py +0 -0
  113. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_properties.py +0 -0
  114. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_qaoa.py +0 -0
  115. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_qml_parameterized_gates.py +0 -0
  116. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_regression.py +0 -0
  117. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_training.py +0 -0
  118. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/qml/test_vqe.py +0 -0
  119. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/CONVERSION_TRACKER.py +0 -0
  120. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/__init__.py +0 -0
  121. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_advanced.py +0 -0
  122. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backend_comprehensive.py +0 -0
  123. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backend_integration.py +0 -0
  124. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backends.py +0 -0
  125. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backends_advanced.py +0 -0
  126. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backends_comprehensive.py +0 -0
  127. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_backends_fast.py +0 -0
  128. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_circuit_noise.py +0 -0
  129. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_circuit_noise_advanced.py +0 -0
  130. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_circuit_noise_unique.py +0 -0
  131. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_compatibility.py +0 -0
  132. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_comprehensive.py +0 -0
  133. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_distribution.py +0 -0
  134. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_docstrings.py +0 -0
  135. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_extreme.py +0 -0
  136. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_gpu_quick.py +0 -0
  137. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_hardware_profiles_extended.py +0 -0
  138. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_hardware_profiles_phase3.py +0 -0
  139. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_mitigation_comprehensive.py +0 -0
  140. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_mitigation_final.py +0 -0
  141. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_mitigation_observables.py +0 -0
  142. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_mitigation_zne.py +0 -0
  143. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise.py +0 -0
  144. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_advanced.py +0 -0
  145. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_extreme.py +0 -0
  146. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_final.py +0 -0
  147. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_performance.py +0 -0
  148. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_quantum_info.py +0 -0
  149. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_noise_ultimate.py +0 -0
  150. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_parallel.py +0 -0
  151. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_production.py +0 -0
  152. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qiskit_complex.py +0 -0
  153. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qiskit_extreme.py +0 -0
  154. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qiskit_ultra.py +0 -0
  155. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_advanced.py +0 -0
  156. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_comprehensive.py +0 -0
  157. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_memory.py +0 -0
  158. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_threading.py +0 -0
  159. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_qml_tricky.py +0 -0
  160. {quantum_debugger-0.4.2 → quantum_debugger-0.5.0}/tests/unit/test_quickstart.py +0 -0
  161. {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.4.2
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
  [![PyPI version](https://badge.fury.io/py/quantum-debugger.svg)](https://pypi.org/project/quantum-debugger/)
58
- [![Tests](https://img.shields.io/badge/tests-656%20passing-brightgreen)](./tests/FINAL_TEST_SUMMARY.md)
58
+ [![Tests](https://img.shields.io/badge/tests-689%20passing-brightgreen)](https://github.com/Raunakg2005/quantum-debugger/blob/main/tests/FINAL_TEST_SUMMARY.md)
59
59
  [![Python](https://img.shields.io/badge/python-3.9%2B-blue)]()
60
60
  [![License](https://img.shields.io/badge/license-MIT-green)]()
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.4.2
64
+ ## ✨ What's New in v0.5.0
65
65
 
66
- **Quantum Machine Learning Module** 🚀
66
+ **Advanced Quantum Machine Learning** 🚀
67
67
 
68
68
  ```python
69
- from quantum_debugger.qml import VQE, h2_hamiltonian, hardware_efficient_ansatz
69
+ # NEW: Quantum Neural Networks
70
+ from quantum_debugger.qml.qnn import QuantumNeuralNetwork, EncodingLayer, VariationalLayer
70
71
 
71
- # Find H2 molecule ground state
72
- H = h2_hamiltonian()
73
- vqe = VQE(H, hardware_efficient_ansatz, num_qubits=2)
74
- result = vqe.run(initial_params)
75
- print(f"Ground state energy: {result['ground_state_energy']:.6f} Hartree")
76
- # Accuracy: < 1% error from exact solution
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
- **New Features:**
80
- - ✅ **Parameterized Gates** (RX, RY, RZ with trainable parameters)
81
- - ✅ **VQE** (Variational Quantum Eigensolver for chemistry)
82
- - ✅ **QAOA** (Quantum optimization for MaxCut problems)
83
- - ✅ **Training Framework** (Adam, SGD, SPSA, RMSprop optimizers)
84
- - ✅ **Gradient Computation** (Parameter shift rule, finite differences)
85
- - ✅ **656 comprehensive tests** (all passing )
86
- - ✅ **Complete pytest migration** (all legacy scripts converted)
87
- - ✅ **Hardware profiles** (AWS Braket, Azure Quantum, 2025 updates)
88
- - ✅ **Enhanced backends** (Advanced validation, GPU support)
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.4.0+)
103
- - **Parameterized Circuits** - Trainable quantum gates
104
- - **VQE** - Molecular ground state finding
105
- - **QAOA** - Combinatorial optimization
106
- - **Training & Optimization** - 4 classical optimizers
107
- - **Ansatz Library** - 4 pre-built quantum circuit templates
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
- ## Quantum Machine Learning (v0.4.0)
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](./tutorials/parameterized_gates_tutorial.md)
368
- - [VQE Preparation Guide](./tutorials/vqe_preparation.md)
369
- - [QAOA Tutorial](./tutorials/qaoa_tutorial.md)
370
- - [Noise Tutorial](./tutorials/noise_tutorial.md)
371
- - [ZNE Tutorial](./tutorials/zne_tutorial.md)
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](./examples/vqe_h2_example.py)
375
- - [QAOA MaxCut](./examples/qaoa_maxcut_example.py)
376
- - [QML Basic Example](./examples/qml_basic_example.py)
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](./tests/FINAL_TEST_SUMMARY.md) - Full breakdown of all 656 tests
450
- - 📁 [Test Structure](./tests/README.md) - Organization and conventions
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](./LICENSE) file.
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
  [![PyPI version](https://badge.fury.io/py/quantum-debugger.svg)](https://pypi.org/project/quantum-debugger/)
6
- [![Tests](https://img.shields.io/badge/tests-656%20passing-brightgreen)](./tests/FINAL_TEST_SUMMARY.md)
6
+ [![Tests](https://img.shields.io/badge/tests-689%20passing-brightgreen)](https://github.com/Raunakg2005/quantum-debugger/blob/main/tests/FINAL_TEST_SUMMARY.md)
7
7
  [![Python](https://img.shields.io/badge/python-3.9%2B-blue)]()
8
8
  [![License](https://img.shields.io/badge/license-MIT-green)]()
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.4.2
12
+ ## ✨ What's New in v0.5.0
13
13
 
14
- **Quantum Machine Learning Module** 🚀
14
+ **Advanced Quantum Machine Learning** 🚀
15
15
 
16
16
  ```python
17
- from quantum_debugger.qml import VQE, h2_hamiltonian, hardware_efficient_ansatz
17
+ # NEW: Quantum Neural Networks
18
+ from quantum_debugger.qml.qnn import QuantumNeuralNetwork, EncodingLayer, VariationalLayer
18
19
 
19
- # Find H2 molecule ground state
20
- H = h2_hamiltonian()
21
- vqe = VQE(H, hardware_efficient_ansatz, num_qubits=2)
22
- result = vqe.run(initial_params)
23
- print(f"Ground state energy: {result['ground_state_energy']:.6f} Hartree")
24
- # Accuracy: < 1% error from exact solution
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
- **New Features:**
28
- - ✅ **Parameterized Gates** (RX, RY, RZ with trainable parameters)
29
- - ✅ **VQE** (Variational Quantum Eigensolver for chemistry)
30
- - ✅ **QAOA** (Quantum optimization for MaxCut problems)
31
- - ✅ **Training Framework** (Adam, SGD, SPSA, RMSprop optimizers)
32
- - ✅ **Gradient Computation** (Parameter shift rule, finite differences)
33
- - ✅ **656 comprehensive tests** (all passing )
34
- - ✅ **Complete pytest migration** (all legacy scripts converted)
35
- - ✅ **Hardware profiles** (AWS Braket, Azure Quantum, 2025 updates)
36
- - ✅ **Enhanced backends** (Advanced validation, GPU support)
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.4.0+)
51
- - **Parameterized Circuits** - Trainable quantum gates
52
- - **VQE** - Molecular ground state finding
53
- - **QAOA** - Combinatorial optimization
54
- - **Training & Optimization** - 4 classical optimizers
55
- - **Ansatz Library** - 4 pre-built quantum circuit templates
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
- ## Quantum Machine Learning (v0.4.0)
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](./tutorials/parameterized_gates_tutorial.md)
316
- - [VQE Preparation Guide](./tutorials/vqe_preparation.md)
317
- - [QAOA Tutorial](./tutorials/qaoa_tutorial.md)
318
- - [Noise Tutorial](./tutorials/noise_tutorial.md)
319
- - [ZNE Tutorial](./tutorials/zne_tutorial.md)
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](./examples/vqe_h2_example.py)
323
- - [QAOA MaxCut](./examples/qaoa_maxcut_example.py)
324
- - [QML Basic Example](./examples/qml_basic_example.py)
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](./tests/FINAL_TEST_SUMMARY.md) - Full breakdown of all 656 tests
398
- - 📁 [Test Structure](./tests/README.md) - Organization and conventions
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](./LICENSE) file.
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