squlearn 0.10.0__tar.gz → 0.11.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.
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/workflows/elaborate_tests.yaml +8 -45
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/workflows/quick_tests.yaml +1 -6
- {squlearn-0.10.0 → squlearn-0.11.0}/PKG-INFO +27 -9
- {squlearn-0.10.0 → squlearn-0.11.0}/README.md +14 -1
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/install/install.rst +8 -7
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/user_guide/encoding_circuits.rst +2 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/user_guide/executor.rst +149 -50
- squlearn-0.11.0/examples/encoding_circuits/various_encoding_circuit.ipynb +282 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/executor/example_executor_qiskit.ipynb +215 -62
- squlearn-0.11.0/examples/kernel/example_projected_kernel.ipynb +1567 -0
- squlearn-0.11.0/examples/qnn/example_qcnn_encoding_circuit.ipynb +654 -0
- squlearn-0.11.0/examples/tutorials/qnn_backend_mitigation.ipynb +561 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/install_lowest_dependencies.py +10 -3
- {squlearn-0.10.0 → squlearn-0.11.0}/pyproject.toml +17 -7
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/__init__.py +1 -1
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/chebyshev_pqc.py +58 -33
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/chebyshev_rx.py +43 -23
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/chebyshev_tower.py +78 -43
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/highdim_encoding_circuit.py +71 -39
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/hubregtsen_encoding_circuit.py +28 -13
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/kyriienko_nonlinear_encoding_circuit.py +80 -45
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/multi_control_encoding_circuit.py +29 -14
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/param_z_feature_map.py +5 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/qcnn_encoding_circuit.py +20 -14
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/qiskit_encoding_circuit.py +3 -3
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/random_encoding_circuit.py +1 -11
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/random_layered_encoding_circuit.py +33 -13
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/encoding_circuit_base.py +9 -5
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/encoding_circuit_derivatives.py +3 -3
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/layered_encoding_circuit.py +12 -18
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/loss/negative_log_likelihood.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/loss/ode_loss.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/fidelity_kernel_statevector.py +3 -7
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/projected_quantum_kernel.py +3 -5
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/qgpc.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/qgpr.py +24 -10
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/qkode.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/qkrr.py +8 -4
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/qsvc.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/qsvr.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_base.py +2 -4
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_implemented/custom_observable.py +26 -16
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_implemented/ising_hamiltonian.py +49 -29
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_implemented/single_pauli.py +27 -12
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_implemented/single_probability.py +25 -10
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_implemented/summed_paulis.py +30 -15
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_implemented/summed_probabilities.py +26 -11
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/optimizers/adam.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/optimizers/approximated_gradients.py +11 -10
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/loss/cross_entropy_loss.py +10 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/loss/squared_loss.py +10 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/lowlevel_qnn/lowlevel_qnn_pennylane.py +4 -4
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/qnnc.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/qnnr.py +1 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qrc/base_qrc.py +16 -4
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qrc/qrc_classifier.py +2 -3
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qrc/qrc_regressor.py +2 -3
- squlearn-0.11.0/src/squlearn/qrc/util/__init__.py +5 -0
- squlearn-0.11.0/src/squlearn/qrc/util/random_pauli_list.py +38 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/execution/automatic_backend_selection.py +108 -65
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/execution/parallel_estimator.py +86 -40
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/execution/parallel_sampler.py +114 -47
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/executor.py +160 -84
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/optree/optree.py +82 -6
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/optree/optree_derivative.py +36 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/optree/optree_evaluate.py +164 -13
- squlearn-0.11.0/src/squlearn/util/pennylane/__init__.py +4 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/pennylane/pennylane_circuit.py +169 -95
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/pennylane/pennylane_gates.py +20 -8
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/qulacs/__init__.py +0 -1
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/qulacs/qulacs_circuit.py +19 -19
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/qulacs/qulacs_gates.py +11 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/circuit_library/test_chebyshev_pqc.py +112 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/circuit_library/test_chebyshev_rx.py +92 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/circuit_library/test_chebyshev_tower.py +131 -0
- squlearn-0.11.0/tests/encoding_circuit/circuit_library/test_high_dim_encoding_circuit.py +209 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/circuit_library/test_hubregtsen_encoding_circuit.py +89 -0
- squlearn-0.11.0/tests/encoding_circuit/circuit_library/test_kyriienko_encoding_circuit.py +317 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/circuit_library/test_multi_control_encoding_circuit.py +88 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/circuit_library/test_param_z_feature_map.py +65 -0
- squlearn-0.11.0/tests/encoding_circuit/circuit_library/test_qcnn_encoding_circuit.py +168 -0
- squlearn-0.11.0/tests/encoding_circuit/circuit_library/test_qiskit_encoding_circuit.py +133 -0
- squlearn-0.11.0/tests/encoding_circuit/circuit_library/test_random_encoding_circuit.py +135 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/circuit_library/test_random_layered_encoding_circuit.py +23 -37
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/circuit_library/test_yz_cx_encoding_circuit.py +70 -0
- squlearn-0.11.0/tests/encoding_circuit/test_encoding_circuit_derivatives.py +133 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/test_layered_encoding_circuit.py +30 -0
- squlearn-0.11.0/tests/encoding_circuit/test_pruned_encoding_circuit.py +119 -0
- squlearn-0.11.0/tests/kernel/lowlevel_kernel/test_fidelity_kernel.py +292 -0
- squlearn-0.11.0/tests/kernel/lowlevel_kernel/test_fidelity_kernel_expectation_value.py +171 -0
- squlearn-0.11.0/tests/kernel/lowlevel_kernel/test_fidelity_kernel_statevector.py +300 -0
- {squlearn-0.10.0/tests/kernel/matrix → squlearn-0.11.0/tests/kernel/lowlevel_kernel}/test_kernel_optimizer.py +0 -1
- squlearn-0.11.0/tests/observables/observable_implemented/test_custom_observable.py +179 -0
- squlearn-0.11.0/tests/observables/observable_implemented/test_ising_hamiltonian.py +164 -0
- squlearn-0.11.0/tests/observables/observable_implemented/test_single_pauli.py +150 -0
- squlearn-0.11.0/tests/observables/observable_implemented/test_single_probability.py +88 -0
- squlearn-0.11.0/tests/observables/observable_implemented/test_summed_paulis.py +165 -0
- squlearn-0.11.0/tests/observables/observable_implemented/test_summed_probability.py +122 -0
- squlearn-0.11.0/tests/observables/test_observable_base.py +218 -0
- squlearn-0.11.0/tests/optimizers/test_adam.py +84 -0
- squlearn-0.11.0/tests/optimizers/test_approximated_gradients.py +103 -0
- squlearn-0.11.0/tests/optimizers/test_optimizers_wrapper.py +71 -0
- squlearn-0.11.0/tests/qiskit_circuit_equivalence.py +36 -0
- squlearn-0.11.0/tests/qnn/loss/test_cross_entropy_loss.py +56 -0
- squlearn-0.11.0/tests/qnn/loss/test_ode_loss.py +235 -0
- squlearn-0.11.0/tests/qnn/loss/test_parameter_regularization_loss.py +148 -0
- squlearn-0.11.0/tests/qnn/loss/test_squared_loss.py +140 -0
- squlearn-0.11.0/tests/qnn/loss/test_variance_loss.py +122 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qnn/lowlevel_qnn/test_lowlevel_qnn.py +2 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qnn/test_training.py +16 -12
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qrc/test_qrc_classifier.py +1 -1
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qrc/test_qrc_regressor.py +2 -2
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/util/execution/test_automatic_backend_selection.py +27 -61
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/util/optree/test_optree_derivative.py +64 -52
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/util/optree/test_optree_evaluate.py +97 -68
- squlearn-0.11.0/tests/util/test_executor.py +618 -0
- squlearn-0.11.0/tests/util/test_pennylane_circuit.py +164 -0
- squlearn-0.11.0/tests/util/test_transpiler_target_aliases.py +32 -0
- squlearn-0.10.0/examples/encoding_circuits/various_encoding_circuit.ipynb +0 -282
- squlearn-0.10.0/examples/kernel/example_projected_kernel.ipynb +0 -681
- squlearn-0.10.0/examples/qnn/example_qcnn_encoding_circuit.ipynb +0 -651
- squlearn-0.10.0/examples/tutorials/qnn_backend_mitigation.ipynb +0 -581
- squlearn-0.10.0/src/squlearn/util/pennylane/__init__.py +0 -4
- squlearn-0.10.0/tests/encoding_circuit/circuit_library/test_high_dim_encoding_circuit.py +0 -79
- squlearn-0.10.0/tests/encoding_circuit/circuit_library/test_kyriienko_encoding_circuit.py +0 -105
- squlearn-0.10.0/tests/encoding_circuit/circuit_library/test_random_encoding_circuit.py +0 -134
- squlearn-0.10.0/tests/encoding_circuit/test_pruned_encoding_circuit.py +0 -36
- squlearn-0.10.0/tests/util/test_executor.py +0 -310
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/CODE_OF_CONDUCT.md +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/CONTRIBUTING.md +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/workflows/doc_checks.yml +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/workflows/format.yml +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/workflows/publish.yml +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/workflows/publish_docs.yml +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.github/workflows/stale.yml +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/.gitignore +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/CITATION.cff +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/LICENSE.txt +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/Makefile +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/README.md +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/css/custom.css +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/favicon.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/logo.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/qkm/QKM_scheme_pic.jpg +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/qnn/qnn.svg +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/qrc/QRC_user_guide.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/qrc/qrc_classification_transparent.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/qrc/qrc_regression_transparent.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/schematic.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_static/util/executor.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_templates/class.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_templates/class_with_call.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/_templates/function.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/conf.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/examples/example_kernel_digit_classification.nblink +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/examples/example_kernel_grid_search.nblink +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/examples/example_ode_solver.nblink +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/examples/example_qnn_backend_mitigation.nblink +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/examples/example_quantum_bayesian_optimization.nblink +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/examples/examples_index.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/index.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/make.bat +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/modules/classes.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/qiskit_settings.conf +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/spelling_wordlist.txt +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/user_guide/kernel_methods.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/user_guide/observables.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/user_guide/quantum_neural_networks.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/user_guide/quantum_reservoir_computing.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/docs/user_guide/user_guide_index.rst +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/encoding_circuits/layered_encoding_circuit.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/encoding_circuits/pruning_example.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/integration/mlflow.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/kernel/example_fidelity_kernel.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/kernel/example_qkode.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/kernel/example_regularization_mitigation.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/kernel/qgpc_workflow.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/kernel/qgpr_optimization_workflow.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/kernel/qgpr_workflow.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qnn/classification_example.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qnn/example_adam.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qnn/example_minibatch.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qnn/multiclass_classification.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qnn/ode_example.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qnn/regression_example.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qnn/regression_with_variance.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qrc/qrc_classification.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/qrc/qrc_regression.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/images/QK_ode_circ_workflow.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/images/QNN_ode_workflow.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/images/encoding_circuit.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/images/pipeline.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/images/projected_quantum_kernel.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/images/quantum_bo.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/kernel_digit_classification.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/kernel_grid_search.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/kernel_regression.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/ode_solver.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/examples/tutorials/quantum_bayesian_optimization.ipynb +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/output.png +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/circuit_library/yz_cx_encoding_circuit.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/pruned_encoding_circuit.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/encoding_circuit/transpiled_encoding_circuit.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/loss/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/loss/kernel_loss_base.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/loss/target_alignment.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/fidelity_kernel.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/fidelity_kernel_expectation_value.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/kernel_matrix_base.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/kernel_optimizer.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/kernel_util.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/kernel/lowlevel_kernel/regularization.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_derivatives.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/observables/observable_implemented/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/optimizers/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/optimizers/optimizer_base.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/optimizers/optimizers_wrapper.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/optimizers/sglbo.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/base_qnn.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/loss/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/loss/mean_squared_error.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/loss/ode_loss.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/loss/parameter_regularization_loss.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/loss/qnn_loss_base.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/loss/variance_loss.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/lowlevel_qnn/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/lowlevel_qnn/evaluation_classes.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/lowlevel_qnn/lowlevel_qnn.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/lowlevel_qnn/lowlevel_qnn_base.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/lowlevel_qnn/lowlevel_qnn_qiskit.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/lowlevel_qnn/lowlevel_qnn_qulacs.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/util/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/util/barren_plateau_analysis.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qnn/util/training.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/qrc/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/data_preprocessing.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/decompose_to_std.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/execution/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/execution/hqaa/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/execution/hqaa/heuristic.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/execution/hqaa/parser.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/optree/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/qfi.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/qulacs/qulacs_execution.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/serialization/__init__.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/serialization/model_pickler.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/src/squlearn/util/serialization/serializable_model_mixin.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/encoding_circuit/test_encoding_circuit_base.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/kernel/loss/test_ode_loss.py +0 -0
- {squlearn-0.10.0/tests/kernel/matrix → squlearn-0.11.0/tests/kernel/lowlevel_kernel}/test_fidelity_quantum_kernel.py +0 -0
- {squlearn-0.10.0/tests/kernel/matrix → squlearn-0.11.0/tests/kernel/lowlevel_kernel}/test_projected_quantum_kernel.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/kernel/ml/test_qkode.py +0 -0
- {squlearn-0.10.0/tests/kernel/ml → squlearn-0.11.0/tests/kernel}/test_qgpc.py +0 -0
- {squlearn-0.10.0/tests/kernel/ml → squlearn-0.11.0/tests/kernel}/test_qgpr.py +0 -0
- {squlearn-0.10.0/tests/kernel/ml → squlearn-0.11.0/tests/kernel}/test_qkrr.py +0 -0
- {squlearn-0.10.0/tests/kernel/ml → squlearn-0.11.0/tests/kernel}/test_qsvc.py +0 -0
- {squlearn-0.10.0/tests/kernel/ml → squlearn-0.11.0/tests/kernel}/test_qsvr.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/optimizers/test_sglbo.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qnn/loss/test_mean_squared_error.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qnn/test_base_qnn.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qnn/test_loss.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qnn/test_qnnc.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qnn/test_qnnr.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/qrc/test_base_qrc.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/util/execution/test_parallel_primitives.py +0 -0
- {squlearn-0.10.0 → squlearn-0.11.0}/tests/util/serialization/test_model_pickler.py +0 -0
|
@@ -23,14 +23,15 @@ jobs:
|
|
|
23
23
|
- name: Set up Python
|
|
24
24
|
uses: actions/setup-python@v6
|
|
25
25
|
with:
|
|
26
|
-
python-version: '3.
|
|
26
|
+
python-version: '3.10'
|
|
27
27
|
- name: Install dependencies
|
|
28
28
|
run: |
|
|
29
29
|
python -m venv venv_minimal
|
|
30
30
|
source venv_minimal/bin/activate
|
|
31
31
|
python -m pip install --upgrade pip
|
|
32
|
-
pip install toml autoray==0.7.2 matplotlib-inline==0.1.7
|
|
32
|
+
pip install toml autoray==0.7.2 matplotlib-inline==0.1.7 "setuptools<81"
|
|
33
33
|
python3 install_lowest_dependencies.py
|
|
34
|
+
pip install "numpy==1.23.5"
|
|
34
35
|
- name: Test with pytest
|
|
35
36
|
run: |
|
|
36
37
|
source venv_minimal/bin/activate
|
|
@@ -40,30 +41,6 @@ jobs:
|
|
|
40
41
|
run: |
|
|
41
42
|
rm -rf venv_minimal
|
|
42
43
|
|
|
43
|
-
pytest_qiskit_0_46:
|
|
44
|
-
runs-on: ubuntu-latest
|
|
45
|
-
|
|
46
|
-
steps:
|
|
47
|
-
- uses: actions/checkout@v5
|
|
48
|
-
- name: Set up Python
|
|
49
|
-
uses: actions/setup-python@v6
|
|
50
|
-
with:
|
|
51
|
-
python-version: '3.9'
|
|
52
|
-
- name: Install dependencies
|
|
53
|
-
run: |
|
|
54
|
-
python -m venv venv_qiskit_0_46
|
|
55
|
-
source venv_qiskit_0_46/bin/activate
|
|
56
|
-
python -m pip install --upgrade pip
|
|
57
|
-
pip install . qiskit==0.46.3 qiskit-ibm-runtime==0.20.0 autoray==0.7.2
|
|
58
|
-
- name: Test with pytest
|
|
59
|
-
run: |
|
|
60
|
-
source venv_qiskit_0_46/bin/activate
|
|
61
|
-
pip install pytest
|
|
62
|
-
pytest tests/
|
|
63
|
-
- name: clean
|
|
64
|
-
run: |
|
|
65
|
-
rm -rf venv_qiskit_0_46
|
|
66
|
-
|
|
67
44
|
pytest_qiskit_1:
|
|
68
45
|
runs-on: ubuntu-latest
|
|
69
46
|
|
|
@@ -72,13 +49,13 @@ jobs:
|
|
|
72
49
|
- name: Set up Python
|
|
73
50
|
uses: actions/setup-python@v6
|
|
74
51
|
with:
|
|
75
|
-
python-version: '3.
|
|
52
|
+
python-version: '3.13'
|
|
76
53
|
- name: Install dependencies
|
|
77
54
|
run: |
|
|
78
55
|
python -m venv venv_qiskit_1
|
|
79
56
|
source venv_qiskit_1/bin/activate
|
|
80
57
|
python -m pip install --upgrade pip
|
|
81
|
-
pip install . qiskit
|
|
58
|
+
pip install . "qiskit<2"
|
|
82
59
|
- name: Test with pytest
|
|
83
60
|
run: |
|
|
84
61
|
source venv_qiskit_1/bin/activate
|
|
@@ -94,7 +71,7 @@ jobs:
|
|
|
94
71
|
|
|
95
72
|
strategy:
|
|
96
73
|
matrix:
|
|
97
|
-
python-version: ["3.
|
|
74
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
98
75
|
|
|
99
76
|
steps:
|
|
100
77
|
- uses: actions/checkout@v5
|
|
@@ -111,11 +88,6 @@ jobs:
|
|
|
111
88
|
source venv_latest/bin/activate
|
|
112
89
|
python -m pip install --upgrade pip
|
|
113
90
|
pip install .[examples]
|
|
114
|
-
- name: Install old autoray
|
|
115
|
-
if: matrix.python-version == '3.9'
|
|
116
|
-
run: |
|
|
117
|
-
source venv_latest/bin/activate
|
|
118
|
-
pip install autoray==0.7.2
|
|
119
91
|
- name: Test with pytest
|
|
120
92
|
run: |
|
|
121
93
|
source venv_latest/bin/activate
|
|
@@ -136,7 +108,7 @@ jobs:
|
|
|
136
108
|
|
|
137
109
|
strategy:
|
|
138
110
|
matrix:
|
|
139
|
-
python-version: ["3.
|
|
111
|
+
python-version: ["3.10", "3.13"]
|
|
140
112
|
|
|
141
113
|
steps:
|
|
142
114
|
- uses: actions/checkout@v5
|
|
@@ -152,10 +124,6 @@ jobs:
|
|
|
152
124
|
python -m venv venv_latest
|
|
153
125
|
.\venv_latest\Scripts\python.exe -m pip install --upgrade pip
|
|
154
126
|
.\venv_latest\Scripts\pip.exe install .
|
|
155
|
-
- name: Install old autoray
|
|
156
|
-
if: matrix.python-version == '3.9'
|
|
157
|
-
run: |
|
|
158
|
-
.\venv_latest\Scripts\pip.exe install autoray==0.7.2
|
|
159
127
|
- name: Test with pytest
|
|
160
128
|
run: |
|
|
161
129
|
.\venv_latest\Scripts\pip.exe install pytest
|
|
@@ -170,7 +138,7 @@ jobs:
|
|
|
170
138
|
|
|
171
139
|
strategy:
|
|
172
140
|
matrix:
|
|
173
|
-
python-version: ["3.
|
|
141
|
+
python-version: ["3.10", "3.13"]
|
|
174
142
|
|
|
175
143
|
steps:
|
|
176
144
|
- uses: actions/checkout@v5
|
|
@@ -187,11 +155,6 @@ jobs:
|
|
|
187
155
|
source venv_latest/bin/activate
|
|
188
156
|
python -m pip install --upgrade pip
|
|
189
157
|
pip install .
|
|
190
|
-
- name: Install old autoray
|
|
191
|
-
if: matrix.python-version == '3.9'
|
|
192
|
-
run: |
|
|
193
|
-
source venv_latest/bin/activate
|
|
194
|
-
pip install autoray==0.7.2
|
|
195
158
|
- name: Test with pytest
|
|
196
159
|
run: |
|
|
197
160
|
source venv_latest/bin/activate
|
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
|
|
19
19
|
strategy:
|
|
20
20
|
matrix:
|
|
21
|
-
python-version: ["3.
|
|
21
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
22
22
|
|
|
23
23
|
steps:
|
|
24
24
|
- uses: actions/checkout@v5
|
|
@@ -35,11 +35,6 @@ jobs:
|
|
|
35
35
|
source venv_latest/bin/activate
|
|
36
36
|
python -m pip install --upgrade pip
|
|
37
37
|
pip install .
|
|
38
|
-
- name: Install old autoray
|
|
39
|
-
if: matrix.python-version == '3.9'
|
|
40
|
-
run: |
|
|
41
|
-
source venv_latest/bin/activate
|
|
42
|
-
pip install autoray==0.7.2
|
|
43
38
|
- name: Test with pytest
|
|
44
39
|
run: |
|
|
45
40
|
source venv_latest/bin/activate
|
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: squlearn
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0
|
|
4
4
|
Summary: A library for quantum machine learning following the scikit-learn standard.
|
|
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.
|
|
8
|
+
Requires-Python: >=3.10
|
|
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
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
17
|
License-File: LICENSE.txt
|
|
14
18
|
Requires-Dist: bayesian-optimization>=1.4.3,<2
|
|
15
19
|
Requires-Dist: dill>=0.3.5
|
|
16
|
-
Requires-Dist: mapomatic>=0.
|
|
20
|
+
Requires-Dist: mapomatic>=0.12.0
|
|
17
21
|
Requires-Dist: networkx>=3.0
|
|
18
|
-
Requires-Dist: numpy>=1.
|
|
22
|
+
Requires-Dist: numpy>=1.22
|
|
19
23
|
Requires-Dist: pennylane>=0.34.0
|
|
20
|
-
Requires-Dist: qiskit>=0.
|
|
21
|
-
Requires-Dist: qiskit-aer>=0.
|
|
24
|
+
Requires-Dist: qiskit>=1.0.0,<3.0.0
|
|
25
|
+
Requires-Dist: qiskit-aer>=0.14.0.1
|
|
22
26
|
Requires-Dist: qiskit-algorithms>=0.3.0
|
|
23
|
-
Requires-Dist: qiskit-ibm-runtime>=0.
|
|
27
|
+
Requires-Dist: qiskit-ibm-runtime>=0.19.0
|
|
24
28
|
Requires-Dist: qiskit-machine-learning>=0.7.0
|
|
25
29
|
Requires-Dist: scipy>=1.8.0
|
|
26
30
|
Requires-Dist: scikit-learn>=1.2.0
|
|
31
|
+
Requires-Dist: sympy>=1.8
|
|
27
32
|
Requires-Dist: tqdm>=4.1.0
|
|
28
33
|
Requires-Dist: qulacs>=0.6.0
|
|
29
|
-
Requires-Dist: black ; extra == "dev"
|
|
34
|
+
Requires-Dist: black[jupyter] ; extra == "dev"
|
|
30
35
|
Requires-Dist: flit ; extra == "dev"
|
|
31
36
|
Requires-Dist: nbmake ; extra == "dev"
|
|
32
37
|
Requires-Dist: pylint ; extra == "dev"
|
|
@@ -73,7 +78,7 @@ sQUlearn offers scikit-learn compatible high-level interfaces for various kernel
|
|
|
73
78
|
|
|
74
79
|
## Prerequisites
|
|
75
80
|
|
|
76
|
-
The package requires **at least Python 3.
|
|
81
|
+
The package requires **at least Python 3.10**.
|
|
77
82
|
## Install sQUlearn
|
|
78
83
|
|
|
79
84
|
### Stable Release
|
|
@@ -122,5 +127,18 @@ For general questions regarding sQUlearn, use the [GitHub Discussions](https://g
|
|
|
122
127
|
|
|
123
128
|
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).
|
|
124
129
|
|
|
130
|
+
## Disclaimer
|
|
131
|
+
|
|
132
|
+
This software is provided strictly for **research and experimental purposes**. It represents early-stage exploratory work and has not been validated, verified, or tested for any operational, commercial, or production use.
|
|
133
|
+
|
|
134
|
+
**Technology Readiness Level: TRL 1–3** (Basic principles observed through proof-of-concept)
|
|
135
|
+
|
|
136
|
+
- No claims are made regarding reliability, accuracy, or fitness for any particular purpose
|
|
137
|
+
- The codebase may be incomplete, unstable, or subject to fundamental changes without notice
|
|
138
|
+
- Results produced by this software are not guaranteed to be reproducible or correct
|
|
139
|
+
- This project exists solely for academic inquiry, algorithmic exploration, and open scientific collaboration
|
|
140
|
+
|
|
141
|
+
This software is not designed, intended, or suitable for deployment in any real-world system or application. Users assume all responsibility for any use beyond basic research experimentation.
|
|
142
|
+
|
|
125
143
|
---
|
|
126
144
|
|
|
@@ -14,7 +14,7 @@ sQUlearn offers scikit-learn compatible high-level interfaces for various kernel
|
|
|
14
14
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
17
|
-
The package requires **at least Python 3.
|
|
17
|
+
The package requires **at least Python 3.10**.
|
|
18
18
|
## Install sQUlearn
|
|
19
19
|
|
|
20
20
|
### Stable Release
|
|
@@ -63,4 +63,17 @@ For general questions regarding sQUlearn, use the [GitHub Discussions](https://g
|
|
|
63
63
|
|
|
64
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).
|
|
65
65
|
|
|
66
|
+
## Disclaimer
|
|
67
|
+
|
|
68
|
+
This software is provided strictly for **research and experimental purposes**. It represents early-stage exploratory work and has not been validated, verified, or tested for any operational, commercial, or production use.
|
|
69
|
+
|
|
70
|
+
**Technology Readiness Level: TRL 1–3** (Basic principles observed through proof-of-concept)
|
|
71
|
+
|
|
72
|
+
- No claims are made regarding reliability, accuracy, or fitness for any particular purpose
|
|
73
|
+
- The codebase may be incomplete, unstable, or subject to fundamental changes without notice
|
|
74
|
+
- Results produced by this software are not guaranteed to be reproducible or correct
|
|
75
|
+
- This project exists solely for academic inquiry, algorithmic exploration, and open scientific collaboration
|
|
76
|
+
|
|
77
|
+
This software is not designed, intended, or suitable for deployment in any real-world system or application. Users assume all responsibility for any use beyond basic research experimentation.
|
|
78
|
+
|
|
66
79
|
---
|
|
@@ -6,22 +6,23 @@ Installation
|
|
|
6
6
|
Prerequisites
|
|
7
7
|
-------------
|
|
8
8
|
|
|
9
|
-
sQUlearn requires a recent python3 (>=3.
|
|
9
|
+
sQUlearn requires a recent python3 (>=3.10) installation.
|
|
10
10
|
Additionally the following python packages are necessary: ::
|
|
11
11
|
|
|
12
12
|
bayesian-optimization>=1.4.3,<2,
|
|
13
|
-
dill>=0.3.
|
|
14
|
-
mapomatic>=0.
|
|
13
|
+
dill>=0.3.5,
|
|
14
|
+
mapomatic>=0.12.0,
|
|
15
15
|
networkx>=3.0,
|
|
16
|
-
numpy>=1.
|
|
16
|
+
numpy>=1.22,
|
|
17
17
|
pennylane>=0.34.0,
|
|
18
|
-
qiskit>=0.
|
|
19
|
-
qiskit-aer>=0.
|
|
18
|
+
qiskit>=1.0.0,<3.0.0,
|
|
19
|
+
qiskit-aer>=0.14.0.1,
|
|
20
20
|
qiskit-algorithms>=0.3.0,
|
|
21
|
-
qiskit-ibm-runtime>=0.
|
|
21
|
+
qiskit-ibm-runtime>=0.19.0,
|
|
22
22
|
qiskit-machine-learning>=0.7.0,
|
|
23
23
|
scipy>=1.8.0,
|
|
24
24
|
scikit-learn>=1.2.0,
|
|
25
|
+
sympy>=1.8,
|
|
25
26
|
tqdm>=4.1.0,
|
|
26
27
|
qulacs>=0.6.0,
|
|
27
28
|
|
|
@@ -83,8 +83,8 @@ It is also possible to utilize the wrapper :class:`QiskitEncodingCircuit` to bui
|
|
|
83
83
|
.. jupyter-execute::
|
|
84
84
|
|
|
85
85
|
from squlearn.encoding_circuit import QiskitEncodingCircuit
|
|
86
|
-
from qiskit.circuit.library import
|
|
87
|
-
local =
|
|
86
|
+
from qiskit.circuit.library import n_local
|
|
87
|
+
local = n_local(3, 'ry', 'cx', 'linear', reps=2, insert_barriers=True)
|
|
88
88
|
QiskitEncodingCircuit(local).draw(output="mpl")
|
|
89
89
|
|
|
90
90
|
|
|
@@ -60,7 +60,9 @@ The :class:`Executor <squlearn.Executor>` class provides the following key comfo
|
|
|
60
60
|
sub-programs. If the version of the Qiskit installation is larger equal than 1.2, the V2 Primitives are created, otherwise the V1 Primitives are returned.
|
|
61
61
|
- **Qiskit Session handling:** Automatically manages the creation and handling of Qiskit IBM Runtime sessions.
|
|
62
62
|
If Sessions are time out, the :class:`Executor <squlearn.Executor>` automatically creates a new session and re-executes the
|
|
63
|
-
job.
|
|
63
|
+
job. **Important:** When using IBM Quantum backends or Sessions, it is **strongly recommended**
|
|
64
|
+
to use the :class:`Executor <squlearn.Executor>` within a context manager (``with`` statement) to ensure proper cleanup
|
|
65
|
+
and avoid unnecessary charges for open sessions. See :ref:`Session Management <session_management>` for details.
|
|
64
66
|
- **Automatic backend selection (IBM Quantum only):** The :class:`Executor <squlearn.Executor>` class can automatically select the most suitable
|
|
65
67
|
backend for the quantum job. The selection process is facilitated by the `mapomatic <https://github.com/qiskit-community/mapomatic>`_ tool `[1]`_.
|
|
66
68
|
The :class:`Executor <squlearn.Executor>` can be initialized with a list of backends, a :class:`QiskitRuntimeService <qiskit_ibm_runtime.QiskitRuntimeService>`, or a Qiskit
|
|
@@ -148,18 +150,39 @@ execution environment:
|
|
|
148
150
|
|
|
149
151
|
|
|
150
152
|
- A :class:`Backend <qiskit.providers.Backend>` from :class:`QiskitRuntimeService <qiskit_ibm_runtime.QiskitRuntimeService>`'s :meth:`backend <qiskit_ibm_runtime.QiskitRuntimeservice.backend>` method, which utilizes the execution of quantum jobs on IBM Quantum.
|
|
151
|
-
Sessions and Primitives are automatically created and managed by the :class:`Executor <squlearn.Executor>` class
|
|
153
|
+
Sessions and Primitives are automatically created and managed by the :class:`Executor <squlearn.Executor>` class.
|
|
154
|
+
|
|
155
|
+
**Important:** Use the context manager to ensure the session is properly closed:
|
|
152
156
|
|
|
153
157
|
.. code-block:: python
|
|
154
158
|
|
|
155
159
|
from squlearn import Executor
|
|
156
160
|
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
157
161
|
|
|
158
|
-
service = QiskitRuntimeService(channel="
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
163
|
+
|
|
164
|
+
# Recommended: Use context manager
|
|
165
|
+
with Executor(service.backend('ibm_kingston'), caching=True) as executor:
|
|
166
|
+
# Your quantum computations here
|
|
167
|
+
qnn.fit(X_train, y_train)
|
|
168
|
+
# Session is automatically closed
|
|
169
|
+
|
|
170
|
+
If you cannot use a context manager, remember to close the session at the end of your code:
|
|
171
|
+
|
|
172
|
+
.. code-block:: python
|
|
173
|
+
|
|
174
|
+
from squlearn import Executor
|
|
175
|
+
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
176
|
+
|
|
177
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
178
|
+
executor = Executor(service.backend('ibm_kingston'))
|
|
179
|
+
try:
|
|
180
|
+
# Your quantum computations here
|
|
181
|
+
qnn.fit(X_train, y_train)
|
|
182
|
+
finally:
|
|
183
|
+
executor.close_session()
|
|
184
|
+
|
|
185
|
+
See :ref:`Session Management <session_management>` for details.
|
|
163
186
|
|
|
164
187
|
It is also possible to pass a list of IBM Quantum backends from which the most suited backend is chosen
|
|
165
188
|
automatically (see :ref:`Automatic backend selection <autoselect>`)
|
|
@@ -172,8 +195,12 @@ execution environment:
|
|
|
172
195
|
from squlearn import Executor
|
|
173
196
|
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
174
197
|
|
|
175
|
-
service = QiskitRuntimeService(channel="
|
|
176
|
-
|
|
198
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
199
|
+
|
|
200
|
+
# Use context manager for proper session management
|
|
201
|
+
with Executor(service, auto_backend_mode="quality") as executor:
|
|
202
|
+
# Your quantum computations here
|
|
203
|
+
qkrr.fit(X_train, y_train)
|
|
177
204
|
|
|
178
205
|
- A pre-initialized :class:`Session <qiskit_ibm_runtime.Session>` object, which can be used to execute quantum jobs on the :class:`QiskitRuntimeService <qiskit_ibm_runtime.QiskitRuntimeService>`.
|
|
179
206
|
|
|
@@ -182,11 +209,13 @@ execution environment:
|
|
|
182
209
|
from squlearn import Executor
|
|
183
210
|
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
184
211
|
|
|
185
|
-
service = QiskitRuntimeService(channel="
|
|
186
|
-
session = service.create_session(backend = service.backend('
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
212
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
213
|
+
session = service.create_session(backend = service.backend('ibm_kingston'))
|
|
214
|
+
|
|
215
|
+
# Use context manager with a pre-initialized session
|
|
216
|
+
with Executor(session) as executor:
|
|
217
|
+
# Your quantum computations here
|
|
218
|
+
qkrr.fit(X_train, y_train)
|
|
190
219
|
|
|
191
220
|
- Pre-configured Primitive (:class:`Estimator <qiskit_ibm_runtime.Estimator>`, :class:`Sampler <qiskit_ibm_runtime.Sampler>`) with options for error mitigation.
|
|
192
221
|
Note that the options from an :class:`Estimator <qiskit_ibm_runtime.Estimator>` are not automatically copied to
|
|
@@ -197,17 +226,17 @@ execution environment:
|
|
|
197
226
|
from squlearn import Executor
|
|
198
227
|
from qiskit_ibm_runtime import QiskitRuntimeService, Estimator
|
|
199
228
|
|
|
200
|
-
service = QiskitRuntimeService(channel="
|
|
229
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
201
230
|
|
|
202
|
-
session = service.create_session(backend = service.backend('
|
|
231
|
+
session = service.create_session(backend = service.backend('ibm_kingston'))
|
|
203
232
|
estimator = Estimator(session=session)
|
|
204
233
|
estimator.options.resilience.zne_mitigation = True
|
|
205
234
|
estimator.options.resilience.zne.noise_factors = (1, 3, 5)
|
|
206
235
|
estimator.options.resilience.zne.extrapolator = "linear"
|
|
207
236
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
237
|
+
with Executor(estimator) as executor:
|
|
238
|
+
# Your quantum computations here
|
|
239
|
+
qkrr.fit(X_train, y_train)
|
|
211
240
|
|
|
212
241
|
|
|
213
242
|
- If only the ``backend.run`` execution is wanted, this can be achieved by utilizing the
|
|
@@ -231,22 +260,24 @@ backend from the :class:`QiskitRuntimeService <qiskit_ibm_runtime.QiskitRuntimeS
|
|
|
231
260
|
from squlearn import Executor
|
|
232
261
|
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
233
262
|
|
|
234
|
-
service = QiskitRuntimeService(channel="
|
|
263
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
235
264
|
|
|
236
265
|
options = {"resilience":{"zne_mitigation" : True,
|
|
237
266
|
"zne":{"noise_factors" : (1, 3, 5),"extrapolator":"linear" }}
|
|
238
267
|
}
|
|
239
268
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
269
|
+
# Recommended: Use context manager
|
|
270
|
+
with Executor(service.backend('ibm_kingston'), # Specify the backend
|
|
271
|
+
cache_dir='cache', # Set cache folder to "cache"
|
|
272
|
+
caching=True, # Enable caching default for remote executions
|
|
273
|
+
log_file="executor.log", # Set-up logging file
|
|
274
|
+
wait_restart=600, # Set 10 min pause between restarts of Jobs
|
|
275
|
+
max_jobs_retries=10, # Set maximum number of restarts to 10 before aborting
|
|
276
|
+
options_estimator=options # Set options for the Estimator primitive
|
|
277
|
+
) as executor:
|
|
278
|
+
executor.set_shots(1234) # Shots can be adjusted after initialization
|
|
279
|
+
# Your quantum computations here
|
|
280
|
+
qnn.fit(X_train, y_train)
|
|
250
281
|
|
|
251
282
|
|
|
252
283
|
Utilizing Executor Primitives in Qiskit Routines
|
|
@@ -294,13 +325,15 @@ They folow the same dictionary datastructure than the original V2 Primtives.
|
|
|
294
325
|
from squlearn import Executor
|
|
295
326
|
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
296
327
|
|
|
297
|
-
service = QiskitRuntimeService(channel="
|
|
328
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
298
329
|
|
|
299
330
|
options = {"resilience":{"zne_mitigation" : True,
|
|
300
331
|
"zne":{"noise_factors" : (1, 3, 5),"extrapolator":"linear" }}
|
|
301
332
|
}
|
|
302
333
|
|
|
303
|
-
|
|
334
|
+
with Executor(service.backend("ibm_kingston"), options_estimator=options) as executor:
|
|
335
|
+
# Your quantum computations here
|
|
336
|
+
pass
|
|
304
337
|
|
|
305
338
|
Alternatively, the options can be adjusted by the attributes :meth:`estimator_options` and :meth:`sampler_options` similar
|
|
306
339
|
to the option interface of the V2 Primtives:
|
|
@@ -310,10 +343,13 @@ to the option interface of the V2 Primtives:
|
|
|
310
343
|
from squlearn import Executor
|
|
311
344
|
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
312
345
|
|
|
313
|
-
service = QiskitRuntimeService(channel="
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
346
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
347
|
+
|
|
348
|
+
with Executor(service.backend("ibm_kingston")) as executor:
|
|
349
|
+
executor.sampler_options.dynamical_decoupling.enable = True
|
|
350
|
+
executor.sampler_options.dynamical_decoupling.sequence_type = "XpXm"
|
|
351
|
+
# Your quantum computations here
|
|
352
|
+
pass
|
|
317
353
|
|
|
318
354
|
Options can be adjusted by the :meth:`set_options` method of the Primitives that are created by the
|
|
319
355
|
:class:`Executor <squlearn.Executor>` class.
|
|
@@ -323,11 +359,73 @@ Options can be adjusted by the :meth:`set_options` method of the Primitives that
|
|
|
323
359
|
from squlearn import Executor
|
|
324
360
|
from qiskit_ibm_runtime import QiskitRuntimeService, Options
|
|
325
361
|
|
|
326
|
-
service = QiskitRuntimeService(channel="
|
|
362
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
327
363
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
364
|
+
with Executor(service.backend("ibm_kingston")) as executor:
|
|
365
|
+
estimator = executor.get_estimator()
|
|
366
|
+
estimator.set_options(resilience_level=2)
|
|
367
|
+
# Your quantum computations here
|
|
368
|
+
pass
|
|
369
|
+
|
|
370
|
+
.. _session_management:
|
|
371
|
+
|
|
372
|
+
Session Management (IBM Quantum)
|
|
373
|
+
--------------------------------
|
|
374
|
+
|
|
375
|
+
When using the :class:`Executor <squlearn.Executor>` with IBM Quantum backends or Sessions, **proper session management is critical** to avoid:
|
|
376
|
+
|
|
377
|
+
- Unnecessary open sessions consuming resources
|
|
378
|
+
- Unexpected charges from IBM Quantum for unused sessions
|
|
379
|
+
- Resource leaks in long-running applications
|
|
380
|
+
|
|
381
|
+
**Recommended: Using Context Manager**
|
|
382
|
+
|
|
383
|
+
The recommended way to use the :class:`Executor <squlearn.Executor>` with IBM Quantum backends is within a context manager (``with`` statement).
|
|
384
|
+
This ensures that sessions are automatically closed when you exit the block, regardless of whether an error occurs:
|
|
385
|
+
|
|
386
|
+
.. code-block:: python
|
|
387
|
+
|
|
388
|
+
from squlearn import Executor
|
|
389
|
+
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
390
|
+
|
|
391
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
392
|
+
|
|
393
|
+
# Recommended: Use context manager
|
|
394
|
+
with Executor(service.backend('ibm_kingston'), caching=True,
|
|
395
|
+
cache_dir='cache', log_file="log.log") as executor:
|
|
396
|
+
# Your quantum computations here
|
|
397
|
+
qnn.fit(X_train, y_train)
|
|
398
|
+
# Session is automatically closed here
|
|
399
|
+
|
|
400
|
+
**Alternative: Manual Session Closing**
|
|
401
|
+
|
|
402
|
+
If you cannot use a context manager, you **must** manually close the session by calling :meth:`close_session` when done.
|
|
403
|
+
A ``UserWarning`` will be issued if a session is created outside of a context manager context:
|
|
404
|
+
|
|
405
|
+
.. code-block:: python
|
|
406
|
+
|
|
407
|
+
from squlearn import Executor
|
|
408
|
+
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
409
|
+
|
|
410
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
411
|
+
executor = Executor(service.backend('ibm_kingston'))
|
|
412
|
+
|
|
413
|
+
try:
|
|
414
|
+
# Your code here
|
|
415
|
+
qnn.fit(X_train, y_train)
|
|
416
|
+
finally:
|
|
417
|
+
# Make sure to close the session
|
|
418
|
+
executor.close_session()
|
|
419
|
+
|
|
420
|
+
**Warning on Session Misuse**
|
|
421
|
+
|
|
422
|
+
Creating a session outside of a context manager will issue a :class:`SessionContextMisuseWarning`.
|
|
423
|
+
This warning indicates that you should either:
|
|
424
|
+
|
|
425
|
+
1. Use a context manager (recommended)
|
|
426
|
+
2. Ensure you explicitly call :meth:`close_session` at the end
|
|
427
|
+
|
|
428
|
+
Failing to do so may result in open sessions consuming resources and incurring charges on IBM Quantum.
|
|
331
429
|
|
|
332
430
|
.. _autoselect:
|
|
333
431
|
|
|
@@ -400,16 +498,17 @@ the mode is switched to ``"speed"``. The :class:`Executor <squlearn.Executor>` i
|
|
|
400
498
|
|
|
401
499
|
# Executor is initialized with a service, and considers all available backends
|
|
402
500
|
# (except simulators)
|
|
403
|
-
service = QiskitRuntimeService(channel="
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
501
|
+
service = QiskitRuntimeService(channel="ibm_quantum_platform", token="INSERT_YOUR_TOKEN_HERE")
|
|
502
|
+
|
|
503
|
+
# Use context manager for proper session management
|
|
504
|
+
with Executor(service, auto_backend_mode="speed") as executor:
|
|
505
|
+
# Create a QKRR model with a FidelityKernel and the ChebyshevRx encoding circuit
|
|
506
|
+
qkrr = QKRR(FidelityKernel(ChebyshevRx(4),executor))
|
|
507
|
+
|
|
508
|
+
# Backend is automatically selected based on the smallest queue
|
|
509
|
+
# All the following functions will be executed on the selected backend
|
|
510
|
+
X_train, y_train = np.array([[0.1],[0.2]]), np.array([0.1,0.2])
|
|
511
|
+
qkrr.fit(X_train, y_train)
|
|
413
512
|
|
|
414
513
|
|
|
415
514
|
In-QPU parallelization (Qiskit only)
|