squlearn 0.7.6__tar.gz → 0.8.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 (200) hide show
  1. {squlearn-0.7.6 → squlearn-0.8.0}/.github/workflows/doc_checks.yml +1 -1
  2. {squlearn-0.7.6 → squlearn-0.8.0}/.github/workflows/publish_docs.yml +1 -1
  3. squlearn-0.8.0/.github/workflows/tests.yaml +124 -0
  4. {squlearn-0.7.6 → squlearn-0.8.0}/.gitignore +1 -1
  5. {squlearn-0.7.6 → squlearn-0.8.0}/PKG-INFO +31 -29
  6. {squlearn-0.7.6 → squlearn-0.8.0}/README.md +4 -9
  7. squlearn-0.8.0/docs/_static/util/executor.png +0 -0
  8. {squlearn-0.7.6 → squlearn-0.8.0}/docs/conf.py +4 -2
  9. squlearn-0.8.0/docs/install/install.rst +81 -0
  10. {squlearn-0.7.6 → squlearn-0.8.0}/docs/modules/classes.rst +14 -7
  11. {squlearn-0.7.6 → squlearn-0.8.0}/docs/user_guide/encoding_circuits.rst +1 -1
  12. squlearn-0.8.0/docs/user_guide/executor.rst +462 -0
  13. {squlearn-0.7.6 → squlearn-0.8.0}/docs/user_guide/kernel_methods.rst +23 -53
  14. {squlearn-0.7.6 → squlearn-0.8.0}/docs/user_guide/quantum_neural_networks.rst +12 -9
  15. {squlearn-0.7.6 → squlearn-0.8.0}/examples/executor/example_executor_qiskit.ipynb +72 -23
  16. squlearn-0.8.0/examples/kernel/qgpr_optimization_workflow.ipynb +176 -0
  17. {squlearn-0.7.6 → squlearn-0.8.0}/examples/qnn/example_minibatch.ipynb +1 -1
  18. squlearn-0.8.0/examples/qnn/example_qcnn_encoding_circuit.ipynb +440 -0
  19. squlearn-0.8.0/examples/qnn/ode_example.ipynb +365 -0
  20. squlearn-0.8.0/examples/qrc/qrc_classification.ipynb +205 -0
  21. squlearn-0.8.0/examples/qrc/qrc_regression.ipynb +207 -0
  22. squlearn-0.8.0/examples/tutorials/qnn_backend_mitigation.ipynb +554 -0
  23. squlearn-0.8.0/examples/tutorials/quantum_bayesian_optimization.ipynb +528 -0
  24. squlearn-0.8.0/install_lowest_dependencies.py +45 -0
  25. {squlearn-0.7.6 → squlearn-0.8.0}/pyproject.toml +27 -20
  26. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/__init__.py +1 -1
  27. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/__init__.py +6 -0
  28. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/chebyshev_pqc.py +1 -1
  29. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/chebyshev_rx.py +1 -1
  30. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/chebyshev_tower.py +1 -1
  31. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/highdim_encoding_circuit.py +1 -1
  32. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/hubregtsen_encoding_circuit.py +1 -1
  33. squlearn-0.8.0/src/squlearn/encoding_circuit/circuit_library/kyriienko_nonlinear_encoding_circuit.py +266 -0
  34. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/multi_control_encoding_circuit.py +1 -1
  35. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/param_z_feature_map.py +1 -1
  36. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/qcnn_encoding_circuit.py +1 -1
  37. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/qiskit_encoding_circuit.py +1 -1
  38. squlearn-0.8.0/src/squlearn/encoding_circuit/circuit_library/random_encoding_circuit.py +381 -0
  39. squlearn-0.8.0/src/squlearn/encoding_circuit/circuit_library/random_layered_encoding_circuit.py +197 -0
  40. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/yz_cx_encoding_circuit.py +1 -1
  41. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/encoding_circuit_base.py +1 -1
  42. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/layered_encoding_circuit.py +1 -1
  43. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/pruned_encoding_circuit.py +5 -5
  44. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/transpiled_encoding_circuit.py +1 -1
  45. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/__init__.py +3 -3
  46. squlearn-0.8.0/src/squlearn/kernel/loss/__init__.py +4 -0
  47. squlearn-0.8.0/src/squlearn/kernel/loss/kernel_loss_base.py +41 -0
  48. {squlearn-0.7.6/src/squlearn/kernel/optimization → squlearn-0.8.0/src/squlearn/kernel/loss}/negative_log_likelihood.py +19 -15
  49. {squlearn-0.7.6/src/squlearn/kernel/optimization → squlearn-0.8.0/src/squlearn/kernel/loss}/target_alignment.py +23 -21
  50. squlearn-0.8.0/src/squlearn/kernel/matrix/__init__.py +5 -0
  51. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/matrix/fidelity_kernel.py +13 -2
  52. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/matrix/kernel_matrix_base.py +11 -2
  53. squlearn-0.8.0/src/squlearn/kernel/matrix/kernel_optimizer.py +174 -0
  54. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/matrix/projected_quantum_kernel.py +346 -19
  55. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/ml/qgpc.py +22 -0
  56. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/ml/qgpr.py +14 -7
  57. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/ml/qkrr.py +13 -8
  58. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/ml/qsvc.py +25 -0
  59. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/ml/qsvr.py +25 -0
  60. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_base.py +1 -0
  61. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/optimizers/approximated_gradients.py +6 -4
  62. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/__init__.py +2 -1
  63. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/base_qnn.py +27 -7
  64. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/loss.py +608 -4
  65. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/lowlevel_qnn.py +3 -0
  66. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/lowlevel_qnn_pennylane.py +5 -5
  67. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/lowlevel_qnn_qiskit.py +68 -21
  68. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/qnnc.py +20 -5
  69. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/qnnr.py +78 -11
  70. squlearn-0.8.0/src/squlearn/qrc/__init__.py +6 -0
  71. squlearn-0.8.0/src/squlearn/qrc/base_qrc.py +290 -0
  72. squlearn-0.8.0/src/squlearn/qrc/qrc_classifier.py +132 -0
  73. squlearn-0.8.0/src/squlearn/qrc/qrc_regressor.py +130 -0
  74. squlearn-0.8.0/src/squlearn/util/execution/__init__.py +9 -0
  75. squlearn-0.8.0/src/squlearn/util/execution/automatic_backend_selection.py +545 -0
  76. squlearn-0.8.0/src/squlearn/util/execution/hqaa/__init__.py +2 -0
  77. squlearn-0.8.0/src/squlearn/util/execution/hqaa/heuristic.py +238 -0
  78. squlearn-0.8.0/src/squlearn/util/execution/hqaa/parser.py +51 -0
  79. squlearn-0.8.0/src/squlearn/util/execution/parallel_estimator.py +909 -0
  80. squlearn-0.8.0/src/squlearn/util/execution/parallel_sampler.py +986 -0
  81. squlearn-0.8.0/src/squlearn/util/executor.py +3096 -0
  82. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/optree/optree.py +1 -1
  83. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/optree/optree_derivative.py +41 -11
  84. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/optree/optree_evaluate.py +174 -100
  85. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/pennylane/pennylane_circuit.py +1 -1
  86. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/qfi.py +9 -2
  87. {squlearn-0.7.6 → squlearn-0.8.0}/tests/encoding_circuit/test_layered_encoding_circuit.py +1 -1
  88. squlearn-0.8.0/tests/encoding_circuit/test_random_encoding_circuits.py +114 -0
  89. squlearn-0.8.0/tests/kernel/matrix/test_kernel_optimizer.py +87 -0
  90. squlearn-0.8.0/tests/kernel/matrix/test_projected_quantum_kernel.py +143 -0
  91. {squlearn-0.7.6 → squlearn-0.8.0}/tests/qnn/test_training.py +7 -7
  92. squlearn-0.8.0/tests/qrc/test_base_qrc.py +86 -0
  93. squlearn-0.8.0/tests/qrc/test_qrc_classifier.py +55 -0
  94. squlearn-0.8.0/tests/qrc/test_qrc_regressor.py +62 -0
  95. squlearn-0.8.0/tests/util/execution/test_automatic_backend_selection.py +210 -0
  96. squlearn-0.8.0/tests/util/execution/test_parallel_primitives.py +45 -0
  97. {squlearn-0.7.6 → squlearn-0.8.0}/tests/util/optree/test_optree_derivative.py +65 -23
  98. {squlearn-0.7.6 → squlearn-0.8.0}/tests/util/optree/test_optree_evaluate.py +105 -30
  99. {squlearn-0.7.6 → squlearn-0.8.0}/tests/util/test_executor.py +45 -7
  100. squlearn-0.7.6/.github/workflows/tests.yaml +0 -28
  101. squlearn-0.7.6/docs/_static/util/executor.png +0 -0
  102. squlearn-0.7.6/docs/install/install.rst +0 -50
  103. squlearn-0.7.6/docs/requirements.txt +0 -11
  104. squlearn-0.7.6/docs/user_guide/executor.rst +0 -296
  105. squlearn-0.7.6/examples/kernel/qgpr_optimization_workflow.ipynb +0 -196
  106. squlearn-0.7.6/examples/qnn/example_qcnn_encoding_circuit.ipynb +0 -670
  107. squlearn-0.7.6/examples/tutorials/qnn_backend_mitigation.ipynb +0 -698
  108. squlearn-0.7.6/examples/tutorials/quantum_bayesian_optimization.ipynb +0 -528
  109. squlearn-0.7.6/src/squlearn/kernel/matrix/__init__.py +0 -4
  110. squlearn-0.7.6/src/squlearn/kernel/optimization/__init__.py +0 -5
  111. squlearn-0.7.6/src/squlearn/kernel/optimization/kernel_loss_base.py +0 -24
  112. squlearn-0.7.6/src/squlearn/kernel/optimization/kernel_optimization_base.py +0 -41
  113. squlearn-0.7.6/src/squlearn/kernel/optimization/kernel_optimizer.py +0 -96
  114. squlearn-0.7.6/src/squlearn/util/executor.py +0 -1838
  115. {squlearn-0.7.6 → squlearn-0.8.0}/.github/CODE_OF_CONDUCT.md +0 -0
  116. {squlearn-0.7.6 → squlearn-0.8.0}/.github/CONTRIBUTING.md +0 -0
  117. {squlearn-0.7.6 → squlearn-0.8.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  118. {squlearn-0.7.6 → squlearn-0.8.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  119. {squlearn-0.7.6 → squlearn-0.8.0}/.github/workflows/format.yml +0 -0
  120. {squlearn-0.7.6 → squlearn-0.8.0}/.github/workflows/publish.yml +0 -0
  121. {squlearn-0.7.6 → squlearn-0.8.0}/CITATION.cff +0 -0
  122. {squlearn-0.7.6 → squlearn-0.8.0}/LICENSE.txt +0 -0
  123. {squlearn-0.7.6 → squlearn-0.8.0}/docs/Makefile +0 -0
  124. {squlearn-0.7.6 → squlearn-0.8.0}/docs/README.md +0 -0
  125. {squlearn-0.7.6 → squlearn-0.8.0}/docs/_static/css/custom.css +0 -0
  126. {squlearn-0.7.6 → squlearn-0.8.0}/docs/_static/favicon.png +0 -0
  127. {squlearn-0.7.6 → squlearn-0.8.0}/docs/_static/logo.png +0 -0
  128. {squlearn-0.7.6 → squlearn-0.8.0}/docs/_static/qnn/qnn.svg +0 -0
  129. {squlearn-0.7.6 → squlearn-0.8.0}/docs/_static/schematic.png +0 -0
  130. {squlearn-0.7.6 → squlearn-0.8.0}/docs/_templates/class.rst +0 -0
  131. {squlearn-0.7.6 → squlearn-0.8.0}/docs/_templates/class_with_call.rst +0 -0
  132. {squlearn-0.7.6 → squlearn-0.8.0}/docs/_templates/function.rst +0 -0
  133. {squlearn-0.7.6 → squlearn-0.8.0}/docs/examples/example_kernel_digit_classification.nblink +0 -0
  134. {squlearn-0.7.6 → squlearn-0.8.0}/docs/examples/example_kernel_grid_search.nblink +0 -0
  135. {squlearn-0.7.6 → squlearn-0.8.0}/docs/examples/example_qnn_backend_mitigation.nblink +0 -0
  136. {squlearn-0.7.6 → squlearn-0.8.0}/docs/examples/example_quantum_bayesian_optimization.nblink +0 -0
  137. {squlearn-0.7.6 → squlearn-0.8.0}/docs/examples/examples_index.rst +0 -0
  138. {squlearn-0.7.6 → squlearn-0.8.0}/docs/index.rst +0 -0
  139. {squlearn-0.7.6 → squlearn-0.8.0}/docs/make.bat +0 -0
  140. {squlearn-0.7.6 → squlearn-0.8.0}/docs/qiskit_settings.conf +0 -0
  141. {squlearn-0.7.6 → squlearn-0.8.0}/docs/spelling_wordlist.txt +0 -0
  142. {squlearn-0.7.6 → squlearn-0.8.0}/docs/user_guide/observables.rst +0 -0
  143. {squlearn-0.7.6 → squlearn-0.8.0}/docs/user_guide/user_guide_index.rst +0 -0
  144. {squlearn-0.7.6 → squlearn-0.8.0}/examples/encoding_circuits/layered_encoding_circuit.ipynb +0 -0
  145. {squlearn-0.7.6 → squlearn-0.8.0}/examples/encoding_circuits/pruning_example.ipynb +0 -0
  146. {squlearn-0.7.6 → squlearn-0.8.0}/examples/encoding_circuits/various_encoding_circuit.ipynb +0 -0
  147. {squlearn-0.7.6 → squlearn-0.8.0}/examples/integration/mlflow.ipynb +0 -0
  148. {squlearn-0.7.6 → squlearn-0.8.0}/examples/kernel/example_fidelity_kernel.ipynb +0 -0
  149. {squlearn-0.7.6 → squlearn-0.8.0}/examples/kernel/example_projected_kernel.ipynb +0 -0
  150. {squlearn-0.7.6 → squlearn-0.8.0}/examples/kernel/example_regularization_mitigation.ipynb +0 -0
  151. {squlearn-0.7.6 → squlearn-0.8.0}/examples/kernel/qgpc_workflow.ipynb +0 -0
  152. {squlearn-0.7.6 → squlearn-0.8.0}/examples/kernel/qgpr_workflow.ipynb +0 -0
  153. {squlearn-0.7.6 → squlearn-0.8.0}/examples/qnn/classification_example.ipynb +0 -0
  154. {squlearn-0.7.6 → squlearn-0.8.0}/examples/qnn/example_adam.ipynb +0 -0
  155. {squlearn-0.7.6 → squlearn-0.8.0}/examples/qnn/regression_example.ipynb +0 -0
  156. {squlearn-0.7.6 → squlearn-0.8.0}/examples/qnn/regression_with_variance.ipynb +0 -0
  157. {squlearn-0.7.6 → squlearn-0.8.0}/examples/tutorials/images/encoding_circuit.png +0 -0
  158. {squlearn-0.7.6 → squlearn-0.8.0}/examples/tutorials/images/pipeline.png +0 -0
  159. {squlearn-0.7.6 → squlearn-0.8.0}/examples/tutorials/images/projected_quantum_kernel.png +0 -0
  160. {squlearn-0.7.6 → squlearn-0.8.0}/examples/tutorials/images/quantum_bo.png +0 -0
  161. {squlearn-0.7.6 → squlearn-0.8.0}/examples/tutorials/kernel_digit_classification.ipynb +0 -0
  162. {squlearn-0.7.6 → squlearn-0.8.0}/examples/tutorials/kernel_grid_search.ipynb +0 -0
  163. {squlearn-0.7.6 → squlearn-0.8.0}/examples/tutorials/kernel_regression.ipynb +0 -0
  164. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/circuit_library/__init__.py +0 -0
  165. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/encoding_circuit/encoding_circuit_derivatives.py +0 -0
  166. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/matrix/fidelity_kernel_pennylane.py +0 -0
  167. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/matrix/kernel_util.py +0 -0
  168. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/matrix/regularization.py +0 -0
  169. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/kernel/ml/__init__.py +0 -0
  170. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/__init__.py +0 -0
  171. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_derivatives.py +0 -0
  172. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_implemented/__init__.py +0 -0
  173. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_implemented/custom_observable.py +0 -0
  174. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_implemented/ising_hamiltonian.py +0 -0
  175. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_implemented/single_pauli.py +0 -0
  176. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_implemented/single_probability.py +0 -0
  177. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_implemented/summed_paulis.py +0 -0
  178. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/observables/observable_implemented/summed_probabilities.py +0 -0
  179. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/optimizers/__init__.py +0 -0
  180. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/optimizers/adam.py +0 -0
  181. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/optimizers/optimizer_base.py +0 -0
  182. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/optimizers/optimizers_wrapper.py +0 -0
  183. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/optimizers/sglbo.py +0 -0
  184. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/barren_plateau_analysis.py +0 -0
  185. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/lowlevel_qnn_base.py +0 -0
  186. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/qnn/training.py +0 -0
  187. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/__init__.py +0 -0
  188. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/data_preprocessing.py +0 -0
  189. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/optree/__init__.py +0 -0
  190. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/pennylane/__init__.py +0 -0
  191. {squlearn-0.7.6 → squlearn-0.8.0}/src/squlearn/util/pennylane/pennylane_gates.py +0 -0
  192. {squlearn-0.7.6 → squlearn-0.8.0}/tests/kernel/ml/test_qgpc.py +0 -0
  193. {squlearn-0.7.6 → squlearn-0.8.0}/tests/kernel/ml/test_qgpr.py +0 -0
  194. {squlearn-0.7.6 → squlearn-0.8.0}/tests/kernel/ml/test_qkrr.py +0 -0
  195. {squlearn-0.7.6 → squlearn-0.8.0}/tests/kernel/ml/test_qsvc.py +0 -0
  196. {squlearn-0.7.6 → squlearn-0.8.0}/tests/kernel/ml/test_qsvr.py +0 -0
  197. {squlearn-0.7.6 → squlearn-0.8.0}/tests/optimizers/test_sglbo.py +0 -0
  198. {squlearn-0.7.6 → squlearn-0.8.0}/tests/qnn/test_base_qnn.py +0 -0
  199. {squlearn-0.7.6 → squlearn-0.8.0}/tests/qnn/test_qnnc.py +0 -0
  200. {squlearn-0.7.6 → squlearn-0.8.0}/tests/qnn/test_qnnr.py +0 -0
@@ -16,5 +16,5 @@ jobs:
16
16
  - uses: sQUlearn/sphinx-action@master
17
17
  with:
18
18
  docs-folder: "docs/"
19
- pre-build-command: "pip3 install ."
19
+ pre-build-command: "pip3 install .[docs]"
20
20
  build-command: "sphinx-build -b html . _build -W --keep-going"
@@ -24,7 +24,7 @@ jobs:
24
24
  uses: sQUlearn/sphinx-action@master
25
25
  with:
26
26
  docs-folder: "docs/"
27
- pre-build-command: "pip3 install ."
27
+ pre-build-command: "pip3 install .[docs]"
28
28
  build-command: "sphinx-build -b html . _build -W"
29
29
  - name: Commit Files
30
30
  run: |
@@ -0,0 +1,124 @@
1
+ name: Tests
2
+ on:
3
+ pull_request:
4
+ schedule:
5
+ - cron: '23 1 * * *'
6
+
7
+ jobs:
8
+ pytest_minimal_requirements:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - name: Set up Python
14
+ uses: actions/setup-python@v5
15
+ with:
16
+ python-version: '3.9'
17
+ - name: Install dependencies
18
+ run: |
19
+ python -m pip install --upgrade pip
20
+ python -m venv venv_minimal
21
+ source venv_minimal/bin/activate
22
+ pip install toml
23
+ python3 install_lowest_dependencies.py
24
+ - name: Test with pytest
25
+ run: |
26
+ source venv_minimal/bin/activate
27
+ pip install pytest
28
+ pytest tests/
29
+ - name: Test examples
30
+ run: |
31
+ source venv_minimal/bin/activate
32
+ pip install nbmake
33
+ pytest --nbmake --nbmake-timeout 600 examples/
34
+ - name: clean
35
+ run: |
36
+ rm -rf venv_minimal
37
+
38
+ pytest_qiskit_0_46:
39
+ runs-on: ubuntu-latest
40
+
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+ - name: Set up Python
44
+ uses: actions/setup-python@v5
45
+ with:
46
+ python-version: '3.9'
47
+ - name: Install dependencies
48
+ run: |
49
+ python -m pip install --upgrade pip
50
+ python -m venv venv_qiskit_0_46
51
+ source venv_qiskit_0_46/bin/activate
52
+ pip install .[examples] qiskit==0.46.3 qiskit-ibm-runtime==0.20.0
53
+ - name: Test with pytest
54
+ run: |
55
+ source venv_qiskit_0_46/bin/activate
56
+ pip install pytest
57
+ pytest tests/
58
+ - name: Test examples
59
+ run: |
60
+ source venv_qiskit_0_46/bin/activate
61
+ pip install nbmake
62
+ pytest --nbmake --nbmake-timeout 600 examples/
63
+ - name: clean
64
+ run: |
65
+ rm -rf venv_qiskit_0_46
66
+
67
+ pytest_qiskit_1:
68
+ runs-on: ubuntu-latest
69
+
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - name: Set up Python
73
+ uses: actions/setup-python@v5
74
+ with:
75
+ python-version: '3.9'
76
+ - name: Install dependencies
77
+ run: |
78
+ python -m pip install --upgrade pip
79
+ python -m venv venv_qiskit_1
80
+ source venv_qiskit_1/bin/activate
81
+ pip install .[examples] qiskit==1.1.2 qiskit-ibm-runtime==0.27.1
82
+ - name: Test with pytest
83
+ run: |
84
+ source venv_qiskit_1/bin/activate
85
+ pip install pytest
86
+ pytest tests/
87
+ - name: Test examples
88
+ run: |
89
+ source venv_qiskit_1/bin/activate
90
+ pip install nbmake
91
+ pytest --nbmake --nbmake-timeout 600 examples/
92
+ - name: clean
93
+ run: |
94
+ rm -rf venv_qiskit_1
95
+
96
+ pytest_latest:
97
+ runs-on: ubuntu-latest
98
+
99
+ steps:
100
+ - uses: actions/checkout@v4
101
+ - name: Set up Python
102
+ uses: actions/setup-python@v5
103
+ with:
104
+ python-version: |
105
+ 3.12
106
+ - name: Install dependencies
107
+ run: |
108
+ python -m pip install --upgrade pip
109
+ python -m venv venv_latest
110
+ source venv_latest/bin/activate
111
+ pip install .[examples]
112
+ - name: Test with pytest
113
+ run: |
114
+ source venv_latest/bin/activate
115
+ pip install pytest
116
+ pytest tests/
117
+ - name: Test examples
118
+ run: |
119
+ source venv_latest/bin/activate
120
+ pip install nbmake
121
+ pytest --nbmake --nbmake-timeout 600 examples/
122
+ - name: clean
123
+ run: |
124
+ rm -rf venv_latest
@@ -169,7 +169,7 @@ examples/qnn/*_log.csv
169
169
  examples/**/*.log
170
170
 
171
171
  #Example caches
172
- examples/**/_cache
172
+ **/_cache
173
173
  examples/integration/mlruns
174
174
 
175
175
  # Genereated doc images
@@ -1,42 +1,47 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: squlearn
3
- Version: 0.7.6
3
+ Version: 0.8.0
4
4
  Summary: A library for quantum machine learning following the scikit-learnstandard.
5
5
  Keywords: quantum,machine learning,qml
6
6
  Author-email: David Kreplin <david.kreplin@ipa.fraunhofer.de>, Moritz Willmann <moritz.willmann@ipa.fraunhofer.de>, Jan Schnabel <jan.schnabel@ipa.fraunhofer.de>, Frederic Rapp <frederic.rapp@ipa.fraunhofer.de>, Manuel Hagelüken <manuel.hagelueken@ipa.fraunhofer.de>, Marco Roth <marco.roth@ipa.fraunhofer.de>
7
7
  Maintainer-email: David Kreplin <david.kreplin@ipa.fraunhofer.de>, Moritz Willmann <moritz.willmann@ipa.fraunhofer.de>
8
- Requires-Python: >=3.9
8
+ Requires-Python: >=3.9,<3.13
9
9
  Description-Content-Type: text/markdown
10
10
  Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Programming Language :: Python
12
12
  Classifier: Programming Language :: Python :: 3
13
- Requires-Dist: dill>=0.3
14
- Requires-Dist: numpy>=1.17,<2.0
15
- Requires-Dist: qiskit>=0.43.0,<1.1.0
13
+ Requires-Dist: bayesian-optimization>=1.4.3,<2
14
+ Requires-Dist: dill>=0.3.4
15
+ Requires-Dist: mapomatic>=0.10.0
16
+ Requires-Dist: networkx>=3.0
17
+ Requires-Dist: numpy>=1.20
18
+ Requires-Dist: pennylane>=0.34.0
19
+ Requires-Dist: qiskit>=0.45.0
16
20
  Requires-Dist: qiskit-aer>=0.12.0
17
21
  Requires-Dist: qiskit-algorithms>=0.3.0
18
- Requires-Dist: qiskit-ibm-runtime>=0.15.1
19
- Requires-Dist: qiskit-machine-learning>=0.6.1
20
- Requires-Dist: pennylane>=0.34.0
21
- Requires-Dist: scipy>=1.5
22
- Requires-Dist: scikit-learn>=1.0,<1.4.2
23
- Requires-Dist: bayesian-optimization>=1.4.3
24
- Requires-Dist: tqdm>=4.0
22
+ Requires-Dist: qiskit-ibm-runtime>=0.18.0
23
+ Requires-Dist: qiskit-machine-learning>=0.7.0
24
+ Requires-Dist: scipy>=1.8.0
25
+ Requires-Dist: scikit-learn>=1.2.0,<1.4.2
26
+ Requires-Dist: tqdm>=4.1.0
25
27
  Requires-Dist: black ; extra == "dev"
26
28
  Requires-Dist: flit ; extra == "dev"
27
- Requires-Dist: myst-parser ; extra == "dev"
28
29
  Requires-Dist: nbmake ; extra == "dev"
29
- Requires-Dist: nbsphinx ; extra == "dev"
30
- Requires-Dist: nbsphinx_link ; extra == "dev"
31
30
  Requires-Dist: pylint ; extra == "dev"
32
31
  Requires-Dist: pytest ; extra == "dev"
33
- Requires-Dist: sphinx ; extra == "dev"
34
- Requires-Dist: sphinxcontrib-spelling ; extra == "dev"
35
- Requires-Dist: sphinx-rtd-theme ; extra == "dev"
36
- Requires-Dist: sphinx-sitemap ; extra == "dev"
37
- Requires-Dist: jupyter-sphinx ; extra == "dev"
32
+ Requires-Dist: ipykernel ; extra == "docs"
33
+ Requires-Dist: jupyter-sphinx ; extra == "docs"
34
+ Requires-Dist: matplotlib>=3.5.1 ; extra == "docs"
35
+ Requires-Dist: myst-parser ; extra == "docs"
36
+ Requires-Dist: nbsphinx ; extra == "docs"
37
+ Requires-Dist: nbsphinx_link ; extra == "docs"
38
+ Requires-Dist: pylatexenc>=2.10 ; extra == "docs"
39
+ Requires-Dist: sphinx ; extra == "docs"
40
+ Requires-Dist: sphinxcontrib-spelling ; extra == "docs"
41
+ Requires-Dist: sphinx-rtd-theme<3.0.0 ; extra == "docs"
42
+ Requires-Dist: sphinx-sitemap ; extra == "docs"
38
43
  Requires-Dist: jupyter ; extra == "examples"
39
- Requires-Dist: matplotlib>=3.5 ; extra == "examples"
44
+ Requires-Dist: matplotlib>=3.5.1 ; extra == "examples"
40
45
  Requires-Dist: mlflow ; extra == "examples"
41
46
  Requires-Dist: pandas ; extra == "examples"
42
47
  Requires-Dist: pylatexenc>=2.10 ; extra == "examples"
@@ -44,13 +49,14 @@ Requires-Dist: seaborn ; extra == "examples"
44
49
  Requires-Dist: scikit-optimize ; extra == "examples"
45
50
  Project-URL: Homepage, https://github.com/sQUlearn/squlearn
46
51
  Provides-Extra: dev
52
+ Provides-Extra: docs
47
53
  Provides-Extra: examples
48
54
 
49
55
  <p align="center">
50
56
  <img alt="sQUlearn" src="https://raw.githubusercontent.com/sQUlearn/squlearn/main/docs/_static/logo.png" />
51
57
  </p>
52
58
 
53
- sQUlearn is a user-friendly, NISQ-ready Python library for quantum machine learning (QML), designed for seamless integration with classical machine learning tools like scikit-learn. The library's dual-layer architecture serves both QML researchers and practitioners, enabling efficient prototyping, experimentation, and pipelining. sQUlearn provides a comprehensive toolset that includes both quantum kernel methods and quantum neural networks, along with features like customizable data encoding strategies, automated execution handling, and specialized kernel regularization techniques. By focusing on NISQ-compatibility and end-to-end automation, sQUlearn aims to bridge the gap between current quantum computing capabilities and practical machine learning applications.
59
+ sQUlearn is a user-friendly, NISQ-ready Python library for quantum machine learning (QML), designed for seamless integration with classical machine learning tools like scikit-learn. The library's dual-layer architecture serves both QML researchers and practitioners, enabling efficient prototyping, experimentation, and pipelining. sQUlearn provides a comprehensive tool set that includes both quantum kernel methods and quantum neural networks, along with features like customizable data encoding strategies, automated execution handling, and specialized kernel regularization techniques. By focusing on NISQ-compatibility and end-to-end automation, sQUlearn aims to bridge the gap between current quantum computing capabilities and practical machine learning applications.
54
60
 
55
61
  sQUlearn offers scikit-learn compatible high-level interfaces for various kernel methods and QNNs. They build on top of the low-level interfaces of the QNN engine and the quantum kernel engine. The executor is used to run experiments on simulated and real backends of the Qiskit or PennyLane frameworks.
56
62
 
@@ -87,7 +93,7 @@ pip install .[examples]
87
93
  ```
88
94
 
89
95
  ## Contribute to sQUlearn
90
- Thanks for considering to contribute to sQUlearn! Please read our [contribution guidelines](https://github.com/sQUlearn/squlearn/blob/main/.github/CONTRIBUTING.md) before you submit a pull request.
96
+ Thanks for considering contributing to sQUlearn! Please read our [contribution guidelines](https://github.com/sQUlearn/squlearn/blob/main/.github/CONTRIBUTING.md) before you submit a pull request.
91
97
 
92
98
  ---
93
99
  ## License
@@ -109,11 +115,7 @@ For general questions regarding sQUlearn, use the [GitHub Discussions](https://g
109
115
  ---
110
116
  ## Acknowledgements
111
117
 
112
- This project was supported by the German Federal Ministry
113
- of Economic Affairs and Climate Action through the
114
- projects AutoQML (grant no. 01MQ22002A) and AQUAS
115
- (grant no. 01MQ22003D), as well as the German Federal
116
- Ministry of Education and Research through the project
117
- H2Giga Degrad-EL3 (grant no. 03HY110D).
118
+ This project was supported by the German Federal Ministry of Economic Affairs and Climate Action through the projects AutoQML (grant no. 01MQ22002A) and AQUAS (grant no. 01MQ22003D), as well as the German Federal Ministry of Education and Research through the project H2Giga Degrad-EL3 (grant no. 03HY110D).
118
119
 
119
120
  ---
121
+
@@ -2,7 +2,7 @@
2
2
  <img alt="sQUlearn" src="https://raw.githubusercontent.com/sQUlearn/squlearn/main/docs/_static/logo.png" />
3
3
  </p>
4
4
 
5
- sQUlearn is a user-friendly, NISQ-ready Python library for quantum machine learning (QML), designed for seamless integration with classical machine learning tools like scikit-learn. The library's dual-layer architecture serves both QML researchers and practitioners, enabling efficient prototyping, experimentation, and pipelining. sQUlearn provides a comprehensive toolset that includes both quantum kernel methods and quantum neural networks, along with features like customizable data encoding strategies, automated execution handling, and specialized kernel regularization techniques. By focusing on NISQ-compatibility and end-to-end automation, sQUlearn aims to bridge the gap between current quantum computing capabilities and practical machine learning applications.
5
+ sQUlearn is a user-friendly, NISQ-ready Python library for quantum machine learning (QML), designed for seamless integration with classical machine learning tools like scikit-learn. The library's dual-layer architecture serves both QML researchers and practitioners, enabling efficient prototyping, experimentation, and pipelining. sQUlearn provides a comprehensive tool set that includes both quantum kernel methods and quantum neural networks, along with features like customizable data encoding strategies, automated execution handling, and specialized kernel regularization techniques. By focusing on NISQ-compatibility and end-to-end automation, sQUlearn aims to bridge the gap between current quantum computing capabilities and practical machine learning applications.
6
6
 
7
7
  sQUlearn offers scikit-learn compatible high-level interfaces for various kernel methods and QNNs. They build on top of the low-level interfaces of the QNN engine and the quantum kernel engine. The executor is used to run experiments on simulated and real backends of the Qiskit or PennyLane frameworks.
8
8
 
@@ -39,7 +39,7 @@ pip install .[examples]
39
39
  ```
40
40
 
41
41
  ## Contribute to sQUlearn
42
- Thanks for considering to contribute to sQUlearn! Please read our [contribution guidelines](https://github.com/sQUlearn/squlearn/blob/main/.github/CONTRIBUTING.md) before you submit a pull request.
42
+ Thanks for considering contributing to sQUlearn! Please read our [contribution guidelines](https://github.com/sQUlearn/squlearn/blob/main/.github/CONTRIBUTING.md) before you submit a pull request.
43
43
 
44
44
  ---
45
45
  ## License
@@ -61,11 +61,6 @@ For general questions regarding sQUlearn, use the [GitHub Discussions](https://g
61
61
  ---
62
62
  ## Acknowledgements
63
63
 
64
- This project was supported by the German Federal Ministry
65
- of Economic Affairs and Climate Action through the
66
- projects AutoQML (grant no. 01MQ22002A) and AQUAS
67
- (grant no. 01MQ22003D), as well as the German Federal
68
- Ministry of Education and Research through the project
69
- H2Giga Degrad-EL3 (grant no. 03HY110D).
64
+ This project was supported by the German Federal Ministry of Economic Affairs and Climate Action through the projects AutoQML (grant no. 01MQ22002A) and AQUAS (grant no. 01MQ22003D), as well as the German Federal Ministry of Education and Research through the project H2Giga Degrad-EL3 (grant no. 03HY110D).
70
65
 
71
- ---
66
+ ---
@@ -106,10 +106,12 @@ latex_elements = {
106
106
 
107
107
  # intersphinx
108
108
  intersphinx_mapping = {
109
- "qiskit": ("https://docs.quantum.ibm.com/api/qiskit/", None),
109
+ "pennylane": ("https://docs.pennylane.ai/en/stable/", None),
110
+ "qiskit": ("https://docs.quantum.ibm.com/api/qiskit/1.1/", None),
110
111
  "qiskit-aer": ("https://qiskit.github.io/qiskit-aer/", None),
112
+ "qiskit-ibm-runtime": ("https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/0.27/", None),
111
113
  "scipy": ("https://docs.scipy.org/doc/scipy/", None),
112
- "sklearn": ("https://scikit-learn.org/stable/", None),
114
+ "sklearn": ("https://scikit-learn.org/1.4/", None),
113
115
  }
114
116
 
115
117
  suppress_warnings = ["myst.header", "config.cache"]
@@ -0,0 +1,81 @@
1
+ .. _install:
2
+
3
+ Installation
4
+ ============
5
+
6
+ Prerequisites
7
+ -------------
8
+
9
+ sQUlearn requires a recent python3 (>=3.9) installation.
10
+ Additionally the following python packages are necessary: ::
11
+
12
+ bayesian-optimization>=1.4.3,<2
13
+ dill>=0.3.4
14
+ mapomatic>=0.10.0
15
+ networkx>=3.0
16
+ numpy>=1.20
17
+ pennylane>=0.34.0
18
+ qiskit>=0.45.0
19
+ qiskit-aer>=0.12.0
20
+ qiskit-algorithms>=0.3.0
21
+ qiskit-ibm-runtime>=0.18.0
22
+ qiskit-machine-learning>=0.7.0
23
+ scipy>=1.8.0
24
+ scikit-learn>=1.2.0,<1.4.2
25
+ tqdm>=4.1.0
26
+
27
+ The packages are automatically installed when installing sQUlearn with pip.
28
+
29
+ Stable Release
30
+ --------------
31
+
32
+ To install the stable release version of sQUlearn, run the following command:
33
+
34
+ .. code-block:: bash
35
+
36
+ pip install squlearn
37
+
38
+
39
+ Bleeding-edge version
40
+ ---------------------
41
+
42
+ To install the latest master version:
43
+
44
+ .. code-block:: bash
45
+
46
+ pip install git+https://github.com/sQUlearn/squlearn.git
47
+
48
+
49
+ Development version
50
+ -------------------
51
+
52
+ To install the latest development version:
53
+
54
+ .. code-block:: bash
55
+
56
+ pip install git+https://github.com/sQUlearn/squlearn.git@develop
57
+
58
+
59
+
60
+ Installation with optional dependencies:
61
+ ----------------------------------------
62
+
63
+ There are several optional dependencies that can be installed with sQUlearn.
64
+ To install sQUlearn with the dependencies usefull for development, run the following command:
65
+
66
+ .. code-block:: bash
67
+
68
+ pip install squlearn[dev]
69
+
70
+ To install sQUlearn with the dependencies necessary to run all examples, run the following command:
71
+
72
+ .. code-block:: bash
73
+
74
+ pip install squlearn[examples]
75
+
76
+ And to install sQUlearn with the dependencies necessary to build the documentation,
77
+ run the following command:
78
+
79
+ .. code-block:: bash
80
+
81
+ pip install squlearn[docs]
@@ -20,6 +20,7 @@ QML Regressors
20
20
  kernel.ml.QKRR
21
21
  kernel.ml.QGPR
22
22
  qnn.QNNRegressor
23
+ qrc.QRCRegressor
23
24
 
24
25
 
25
26
  QML Classifiers
@@ -35,7 +36,7 @@ QML Classifiers
35
36
  kernel.ml.QSVC
36
37
  kernel.ml.QGPC
37
38
  qnn.QNNClassifier
38
-
39
+ qrc.QRCClassifier
39
40
 
40
41
  Circuit Design
41
42
  ====================================
@@ -64,8 +65,12 @@ Encoding Circuits
64
65
  encoding_circuit.MultiControlEncodingCircuit
65
66
  encoding_circuit.ChebyshevRx
66
67
  encoding_circuit.ParamZFeatureMap
68
+ encoding_circuit.KyriienkoEncodingCircuit
67
69
  encoding_circuit.QiskitEncodingCircuit
68
70
  encoding_circuit.QCNNEncodingCircuit
71
+ encoding_circuit.RandomLayeredEncodingCircuit
72
+ encoding_circuit.RandomEncodingCircuit
73
+
69
74
 
70
75
  Encoding Circuit Tools
71
76
  ------------------------------------
@@ -140,6 +145,8 @@ Execution Tools
140
145
  :template: class.rst
141
146
 
142
147
  Executor
148
+ util.executor.ExecutorEstimator
149
+ util.executor.ExecutorSampler
143
150
 
144
151
 
145
152
  Core
@@ -162,7 +169,7 @@ Quantum Kernel Core
162
169
  kernel.matrix.FidelityKernel
163
170
  kernel.matrix.ProjectedQuantumKernel
164
171
 
165
- .. automodule:: squlearn.kernel.optimization
172
+ .. automodule:: squlearn.kernel.loss
166
173
  :no-members:
167
174
  :no-inherited-members:
168
175
 
@@ -173,9 +180,8 @@ Quantum Kernel Core
173
180
  :toctree: generated/
174
181
  :template: class.rst
175
182
 
176
- kernel.optimization.kernel_optimizer.KernelOptimizer
177
- kernel.optimization.negative_log_likelihood.NLL
178
- kernel.optimization.target_alignment.TargetAlignment
183
+ kernel.loss.negative_log_likelihood.NLL
184
+ kernel.loss.target_alignment.TargetAlignment
179
185
 
180
186
  QNN Core
181
187
  ------------------------------------
@@ -198,6 +204,7 @@ QNN Core
198
204
  qnn.lowlevel_qnn_base.LowLevelQNNBase
199
205
  qnn.loss.SquaredLoss
200
206
  qnn.loss.VarianceLoss
207
+ qnn.loss.ODELoss
201
208
  qnn.loss.ParameterRegularizationLoss
202
209
 
203
210
  Tools for training QNNs
@@ -280,11 +287,11 @@ Base Classes
280
287
  observables.observable_base.ObservableBase
281
288
  encoding_circuit.encoding_circuit_base.EncodingCircuitBase
282
289
  kernel.matrix.kernel_matrix_base.KernelMatrixBase
283
- kernel.optimization.kernel_loss_base.KernelLossBase
284
- kernel.optimization.kernel_optimization_base.KernelOptimizerBase
290
+ kernel.loss.kernel_loss_base.KernelLossBase
285
291
  optimizers.optimizer_base.OptimizerBase
286
292
  qnn.base_qnn.BaseQNN
287
293
  qnn.loss.LossBase
294
+ qrc.base_qrc.BaseQRC
288
295
 
289
296
 
290
297
 
@@ -152,7 +152,7 @@ sQUlearn features a fully automated pruning algorithm which can be used by calli
152
152
  from squlearn.encoding_circuit import LayeredEncodingCircuit, automated_pruning
153
153
  from squlearn.util import Executor
154
154
  encoding_circuit = LayeredEncodingCircuit.from_string("Rz(p)-Ry(p)-Z-Ry(p)-Rz(p)", num_qubits=2, num_features=0)
155
- pruned_encoding_circuit = automated_pruning(encoding_circuit, Executor("statevector_simulator"))
155
+ pruned_encoding_circuit = automated_pruning(encoding_circuit, Executor())
156
156
  pruned_encoding_circuit.draw(output="mpl")
157
157
 
158
158