eigenkit 1.0.1__tar.gz → 1.2.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.
- eigenkit-1.2.0/CHANGELOG.md +100 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/PKG-INFO +8 -2
- {eigenkit-1.0.1 → eigenkit-1.2.0}/README.md +4 -1
- {eigenkit-1.0.1 → eigenkit-1.2.0}/pyproject.toml +29 -4
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/__init__.py +2 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/algorithms/hhl.py +88 -87
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/algorithms/iqae.py +13 -12
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/algorithms/portfolio_risk.py +13 -12
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/benchmark/_results.py +3 -3
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/ansatz.py +25 -19
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/exact.py +2 -1
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/fermion.py +4 -4
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/mappings.py +1 -1
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/models.py +14 -12
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/molecule.py +6 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/vqe.py +3 -3
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/configs.py +23 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/__init__.py +17 -3
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/braket_backend.py +2 -2
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/cudaquantum_backend.py +3 -2
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/numpy_backend.py +20 -19
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/pennylane_backend.py +6 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/qiskit_aer_backend.py +4 -4
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/qiskit_backend.py +5 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/qiskit_runtime_backend.py +26 -1
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/qsim_backend.py +4 -4
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/qulacs_backend.py +37 -30
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/blocks.py +79 -63
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/builder.py +8 -7
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/circuit.py +13 -11
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/ir.py +15 -15
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/observables.py +5 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/optimizers.py +5 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/provider.py +14 -13
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/variational.py +14 -12
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/datasets/__init__.py +2 -2
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/datasets/_synthetic.py +15 -13
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/optimization/problems.py +23 -21
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/optimization/qaoa.py +15 -14
- eigenkit-1.2.0/src/eigenkit/orthogonal/__init__.py +114 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/blocks.py +424 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/circuit.py +93 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/matrix.py +164 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/topology.py +358 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/torch/__init__.py +60 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/torch/adapters.py +365 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/torch/functional.py +136 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/torch/modules.py +652 -0
- eigenkit-1.2.0/src/eigenkit/orthogonal/torch/robust.py +412 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/backends/perceval_backend.py +2 -1
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/executor.py +7 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/gradients.py +24 -23
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/ir.py +9 -7
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/reservoir.py +6 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/_alignment.py +20 -16
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/_base.py +1 -1
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/_kernels.py +16 -15
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/_serialization.py +68 -29
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/qrc.py +12 -10
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/reservoir/__init__.py +5 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/reservoir/features.py +5 -3
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/reservoir/policies.py +31 -25
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/reservoir/readout.py +6 -5
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/circuit.py +2 -2
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/custom.py +10 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/timeseries.py +3 -3
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/layers/__init__.py +6 -2
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/layers/minmax.py +3 -3
- eigenkit-1.2.0/src/eigenkit/torch/layers/orthogonal_qnn.py +198 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/layers/reupload.py +3 -3
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/README.md +1 -1
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_serialization.py +64 -60
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_qiskit_runtime_backend.py +82 -0
- eigenkit-1.2.0/tests/core/test_router_seam.py +433 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_layer_gradient_values.py +2 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_layer_input_handling.py +2 -0
- eigenkit-1.2.0/tests/layers/test_orthogonal_qnn.py +320 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_provider_is_readable.py +3 -2
- eigenkit-1.2.0/tests/orthogonal/_reference.py +349 -0
- eigenkit-1.2.0/tests/orthogonal/test_blocks.py +207 -0
- eigenkit-1.2.0/tests/orthogonal/test_circuit_parity.py +92 -0
- eigenkit-1.2.0/tests/orthogonal/test_docstring_examples.py +44 -0
- eigenkit-1.2.0/tests/orthogonal/test_import_surface.py +19 -0
- eigenkit-1.2.0/tests/orthogonal/test_matrix.py +164 -0
- eigenkit-1.2.0/tests/orthogonal/test_topology.py +229 -0
- eigenkit-1.2.0/tests/orthogonal/test_torch_adapters.py +369 -0
- eigenkit-1.2.0/tests/orthogonal/test_torch_modules.py +577 -0
- eigenkit-1.2.0/tests/orthogonal/test_torch_reference.py +207 -0
- eigenkit-1.2.0/tests/orthogonal/test_torch_robust.py +390 -0
- eigenkit-1.2.0/tests/orthogonal/test_unary_loader.py +170 -0
- eigenkit-1.2.0/tests/photonics/__init__.py +0 -0
- eigenkit-1.0.1/CHANGELOG.md +0 -42
- {eigenkit-1.0.1 → eigenkit-1.2.0}/.gitignore +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/LICENSE +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/NOTICE +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/conftest.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/algorithms/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/algorithms/_hamiltonian_sim.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/algorithms/_provider_checks.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/benchmark/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/benchmark/_baselines.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/benchmark/_io.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/benchmark/_metrics.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/benchmark/_runner.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/_pauli.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/chemistry/interop.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/circuit.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/_results.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/_kernel_support.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/_sampling.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/_state_prep.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/iqm_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/backends/tensorcircuit_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/draw.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/draw_mpl.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/interfaces.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/secret_fields.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/solver.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/core/wire.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/datasets/_cache.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/datasets/_loaders.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/datasets/_registry.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/datasets/eda.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/optimization/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/backends/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/backends/perceval_remote.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/photonics/torch.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/py.typed +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/_registry.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/qsvc.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/qml/qsvr.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/reservoir/driver.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/_nn.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/_seeding.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/_training.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/generic.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/hqnc.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/hqnr.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/recurrent_hqnc.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/estimators/recurrent_hqnr.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/interface.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/layers/_dtype.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/layers/_expressivity.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/layers/basic.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/src/eigenkit/torch/layers/ensemble.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/conftest.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_alignment.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_base.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_custom.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_estimator_contract.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_estimator_family_conformance.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_estimator_layer_defaults_agree.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_fitted_model_access.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_generic.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_generic_model_handling.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hamiltonian_sim.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hamiltonian_sim_deep.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_honest.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_honest_edge_cases.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_honest_params.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_honest_properties.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_honest_theory.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_honest_trotter.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_internals.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_iqae_portfolio_comprehensive.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hhl_solves_the_system.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hqnc.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_hqnr.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_iqae.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_kernels.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_portfolio_risk.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_qrc.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_qsvc.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_qsvr.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_recurrent_hqnc.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_recurrent_hqnr.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_secret_fields_bundle.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_seed_isolation.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_set_params_rebuilds_architecture.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_timeseries.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/algorithms/test_training.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/benchmark/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/benchmark/conftest.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/benchmark/test_baselines.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/benchmark/test_compare.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/benchmark/test_failed_runs_and_seeding.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/benchmark/test_metrics.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/benchmark/test_result_metric_direction.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/benchmark/test_results.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/chemistry/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/chemistry/test_ansatz.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/chemistry/test_interop.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/chemistry/test_jordan_wigner.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/chemistry/test_molecule.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/chemistry/test_uccsd.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/chemistry/test_vqe.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/conftest.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/conftest.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_backends.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_batching.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_blocks.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_braket_async.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_braket_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_braket_live.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_braket_qpu.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_braket_sample_probabilities.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_builder.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_circuit.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_cudaquantum_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_declared_gates_are_lowerable.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_draw.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_draw_mpl.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_drawers_cover_every_gate.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_extended_gates.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_extended_gates_numpy.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_hamiltonian_qpe_block.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_iqm_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_ir.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_multi_frequency_shift.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_numpy_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_numpy_interface.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_observables.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_package_version.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_pauli_exponential.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_provider.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_qiskit_aer_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_qiskit_runtime_async.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_qiskit_runtime_ibm_plugins.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_qpe_blocks.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_qsim_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_qulacs_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_random_state_convention.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_result_immutability.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_reuploading_block.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_sampling.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_secret_fields.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_shared_ref_shift.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_solver_base.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_state_prep_parity.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_statevector_phase_parity.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_tensorcircuit_backend.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_torch_free_import.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_trotter_block.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_trotter_blocks_deep.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_variational.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_wire_codecs.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/core/test_zero_state_probability.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/datasets/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/datasets/test_cache.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/datasets/test_cache_and_labels.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/datasets/test_eda.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/datasets/test_loader_and_series_edges.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/datasets/test_loaders.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/datasets/test_registry.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/datasets/test_synthetic.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/integration/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/integration/test_user_gpu_cuda_workflows.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_basic.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_default_ansatz_is_trainable.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_degenerate_ansatz_warning.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_ensemble.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_minmax_norm.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/layers/test_reupload.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/optimization/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/optimization/test_problem_energy_agrees_with_hamiltonian.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/optimization/test_problems.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/optimization/test_qaoa.py +0 -0
- {eigenkit-1.0.1/tests/photonics → eigenkit-1.2.0/tests/orthogonal}/__init__.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_executor.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_gradients.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_import_surface.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_ir.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_perceval_executor.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_quandela_cloud.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_reservoir.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_torch_interface.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/photonics/test_training.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/reservoir/test_reservoir.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/reservoir/test_reservoir_backend_parity.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/test_public_api_contract.py +0 -0
- {eigenkit-1.0.1 → eigenkit-1.2.0}/tests/test_top_level_circuit.py +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
<!-- version list -->
|
|
4
|
+
|
|
5
|
+
## v1.2.0 (2026-11-05)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **orthogonal**: Exact certificate distances, single adapter names
|
|
10
|
+
([#34](https://github.com/eigenorbit/eigenkit/pull/34),
|
|
11
|
+
[`8d617a2`](https://github.com/eigenorbit/eigenkit/commit/8d617a212b699c76caa5a93ae15cb89bb019b900))
|
|
12
|
+
|
|
13
|
+
### Chores
|
|
14
|
+
|
|
15
|
+
- **deps**: Bump amazon-braket-sdk, pytest and jax
|
|
16
|
+
([#36](https://github.com/eigenorbit/eigenkit/pull/36),
|
|
17
|
+
[`54a9e34`](https://github.com/eigenorbit/eigenkit/commit/54a9e3467883456ff171ad4992f0b206abcc6fe1))
|
|
18
|
+
|
|
19
|
+
- **deps**: Bump vulnerable locked dependencies
|
|
20
|
+
([#27](https://github.com/eigenorbit/eigenkit/pull/27),
|
|
21
|
+
[`8bf972b`](https://github.com/eigenorbit/eigenkit/commit/8bf972b978f2656ee0f64e75715ed0238d42b0bb))
|
|
22
|
+
|
|
23
|
+
### Continuous Integration
|
|
24
|
+
|
|
25
|
+
- Publish a docs preview for each pull request
|
|
26
|
+
([#33](https://github.com/eigenorbit/eigenkit/pull/33),
|
|
27
|
+
[`a2ff611`](https://github.com/eigenorbit/eigenkit/commit/a2ff6115e8ae53c68bbd52b6e718a8bd3b2de32c))
|
|
28
|
+
|
|
29
|
+
- **deps**: Bump astral-sh/setup-uv from 10.3.2 to 10.3.3
|
|
30
|
+
([#23](https://github.com/eigenorbit/eigenkit/pull/23),
|
|
31
|
+
[`bf13039`](https://github.com/eigenorbit/eigenkit/commit/bf130392e056fdc3e98b51c36e6867e87088b162))
|
|
32
|
+
|
|
33
|
+
### Documentation
|
|
34
|
+
|
|
35
|
+
- Write formulas in MathJax ([#35](https://github.com/eigenorbit/eigenkit/pull/35),
|
|
36
|
+
[`f0275ea`](https://github.com/eigenorbit/eigenkit/commit/f0275ea2c30a221f7a05963b5c5f579322b3ecab))
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
- Add eigenkit.orthogonal (orthogonal networks, certified robustness, OrthogonalQNN)
|
|
41
|
+
([#32](https://github.com/eigenorbit/eigenkit/pull/32),
|
|
42
|
+
[`a4bca92`](https://github.com/eigenorbit/eigenkit/commit/a4bca921bf9dd5a796dfe5488b632bfeabbd7781))
|
|
43
|
+
|
|
44
|
+
- Pass primitive options to the Qiskit Runtime primitives
|
|
45
|
+
([#31](https://github.com/eigenorbit/eigenkit/pull/31),
|
|
46
|
+
[`65164a3`](https://github.com/eigenorbit/eigenkit/commit/65164a3ea09e57e0519a6c93e0737ea09ee1cd4f))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## v1.1.0 (2026-10-19)
|
|
50
|
+
|
|
51
|
+
### Documentation
|
|
52
|
+
|
|
53
|
+
- Add the Qiskit Ecosystem badge ([#19](https://github.com/eigenorbit/eigenkit/pull/19),
|
|
54
|
+
[`091edeb`](https://github.com/eigenorbit/eigenkit/commit/091edebc4ac3d0855eb1988ab8e1bcf7a62b96a8))
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
- Add the router provider for eigenorbit-router-client
|
|
59
|
+
([#18](https://github.com/eigenorbit/eigenkit/pull/18),
|
|
60
|
+
[`80a2b10`](https://github.com/eigenorbit/eigenkit/commit/80a2b105129498c1ca756a8e5c4931a33656a2e4))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## v1.0.1 (2026-10-13)
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
- Install cuda-quantum on Apple Silicon from a uv lock
|
|
68
|
+
([#16](https://github.com/eigenorbit/eigenkit/pull/16),
|
|
69
|
+
[`44a826a`](https://github.com/eigenorbit/eigenkit/commit/44a826ad08ec55ecd15ed097187817d66414eb95))
|
|
70
|
+
|
|
71
|
+
- List the pennylane provider only when PennyLane is installed
|
|
72
|
+
([#14](https://github.com/eigenorbit/eigenkit/pull/14),
|
|
73
|
+
[`6ff13ac`](https://github.com/eigenorbit/eigenkit/commit/6ff13ac150a7db59f31d4126f2517fc78575820a))
|
|
74
|
+
|
|
75
|
+
### Continuous Integration
|
|
76
|
+
|
|
77
|
+
- **deps**: Bump astral-sh/setup-uv from 10.2.0 to 10.3.0
|
|
78
|
+
([#2](https://github.com/eigenorbit/eigenkit/pull/2),
|
|
79
|
+
[`498700e`](https://github.com/eigenorbit/eigenkit/commit/498700e5817cefc87ee2a660e41c0aa94c3de4cd))
|
|
80
|
+
|
|
81
|
+
### Documentation
|
|
82
|
+
|
|
83
|
+
- Add link previews, structured data and robots.txt
|
|
84
|
+
([#17](https://github.com/eigenorbit/eigenkit/pull/17),
|
|
85
|
+
[`63c17be`](https://github.com/eigenorbit/eigenkit/commit/63c17be38e8a97d3a918c91b7f21feb45531a07c))
|
|
86
|
+
|
|
87
|
+
- Describe eigenkit as an open-source Python library
|
|
88
|
+
([#15](https://github.com/eigenorbit/eigenkit/pull/15),
|
|
89
|
+
[`898e48d`](https://github.com/eigenorbit/eigenkit/commit/898e48d64bf06e8fd77ebe3b885718bca90c04e1))
|
|
90
|
+
|
|
91
|
+
- Tidy the 1.0.0 changelog entry ([#13](https://github.com/eigenorbit/eigenkit/pull/13),
|
|
92
|
+
[`007f2fd`](https://github.com/eigenorbit/eigenkit/commit/007f2fd24c0a0ab2e708c0759d48f7557e4d96b5))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## v1.0.0 (2026-10-13)
|
|
96
|
+
|
|
97
|
+
### Features
|
|
98
|
+
|
|
99
|
+
- eigenkit 1.0.0 ([#1](https://github.com/eigenorbit/eigenkit/pull/1),
|
|
100
|
+
[`babce1f`](https://github.com/eigenorbit/eigenkit/commit/babce1fa8c8fffe9c3894dbd4d24b3d13870ba25))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: eigenkit
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Open-source Python library for quantum computing. Build quantum algorithms once, run them on any simulator or quantum computer.
|
|
5
5
|
Project-URL: Homepage, https://eigenorbit.com
|
|
6
6
|
Project-URL: Documentation, https://docs.kit.eigenorbit.com
|
|
@@ -34,6 +34,7 @@ Requires-Dist: cirq-core>=1.4; extra == 'all'
|
|
|
34
34
|
Requires-Dist: cuda-quantum-cu13!=0.16.0.post1,>=0.14.0; (sys_platform == 'darwin' and platform_machine == 'arm64') and extra == 'all'
|
|
35
35
|
Requires-Dist: cuda-quantum-cu13>=0.14.0; (sys_platform == 'linux') and extra == 'all'
|
|
36
36
|
Requires-Dist: cudaq>=0.14.0; (sys_platform == 'linux' or (sys_platform == 'darwin' and platform_machine == 'arm64')) and extra == 'all'
|
|
37
|
+
Requires-Dist: eigenorbit-router-client<1,>=0.1; extra == 'all'
|
|
37
38
|
Requires-Dist: iqm-client[qiskit]<36,>=35; (python_version < '3.14') and extra == 'all'
|
|
38
39
|
Requires-Dist: jax>=0.4; extra == 'all'
|
|
39
40
|
Requires-Dist: matplotlib>=3.7; extra == 'all'
|
|
@@ -95,6 +96,8 @@ Requires-Dist: cirq-core>=1.4; extra == 'qsim'
|
|
|
95
96
|
Requires-Dist: qsimcirq>=0.21; (python_version < '3.14' and (sys_platform != 'linux' or platform_machine != 'aarch64')) and extra == 'qsim'
|
|
96
97
|
Provides-Extra: qulacs
|
|
97
98
|
Requires-Dist: qulacs<0.7,>=0.6; (python_version < '3.14') and extra == 'qulacs'
|
|
99
|
+
Provides-Extra: router
|
|
100
|
+
Requires-Dist: eigenorbit-router-client<1,>=0.1; extra == 'router'
|
|
98
101
|
Provides-Extra: tensorcircuit
|
|
99
102
|
Requires-Dist: jax>=0.4; extra == 'tensorcircuit'
|
|
100
103
|
Requires-Dist: tensorcircuit-ng>=1.7; extra == 'tensorcircuit'
|
|
@@ -113,6 +116,7 @@ Description-Content-Type: text/markdown
|
|
|
113
116
|
[](https://pypi.org/project/eigenkit/)
|
|
114
117
|
[](https://github.com/eigenorbit/eigenkit/blob/main/LICENSE)
|
|
115
118
|
[](https://docs.kit.eigenorbit.com)
|
|
119
|
+
[](https://qisk.it/e)
|
|
116
120
|
|
|
117
121
|
**Build quantum algorithms once. Run them anywhere.**
|
|
118
122
|
|
|
@@ -162,7 +166,8 @@ means changing one argument.
|
|
|
162
166
|
- **Fits the classical stack.** A circuit is a numpy function or a PyTorch
|
|
163
167
|
`nn.Module`, and the ready-made models follow scikit-learn's `fit`/`predict`.
|
|
164
168
|
- **Algorithms.** Machine learning: hybrid neural networks, quantum kernels with
|
|
165
|
-
QSVC/QSVR, reservoir computing
|
|
169
|
+
QSVC/QSVR, reservoir computing, orthogonal networks of RBS gates (orthogonal
|
|
170
|
+
fine-tuning, certified robustness). Optimization: QUBO/Ising, Max-Cut, QAOA.
|
|
166
171
|
Chemistry: fermionic operators with the Jordan-Wigner and Bravyi-Kitaev
|
|
167
172
|
mappings, UCCSD, VQE, and molecular Hamiltonians through PySCF and
|
|
168
173
|
OpenFermion. Also HHL, iterative amplitude estimation (IQAE) and portfolio
|
|
@@ -213,6 +218,7 @@ pip install "eigenkit[all]"
|
|
|
213
218
|
| `qulacs` | Qulacs | `provider="qulacs"` |
|
|
214
219
|
| `qsim` | qsimcirq + Cirq | `provider="qsim"` (single-precision, ~1e-6 residual) |
|
|
215
220
|
| `perceval` | Perceval (Quandela's photonic SDK) | `eigenkit.photonics` (local simulation, Quandela Cloud) |
|
|
221
|
+
| `router` | eigenorbit-router-client | `provider="router"`, `RouterConfig` (EigenOrbit Router: real QPUs with one EigenOrbit API key) |
|
|
216
222
|
| `qml` | scikit-learn (torch-free) | `QuantumKernel`, `QSVC`/`QSVR` |
|
|
217
223
|
| `datasets` | scikit-learn | `eigenkit.datasets` |
|
|
218
224
|
| `benchmark` | matplotlib + pandas + scikit-learn | the model comparison harness |
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
[](https://pypi.org/project/eigenkit/)
|
|
5
5
|
[](https://github.com/eigenorbit/eigenkit/blob/main/LICENSE)
|
|
6
6
|
[](https://docs.kit.eigenorbit.com)
|
|
7
|
+
[](https://qisk.it/e)
|
|
7
8
|
|
|
8
9
|
**Build quantum algorithms once. Run them anywhere.**
|
|
9
10
|
|
|
@@ -53,7 +54,8 @@ means changing one argument.
|
|
|
53
54
|
- **Fits the classical stack.** A circuit is a numpy function or a PyTorch
|
|
54
55
|
`nn.Module`, and the ready-made models follow scikit-learn's `fit`/`predict`.
|
|
55
56
|
- **Algorithms.** Machine learning: hybrid neural networks, quantum kernels with
|
|
56
|
-
QSVC/QSVR, reservoir computing
|
|
57
|
+
QSVC/QSVR, reservoir computing, orthogonal networks of RBS gates (orthogonal
|
|
58
|
+
fine-tuning, certified robustness). Optimization: QUBO/Ising, Max-Cut, QAOA.
|
|
57
59
|
Chemistry: fermionic operators with the Jordan-Wigner and Bravyi-Kitaev
|
|
58
60
|
mappings, UCCSD, VQE, and molecular Hamiltonians through PySCF and
|
|
59
61
|
OpenFermion. Also HHL, iterative amplitude estimation (IQAE) and portfolio
|
|
@@ -104,6 +106,7 @@ pip install "eigenkit[all]"
|
|
|
104
106
|
| `qulacs` | Qulacs | `provider="qulacs"` |
|
|
105
107
|
| `qsim` | qsimcirq + Cirq | `provider="qsim"` (single-precision, ~1e-6 residual) |
|
|
106
108
|
| `perceval` | Perceval (Quandela's photonic SDK) | `eigenkit.photonics` (local simulation, Quandela Cloud) |
|
|
109
|
+
| `router` | eigenorbit-router-client | `provider="router"`, `RouterConfig` (EigenOrbit Router: real QPUs with one EigenOrbit API key) |
|
|
107
110
|
| `qml` | scikit-learn (torch-free) | `QuantumKernel`, `QSVC`/`QSVR` |
|
|
108
111
|
| `datasets` | scikit-learn | `eigenkit.datasets` |
|
|
109
112
|
| `benchmark` | matplotlib + pandas + scikit-learn | the model comparison harness |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "eigenkit"
|
|
3
|
-
version = "1.0
|
|
3
|
+
version = "1.2.0"
|
|
4
4
|
description = "Open-source Python library for quantum computing. Build quantum algorithms once, run them on any simulator or quantum computer."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -124,6 +124,10 @@ qsim = [
|
|
|
124
124
|
perceval = [
|
|
125
125
|
"perceval-quandela>=1.3,<2",
|
|
126
126
|
]
|
|
127
|
+
# EigenOrbit Router client: real QPUs with one EigenOrbit API key.
|
|
128
|
+
router = [
|
|
129
|
+
"eigenorbit-router-client>=0.1,<1",
|
|
130
|
+
]
|
|
127
131
|
# Synthetic + real datasets and the sklearn baselines used by them.
|
|
128
132
|
datasets = [
|
|
129
133
|
"scikit-learn>=1.3,<2",
|
|
@@ -159,7 +163,7 @@ qml = [
|
|
|
159
163
|
"scikit-learn>=1.3,<2",
|
|
160
164
|
]
|
|
161
165
|
all = [
|
|
162
|
-
"eigenkit[torch,pennylane,qiskit,braket,iqm,tensorcircuit,cudaquantum,qulacs,qsim,benchmark,datasets,chemistry,qml,viz]",
|
|
166
|
+
"eigenkit[torch,pennylane,qiskit,braket,iqm,tensorcircuit,cudaquantum,qulacs,qsim,router,benchmark,datasets,chemistry,qml,viz]",
|
|
163
167
|
]
|
|
164
168
|
|
|
165
169
|
[project.urls]
|
|
@@ -293,12 +297,18 @@ source_modules = [
|
|
|
293
297
|
"eigenkit.optimization",
|
|
294
298
|
"eigenkit.chemistry",
|
|
295
299
|
"eigenkit.reservoir",
|
|
300
|
+
"eigenkit.orthogonal",
|
|
296
301
|
]
|
|
297
302
|
forbidden_modules = ["torch", "pennylane", "qiskit", "braket", "sklearn", "qulacs", "perceval"]
|
|
303
|
+
# eigenkit.orthogonal.torch is the torch ring of the orthogonal package, loaded
|
|
304
|
+
# lazily by its __getattr__; the framework-free modules of that package are pinned
|
|
305
|
+
# by their own contract below, which ignores nothing.
|
|
306
|
+
ignore_imports = ["eigenkit.orthogonal.torch.** -> torch"]
|
|
298
307
|
|
|
299
308
|
# The qml tier (kernels, SVMs, the sklearn estimator base) may use scikit-learn,
|
|
300
309
|
# but must not require torch or a specific backend SDK at import: the kernels run
|
|
301
|
-
# on the numpy interface, so a torch-free install can still use them.
|
|
310
|
+
# on the numpy interface, so a torch-free install can still use them. Nor does it
|
|
311
|
+
# import the orthogonal ring: _serialization looks its block types up by name.
|
|
302
312
|
[[tool.importlinter.contracts]]
|
|
303
313
|
name = "QML tier does not require torch"
|
|
304
314
|
type = "forbidden"
|
|
@@ -310,7 +320,7 @@ source_modules = [
|
|
|
310
320
|
"eigenkit.qml.qsvr",
|
|
311
321
|
"eigenkit.qml.qrc",
|
|
312
322
|
]
|
|
313
|
-
forbidden_modules = ["torch", "pennylane", "qiskit", "braket", "qulacs"]
|
|
323
|
+
forbidden_modules = ["torch", "pennylane", "qiskit", "braket", "qulacs", "eigenkit.orthogonal"]
|
|
314
324
|
# Runtime-only edge, never hit at import: _serialization imports torch inside
|
|
315
325
|
# functions only when a bundle carries torch state.
|
|
316
326
|
ignore_imports = [
|
|
@@ -343,3 +353,18 @@ source_modules = [
|
|
|
343
353
|
"eigenkit.photonics.gradients",
|
|
344
354
|
]
|
|
345
355
|
forbidden_modules = ["perceval", "torch", "pennylane", "qiskit", "braket", "sklearn", "qulacs"]
|
|
356
|
+
|
|
357
|
+
# The orthogonal-network maths (topologies, matrices, circuit blocks) is NumPy only,
|
|
358
|
+
# so a torch-free install can build the matrices and circuits. Its PyTorch modules
|
|
359
|
+
# live in eigenkit.orthogonal.torch, which the package loads lazily; the import
|
|
360
|
+
# surface staying torch-free is pinned by tests/orthogonal/test_import_surface.py.
|
|
361
|
+
[[tool.importlinter.contracts]]
|
|
362
|
+
name = "Orthogonal compute layer is framework-free"
|
|
363
|
+
type = "forbidden"
|
|
364
|
+
source_modules = [
|
|
365
|
+
"eigenkit.orthogonal.topology",
|
|
366
|
+
"eigenkit.orthogonal.matrix",
|
|
367
|
+
"eigenkit.orthogonal.blocks",
|
|
368
|
+
"eigenkit.orthogonal.circuit",
|
|
369
|
+
]
|
|
370
|
+
forbidden_modules = ["torch", "pennylane", "qiskit", "braket", "sklearn", "qulacs", "perceval"]
|
|
@@ -101,6 +101,7 @@ _LAZY_NAMES = {
|
|
|
101
101
|
"Reupload": "eigenkit.torch.layers",
|
|
102
102
|
"Ensemble": "eigenkit.torch.layers",
|
|
103
103
|
"MinMaxNorm": "eigenkit.torch.layers",
|
|
104
|
+
"OrthogonalQNN": "eigenkit.torch.layers",
|
|
104
105
|
# backend classes + async handles (resolved lazily through `core`)
|
|
105
106
|
"BraketBackend": "eigenkit.core",
|
|
106
107
|
"CudaQuantumBackend": "eigenkit.core",
|
|
@@ -247,6 +248,7 @@ __all__ = [
|
|
|
247
248
|
"Reupload",
|
|
248
249
|
"Ensemble",
|
|
249
250
|
"MinMaxNorm",
|
|
251
|
+
"OrthogonalQNN",
|
|
250
252
|
# block classes
|
|
251
253
|
"Encoding",
|
|
252
254
|
"Variational",
|
|
@@ -41,7 +41,7 @@ _RESIDUAL_WARN_THRESHOLD = 0.25
|
|
|
41
41
|
|
|
42
42
|
@dataclass(frozen=True, eq=False)
|
|
43
43
|
class HHLResult(ValueEquality):
|
|
44
|
-
"""Output of [`HHL.solve()`][eigenkit.algorithms.HHL.solve].
|
|
44
|
+
r"""Output of [`HHL.solve()`][eigenkit.algorithms.HHL.solve].
|
|
45
45
|
|
|
46
46
|
The result is read-only. Assigning to a field raises `FrozenInstanceError`, and
|
|
47
47
|
writing into an array field raises `ValueError`. This prevents a mistyped `=`
|
|
@@ -54,19 +54,19 @@ class HHLResult(ValueEquality):
|
|
|
54
54
|
of a float array is expensive to compute.
|
|
55
55
|
|
|
56
56
|
Attributes:
|
|
57
|
-
solution: The best-fit
|
|
58
|
-
and `complex128` when `A` or `b` has a non-zero imaginary part.
|
|
59
|
-
euclidean_norm: The norm
|
|
60
|
-
computed after the classical least-squares rescaling, so it is not
|
|
61
|
-
norm that HHL itself measures.
|
|
62
|
-
residual: The relative error
|
|
63
|
-
`A` and `b`.
|
|
64
|
-
success_probability: The probability that the ancilla is in
|
|
57
|
+
solution: The best-fit \(x\) with \(Ax \approx b\). It is `float64` for real
|
|
58
|
+
inputs, and `complex128` when `A` or `b` has a non-zero imaginary part.
|
|
59
|
+
euclidean_norm: The norm \(\lVert\mathrm{solution}\rVert\) of the returned solution.
|
|
60
|
+
It is computed after the classical least-squares rescaling, so it is not
|
|
61
|
+
a norm that HHL itself measures.
|
|
62
|
+
residual: The relative error \(\lVert Ax - b \rVert / \lVert b \rVert\),
|
|
63
|
+
computed with the original `A` and `b`.
|
|
64
|
+
success_probability: The probability that the ancilla is in \(|1\rangle\), summed
|
|
65
65
|
over all states of the clock register.
|
|
66
66
|
readout_probability: The probability of the joint event from which the
|
|
67
|
-
solution is read: the ancilla in
|
|
68
|
-
|
|
69
|
-
than `success_probability`, so use it to estimate the number of shots.
|
|
67
|
+
solution is read: the ancilla in \(|1\rangle\) and the clock register in
|
|
68
|
+
\(|0 \cdots 0\rangle\). This is the physical post-selection rate. It is never
|
|
69
|
+
larger than `success_probability`, so use it to estimate the number of shots.
|
|
70
70
|
raw_solution: The post-selected amplitudes as the circuit produced them.
|
|
71
71
|
They are complex, and they come before the imaginary part is dropped
|
|
72
72
|
and before the rescaling, so this is the only part of the output that
|
|
@@ -76,24 +76,25 @@ class HHLResult(ValueEquality):
|
|
|
76
76
|
a small amount of weight into the zero padding.
|
|
77
77
|
|
|
78
78
|
!!! note
|
|
79
|
-
HHL produces the quantum state
|
|
79
|
+
HHL produces the quantum state \(|x\rangle\), not a vector of numbers. The full
|
|
80
80
|
array in this result is read from the simulator's statevector, which only a
|
|
81
81
|
simulator can provide. On hardware, only expectation values can be
|
|
82
|
-
measured, and extracting all
|
|
83
|
-
measurements, which cancels the speedup. In practice,
|
|
82
|
+
measured, and extracting all \(N\) components of \(|x\rangle\) costs \(O(N)\)
|
|
83
|
+
measurements, which cancels the speedup. In practice, \(|x\rangle\) is passed to
|
|
84
84
|
another quantum routine, or used to estimate one observable. Recovering the
|
|
85
|
-
sign of
|
|
86
|
-
of `mode`.
|
|
85
|
+
sign of \(1/\lambda\) needs a separate protocol. All of this applies to both
|
|
86
|
+
values of `mode`.
|
|
87
87
|
|
|
88
88
|
!!! warning
|
|
89
89
|
`solution` is completed by two classical steps that hardware cannot
|
|
90
90
|
perform. For real inputs, the imaginary part is discarded. The magnitude
|
|
91
91
|
and the sign then come from a least-squares projection,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
\(x = \mathrm{raw} \cdot \langle A \cdot \mathrm{raw}, b\rangle /
|
|
93
|
+
\lVert A \cdot \mathrm{raw} \rVert^2\), which uses the full classical \(A\) and
|
|
94
|
+
\(b\). Only the direction of \(\mathrm{raw}\) comes from the quantum computation.
|
|
95
|
+
The rescaling can change `residual` by an order of magnitude, and for an
|
|
96
|
+
indefinite \(A\) its sign correction is not reliable, because
|
|
97
|
+
\(\langle Ax, b\rangle \ge 0\) does not imply \(\langle x, A^{-1}b\rangle \ge 0\).
|
|
97
98
|
"""
|
|
98
99
|
|
|
99
100
|
solution: np.ndarray
|
|
@@ -138,20 +139,20 @@ _HHL_HONEST_REQUIRED_GATES: frozenset[str] = frozenset(
|
|
|
138
139
|
class HHL(BaseQuantumSolver):
|
|
139
140
|
r"""Quantum linear solver based on the algorithm of Harrow, Hassidim and Lloyd (HHL).
|
|
140
141
|
|
|
141
|
-
Solves
|
|
142
|
+
Solves \(Ax = b\) for any invertible square matrix \(A\). If \(A\) is Hermitian, it is
|
|
142
143
|
used directly, even when it is not positive semidefinite. Any other matrix is
|
|
143
|
-
converted to the normal equations
|
|
144
|
-
Hermitian, positive semidefinite system matrix. The cost of this
|
|
145
|
-
that the condition number
|
|
144
|
+
converted to the normal equations \(A^\dagger A x = A^\dagger b\), which have the same
|
|
145
|
+
solution and a Hermitian, positive semidefinite system matrix. The cost of this
|
|
146
|
+
conversion is that the condition number \(\kappa\) is squared.
|
|
146
147
|
|
|
147
148
|
The circuit itself inverts the eigenvalues. It applies controlled `RY`
|
|
148
149
|
rotations to the ancilla, with one fixed angle for each state of the clock
|
|
149
|
-
register, so the reciprocal
|
|
150
|
+
register, so the reciprocal \(1/\lambda\) of each eigenvalue is encoded in the
|
|
150
151
|
amplitudes without any classical division by the eigenvalues. The readout is
|
|
151
152
|
different: it uses the simulator's full statevector and keeps only the part
|
|
152
|
-
where the ancilla is in
|
|
153
|
-
the quantum state
|
|
154
|
-
on a simulator. See [`HHLResult`][eigenkit.algorithms.HHLResult].
|
|
153
|
+
where the ancilla is in \(|1\rangle\) and the clock register is in \(|0\rangle\). HHL
|
|
154
|
+
produces the quantum state \(|x\rangle\), so reading a classical vector from it is
|
|
155
|
+
only possible on a simulator. See [`HHLResult`][eigenkit.algorithms.HHLResult].
|
|
155
156
|
|
|
156
157
|
!!! warning
|
|
157
158
|
The backend must provide `statevector()` on its compiled circuit. The
|
|
@@ -160,47 +161,47 @@ class HHL(BaseQuantumSolver):
|
|
|
160
161
|
[`register()`][eigenkit.core.provider.register] must implement it,
|
|
161
162
|
otherwise `solve()` raises `NotImplementedError`.
|
|
162
163
|
|
|
163
|
-
**Scope and scaling.** HHL is efficient only when three conditions hold:
|
|
164
|
-
a sum of a few short Pauli terms,
|
|
165
|
-
can be prepared efficiently.
|
|
164
|
+
**Scope and scaling.** HHL is efficient only when three conditions hold: \(A\) is
|
|
165
|
+
a sum of a few short Pauli terms, \(A\) is well conditioned, and the state
|
|
166
|
+
\(|b\rangle\) can be prepared efficiently.
|
|
166
167
|
|
|
167
|
-
- *Hamiltonian simulation.*
|
|
168
|
-
decomposition of
|
|
168
|
+
- *Hamiltonian simulation.* \(e^{iAt}\) is Trotterised from the Pauli
|
|
169
|
+
decomposition of \(A\), so its cost follows the number of Pauli terms. This
|
|
169
170
|
means sparsity in the Pauli basis, which is different from sparsity of the
|
|
170
171
|
matrix. The module `algorithms/_hamiltonian_sim.py` explains what this means
|
|
171
172
|
in practice. In short, a sparse matrix is not necessarily cheap to simulate
|
|
172
173
|
here.
|
|
173
|
-
- *State preparation.*
|
|
174
|
+
- *State preparation.* \(|b\rangle\) is prepared with
|
|
174
175
|
[`AmplitudeEncoding`][eigenkit.core.blocks.AmplitudeEncoding], which is
|
|
175
|
-
treated as an oracle of unit cost. Loading general amplitudes costs
|
|
176
|
-
gates, so a real speedup assumes that
|
|
176
|
+
treated as an oracle of unit cost. Loading general amplitudes costs \(O(N)\)
|
|
177
|
+
gates, so a real speedup assumes that \(b\) comes from a formula, from an
|
|
177
178
|
earlier quantum routine, or from a quantum random-access memory (qRAM).
|
|
178
|
-
- *Conditioning.* The condition number
|
|
179
|
+
- *Conditioning.* The condition number \(\kappa\) is never an input. It only bounds
|
|
179
180
|
the achievable success probability and the size of the clock register.
|
|
180
181
|
- *Inversion angles.* The gates are elementary (see
|
|
181
182
|
`_uniformly_controlled_ry()`), so the circuit built in `"honest"` mode
|
|
182
|
-
contains no unitary-matrix gate. However, the
|
|
183
|
+
contains no unitary-matrix gate. However, the \(2^{n_l}\) angles, where \(n_l\) is
|
|
183
184
|
the number of clock qubits, are listed one by one instead of being computed
|
|
184
185
|
by the circuit. The classical description of the circuit therefore has size
|
|
185
|
-
|
|
186
|
+
\(\Theta(2^{n_l})\). The circuit can be built from elementary gates, but its
|
|
186
187
|
description is not compact.
|
|
187
188
|
|
|
188
189
|
Solvers for dense matrices, for example the one of Wossnig, Zhao and Prakash,
|
|
189
190
|
reach a quadratic speedup when the spectral norm is bounded. They need a
|
|
190
191
|
specialised memory architecture that this package does not provide.
|
|
191
192
|
|
|
192
|
-
**Real and complex inputs.** For real
|
|
193
|
+
**Real and complex inputs.** For real \(A\) and \(b\), the readout discards the
|
|
193
194
|
imaginary part. The leading error of the Trotter eigenvectors enters the raw
|
|
194
195
|
vector as a purely imaginary component, so discarding the imaginary part
|
|
195
196
|
removes it. This matters at `trotter_order=1`, where it improves the
|
|
196
197
|
convergence by one order: the measured error falls as `steps⁻²` for real
|
|
197
|
-
inputs, and as `steps⁻¹` for a complex Hermitian
|
|
198
|
-
keep that error. At `trotter_order=2`, the default, the first-order
|
|
199
|
-
already cancels by construction, so there is nothing left to remove, and
|
|
200
|
-
and complex inputs both converge as `steps⁻²`. This advantage was
|
|
201
|
-
It depends on the test for real inputs in
|
|
202
|
-
[`solve()`][eigenkit.algorithms.HHL.solve], so a change to that test changes
|
|
203
|
-
|
|
198
|
+
inputs, and as `steps⁻¹` for a complex Hermitian \(A\) or a complex
|
|
199
|
+
\(b\), which keep that error. At `trotter_order=2`, the default, the first-order
|
|
200
|
+
commutator already cancels by construction, so there is nothing left to remove, and
|
|
201
|
+
real and complex inputs both converge as `steps⁻²`. This advantage was
|
|
202
|
+
not designed. It depends on the test for real inputs in
|
|
203
|
+
[`solve()`][eigenkit.algorithms.HHL.solve], so a change to that test changes the
|
|
204
|
+
convergence rate at order 1.
|
|
204
205
|
|
|
205
206
|
Args:
|
|
206
207
|
n_eigenvalue_qubits: The number of qubits in the clock register.
|
|
@@ -208,67 +209,67 @@ class HHL(BaseQuantumSolver):
|
|
|
208
209
|
value must be at least 1, and at least 2 in `"honest"` mode. More
|
|
209
210
|
qubits give a finer resolution of the spectrum and a larger circuit.
|
|
210
211
|
The default is `4`.
|
|
211
|
-
t: The evolution time for
|
|
212
|
+
t: The evolution time for \(U = e^{iAt}\). If given, it must be positive and
|
|
212
213
|
finite. If `None`, it is chosen automatically: from the spectrum in
|
|
213
214
|
`"reference"` mode, and from a Gershgorin bound in `"honest"` mode. The
|
|
214
215
|
default is `None`.
|
|
215
|
-
epsilon: The relative eigenvalue cutoff, in
|
|
216
|
-
buckets whose estimated eigenvalue is below `epsilon
|
|
217
|
-
treated as zero. For the normal equations, the cutoff applies to the
|
|
218
|
-
singular values instead, and it is implemented as `epsilon
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
epsilon: The relative eigenvalue cutoff, in \([0, 1)\). For a Hermitian \(A\),
|
|
217
|
+
buckets whose estimated eigenvalue is below `epsilon` \(\cdot \lambda_{\max}\)
|
|
218
|
+
are treated as zero. For the normal equations, the cutoff applies to the
|
|
219
|
+
singular values instead, and it is implemented as `epsilon**2` on the squared
|
|
220
|
+
spectrum. If no eigenvalue is above the cutoff, `solve()` raises an error. The
|
|
221
|
+
default is `0.01`.
|
|
221
222
|
provider: The backend to use: a registered name (`"numpy"`, `"pennylane"`,
|
|
222
223
|
`"qiskit"` and so on), a config instance, or a backend object. It must
|
|
223
224
|
provide `statevector()`. The default is `"numpy"`.
|
|
224
225
|
mode: How the circuit is built. This argument is keyword-only.
|
|
225
226
|
|
|
226
227
|
- `"reference"` (the default): the eigenvalues are computed classically
|
|
227
|
-
with `eigvalsh`,
|
|
228
|
+
with `eigvalsh`, \(e^{iAt}\) is a dense `QubitUnitary` computed with
|
|
228
229
|
`expm`, and `t` is tuned to the known spectrum. This mode is fast and
|
|
229
|
-
exact, but the
|
|
230
|
+
exact, but the \(O(N^3)\) precomputation and the dense unitary mean that
|
|
230
231
|
its cost does not follow the scaling of HHL.
|
|
231
232
|
- `"honest"`: the circuit is built as it would be on hardware. No
|
|
232
233
|
eigendecomposition sets any circuit parameter: `t` comes from a
|
|
233
|
-
Gershgorin bound, the scaling constant
|
|
234
|
+
Gershgorin bound, the scaling constant \(C\) of the inversion comes
|
|
234
235
|
from the resolution of the clock register (see
|
|
235
|
-
`_honest_qpe_params()`), and
|
|
236
|
+
`_honest_qpe_params()`), and \(e^{iAt}\) is Trotterised into elementary
|
|
236
237
|
gates. This mode requires `n_eigenvalue_qubits >= 2`. Input
|
|
237
|
-
validation still runs an
|
|
238
|
+
validation still runs an \(O(N^3)\) rank check. This check makes the
|
|
238
239
|
solver safer to use and is not part of the algorithm; see `solve()`.
|
|
239
240
|
trotter_steps: The number of Trotter steps for the base evolution time in
|
|
240
241
|
`"honest"` mode. It is ignored in `"reference"` mode. With `"auto"`,
|
|
241
242
|
the default, the solver picks the smallest number of steps for which a
|
|
242
|
-
computable bound on the Trotter drift
|
|
243
|
-
`trotter_tolerance
|
|
244
|
-
the clock register. This matters because, with a fixed step
|
|
245
|
-
circuit is exact HHL for an effective matrix
|
|
246
|
-
are rotated even when its eigenvalues are exact. That
|
|
247
|
-
direction of the answer while every check based on the spectrum
|
|
248
|
-
reports success. An integer turns off the automatic choice, and the
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
is `"auto"`.
|
|
243
|
+
computable bound on the Trotter drift \(\lVert A_{\mathrm{eff}} - A \rVert\)
|
|
244
|
+
stays below `trotter_tolerance` \(\times C\), which is below the eigenvalue
|
|
245
|
+
resolution of the clock register. This matters because, with a fixed step
|
|
246
|
+
size, the circuit is exact HHL for an effective matrix \(A_{\mathrm{eff}}\)
|
|
247
|
+
whose eigenvectors are rotated even when its eigenvalues are exact. That
|
|
248
|
+
changes the direction of the answer while every check based on the spectrum
|
|
249
|
+
reports success. An integer turns off the automatic choice, and the solver
|
|
250
|
+
warns if the drift bound then exceeds \(C/2\). Above that value, an extreme
|
|
251
|
+
eigenvalue can be captured by the Nyquist bucket or wrap around the branch
|
|
252
|
+
cut. The automatic choice is limited by a gate budget, and the solver says so
|
|
253
|
+
when the limit is reached. The default is `"auto"`.
|
|
254
254
|
trotter_order: The Trotter order, 1 or 2. The default is `2`. The
|
|
255
255
|
symmetric product of order 2 is a palindrome, so the first-order
|
|
256
|
-
commutator cancels, the error falls from
|
|
257
|
-
stays real for a real
|
|
258
|
-
and a real system returns a
|
|
259
|
-
comparisons.
|
|
256
|
+
commutator cancels, the error falls from \(O(\tau)\) to \(O(\tau^2)\), and
|
|
257
|
+
\(A_{\mathrm{eff}}\) stays real for a real \(A\). At order 1,
|
|
258
|
+
\(A_{\mathrm{eff}}\) picks up \(Y\)-type terms, and a real system returns a
|
|
259
|
+
complex state. Order 1 is kept for cost comparisons.
|
|
260
260
|
trotter_tolerance: The target for `trotter_steps="auto"`. This argument is
|
|
261
|
-
keyword-only. The drift bound must not exceed `trotter_tolerance
|
|
262
|
-
The default, `0.25`, keeps the drift at a quarter of a bucket,
|
|
263
|
-
the
|
|
264
|
-
eigenvalue. At order 2, the cost grows as
|
|
261
|
+
keyword-only. The drift bound must not exceed `trotter_tolerance`
|
|
262
|
+
\(\times C\). The default, `0.25`, keeps the drift at a quarter of a bucket,
|
|
263
|
+
below the \(C/2\) threshold at which the Nyquist bucket can capture an
|
|
264
|
+
eigenvalue. At order 2, the cost grows as
|
|
265
|
+
\(\mathrm{steps} \propto 1/\sqrt{\mathrm{tolerance}}\).
|
|
265
266
|
|
|
266
267
|
Raises:
|
|
267
268
|
ValueError: If `n_eigenvalue_qubits` is below 1, if `t` is not a positive
|
|
268
|
-
finite number, or if `epsilon` is outside
|
|
269
|
+
finite number, or if `epsilon` is outside \([0, 1)\).
|
|
269
270
|
|
|
270
271
|
Example:
|
|
271
|
-
This example solves a
|
|
272
|
+
This example solves a \(2 \times 2\) Hermitian system:
|
|
272
273
|
|
|
273
274
|
```python
|
|
274
275
|
import numpy as np
|
|
@@ -349,7 +350,7 @@ class HHL(BaseQuantumSolver):
|
|
|
349
350
|
self.trotter_tolerance = trotter_tolerance
|
|
350
351
|
|
|
351
352
|
def solve(self, A: np.ndarray, b: np.ndarray) -> HHLResult:
|
|
352
|
-
"""Solve the linear system
|
|
353
|
+
r"""Solve the linear system \(Ax = b\).
|
|
353
354
|
|
|
354
355
|
Args:
|
|
355
356
|
A: A real or complex square matrix, which must be invertible. A
|
|
@@ -369,12 +370,12 @@ class HHL(BaseQuantumSolver):
|
|
|
369
370
|
if it returns something else, such as a density matrix.
|
|
370
371
|
|
|
371
372
|
!!! note
|
|
372
|
-
Validation runs one
|
|
373
|
+
Validation runs one \(O(N^3)\) singular value decomposition (SVD) to reject a
|
|
373
374
|
singular `A` and to compute a condition number for the warnings. No
|
|
374
|
-
quantity derived from it reaches `t`,
|
|
375
|
+
quantity derived from it reaches `t`, \(C\), the rotation angles or the
|
|
375
376
|
number of Trotter steps, and changing it would leave the circuit exactly
|
|
376
377
|
the same. `mode="honest"` therefore keeps its defining property, but
|
|
377
|
-
`solve()` itself still does
|
|
378
|
+
`solve()` itself still does \(O(N^3)\) work.
|
|
378
379
|
"""
|
|
379
380
|
from ._provider_checks import check_required_gates
|
|
380
381
|
|