eigenkit 0.0.0__tar.gz → 1.0.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.0.0/.gitignore +243 -0
- eigenkit-1.0.0/CHANGELOG.md +15 -0
- eigenkit-1.0.0/NOTICE +5 -0
- eigenkit-1.0.0/PKG-INFO +365 -0
- eigenkit-1.0.0/README.md +258 -0
- eigenkit-1.0.0/conftest.py +95 -0
- eigenkit-1.0.0/pyproject.toml +342 -0
- eigenkit-1.0.0/src/eigenkit/__init__.py +302 -0
- eigenkit-1.0.0/src/eigenkit/algorithms/__init__.py +55 -0
- eigenkit-1.0.0/src/eigenkit/algorithms/_hamiltonian_sim.py +315 -0
- eigenkit-1.0.0/src/eigenkit/algorithms/_provider_checks.py +111 -0
- eigenkit-1.0.0/src/eigenkit/algorithms/hhl.py +1522 -0
- eigenkit-1.0.0/src/eigenkit/algorithms/iqae.py +646 -0
- eigenkit-1.0.0/src/eigenkit/algorithms/portfolio_risk.py +780 -0
- eigenkit-1.0.0/src/eigenkit/benchmark/__init__.py +375 -0
- eigenkit-1.0.0/src/eigenkit/benchmark/_baselines.py +69 -0
- eigenkit-1.0.0/src/eigenkit/benchmark/_io.py +45 -0
- eigenkit-1.0.0/src/eigenkit/benchmark/_metrics.py +286 -0
- eigenkit-1.0.0/src/eigenkit/benchmark/_results.py +918 -0
- eigenkit-1.0.0/src/eigenkit/benchmark/_runner.py +264 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/__init__.py +63 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/_pauli.py +117 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/ansatz.py +172 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/exact.py +68 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/fermion.py +155 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/interop.py +73 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/mappings.py +95 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/models.py +70 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/molecule.py +139 -0
- eigenkit-1.0.0/src/eigenkit/chemistry/vqe.py +190 -0
- eigenkit-1.0.0/src/eigenkit/circuit.py +130 -0
- eigenkit-1.0.0/src/eigenkit/configs.py +98 -0
- eigenkit-1.0.0/src/eigenkit/core/__init__.py +155 -0
- eigenkit-1.0.0/src/eigenkit/core/_results.py +125 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/__init__.py +130 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/_kernel_support.py +195 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/_sampling.py +364 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/_state_prep.py +54 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/braket_backend.py +1552 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/cudaquantum_backend.py +550 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/iqm_backend.py +1044 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/numpy_backend.py +1062 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/pennylane_backend.py +724 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/qiskit_aer_backend.py +420 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/qiskit_backend.py +522 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/qiskit_runtime_backend.py +1442 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/qsim_backend.py +427 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/qulacs_backend.py +686 -0
- eigenkit-1.0.0/src/eigenkit/core/backends/tensorcircuit_backend.py +343 -0
- eigenkit-1.0.0/src/eigenkit/core/blocks.py +2331 -0
- eigenkit-1.0.0/src/eigenkit/core/builder.py +469 -0
- eigenkit-1.0.0/src/eigenkit/core/circuit.py +959 -0
- eigenkit-1.0.0/src/eigenkit/core/draw.py +262 -0
- eigenkit-1.0.0/src/eigenkit/core/draw_mpl.py +986 -0
- eigenkit-1.0.0/src/eigenkit/core/interfaces.py +126 -0
- eigenkit-1.0.0/src/eigenkit/core/ir.py +1115 -0
- eigenkit-1.0.0/src/eigenkit/core/observables.py +281 -0
- eigenkit-1.0.0/src/eigenkit/core/optimizers.py +152 -0
- eigenkit-1.0.0/src/eigenkit/core/provider.py +743 -0
- eigenkit-1.0.0/src/eigenkit/core/secret_fields.py +120 -0
- eigenkit-1.0.0/src/eigenkit/core/solver.py +62 -0
- eigenkit-1.0.0/src/eigenkit/core/variational.py +312 -0
- eigenkit-1.0.0/src/eigenkit/core/wire.py +154 -0
- eigenkit-1.0.0/src/eigenkit/datasets/__init__.py +262 -0
- eigenkit-1.0.0/src/eigenkit/datasets/_cache.py +98 -0
- eigenkit-1.0.0/src/eigenkit/datasets/_loaders.py +154 -0
- eigenkit-1.0.0/src/eigenkit/datasets/_registry.py +341 -0
- eigenkit-1.0.0/src/eigenkit/datasets/_synthetic.py +257 -0
- eigenkit-1.0.0/src/eigenkit/datasets/eda.py +1134 -0
- eigenkit-1.0.0/src/eigenkit/optimization/__init__.py +30 -0
- eigenkit-1.0.0/src/eigenkit/optimization/problems.py +232 -0
- eigenkit-1.0.0/src/eigenkit/optimization/qaoa.py +210 -0
- eigenkit-1.0.0/src/eigenkit/photonics/__init__.py +57 -0
- eigenkit-1.0.0/src/eigenkit/photonics/backends/__init__.py +9 -0
- eigenkit-1.0.0/src/eigenkit/photonics/backends/perceval_backend.py +274 -0
- eigenkit-1.0.0/src/eigenkit/photonics/backends/perceval_remote.py +371 -0
- eigenkit-1.0.0/src/eigenkit/photonics/executor.py +152 -0
- eigenkit-1.0.0/src/eigenkit/photonics/gradients.py +293 -0
- eigenkit-1.0.0/src/eigenkit/photonics/ir.py +204 -0
- eigenkit-1.0.0/src/eigenkit/photonics/reservoir.py +264 -0
- eigenkit-1.0.0/src/eigenkit/photonics/torch.py +133 -0
- eigenkit-1.0.0/src/eigenkit/py.typed +0 -0
- eigenkit-1.0.0/src/eigenkit/qml/__init__.py +95 -0
- eigenkit-1.0.0/src/eigenkit/qml/_alignment.py +257 -0
- eigenkit-1.0.0/src/eigenkit/qml/_base.py +277 -0
- eigenkit-1.0.0/src/eigenkit/qml/_kernels.py +945 -0
- eigenkit-1.0.0/src/eigenkit/qml/_registry.py +43 -0
- eigenkit-1.0.0/src/eigenkit/qml/_serialization.py +433 -0
- eigenkit-1.0.0/src/eigenkit/qml/qrc.py +447 -0
- eigenkit-1.0.0/src/eigenkit/qml/qsvc.py +237 -0
- eigenkit-1.0.0/src/eigenkit/qml/qsvr.py +163 -0
- eigenkit-1.0.0/src/eigenkit/reservoir/__init__.py +58 -0
- eigenkit-1.0.0/src/eigenkit/reservoir/driver.py +81 -0
- eigenkit-1.0.0/src/eigenkit/reservoir/features.py +163 -0
- eigenkit-1.0.0/src/eigenkit/reservoir/policies.py +279 -0
- eigenkit-1.0.0/src/eigenkit/reservoir/readout.py +75 -0
- eigenkit-1.0.0/src/eigenkit/torch/__init__.py +13 -0
- eigenkit-1.0.0/src/eigenkit/torch/circuit.py +304 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/__init__.py +42 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/_nn.py +219 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/_seeding.py +76 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/_training.py +319 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/custom.py +482 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/generic.py +711 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/hqnc.py +350 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/hqnr.py +283 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/recurrent_hqnc.py +385 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/recurrent_hqnr.py +444 -0
- eigenkit-1.0.0/src/eigenkit/torch/estimators/timeseries.py +853 -0
- eigenkit-1.0.0/src/eigenkit/torch/interface.py +249 -0
- eigenkit-1.0.0/src/eigenkit/torch/layers/__init__.py +21 -0
- eigenkit-1.0.0/src/eigenkit/torch/layers/_dtype.py +34 -0
- eigenkit-1.0.0/src/eigenkit/torch/layers/_expressivity.py +166 -0
- eigenkit-1.0.0/src/eigenkit/torch/layers/basic.py +129 -0
- eigenkit-1.0.0/src/eigenkit/torch/layers/ensemble.py +159 -0
- eigenkit-1.0.0/src/eigenkit/torch/layers/minmax.py +140 -0
- eigenkit-1.0.0/src/eigenkit/torch/layers/reupload.py +139 -0
- eigenkit-1.0.0/tests/README.md +68 -0
- eigenkit-1.0.0/tests/algorithms/__init__.py +0 -0
- eigenkit-1.0.0/tests/algorithms/conftest.py +27 -0
- eigenkit-1.0.0/tests/algorithms/test_alignment.py +141 -0
- eigenkit-1.0.0/tests/algorithms/test_base.py +73 -0
- eigenkit-1.0.0/tests/algorithms/test_custom.py +234 -0
- eigenkit-1.0.0/tests/algorithms/test_estimator_contract.py +90 -0
- eigenkit-1.0.0/tests/algorithms/test_estimator_family_conformance.py +198 -0
- eigenkit-1.0.0/tests/algorithms/test_estimator_layer_defaults_agree.py +140 -0
- eigenkit-1.0.0/tests/algorithms/test_fitted_model_access.py +178 -0
- eigenkit-1.0.0/tests/algorithms/test_generic.py +1011 -0
- eigenkit-1.0.0/tests/algorithms/test_generic_model_handling.py +115 -0
- eigenkit-1.0.0/tests/algorithms/test_hamiltonian_sim.py +188 -0
- eigenkit-1.0.0/tests/algorithms/test_hamiltonian_sim_deep.py +558 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl.py +324 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_honest.py +285 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_honest_edge_cases.py +758 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_honest_params.py +82 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_honest_properties.py +901 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_honest_theory.py +494 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_honest_trotter.py +813 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_internals.py +883 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_iqae_portfolio_comprehensive.py +801 -0
- eigenkit-1.0.0/tests/algorithms/test_hhl_solves_the_system.py +95 -0
- eigenkit-1.0.0/tests/algorithms/test_hqnc.py +166 -0
- eigenkit-1.0.0/tests/algorithms/test_hqnr.py +142 -0
- eigenkit-1.0.0/tests/algorithms/test_iqae.py +588 -0
- eigenkit-1.0.0/tests/algorithms/test_kernels.py +514 -0
- eigenkit-1.0.0/tests/algorithms/test_portfolio_risk.py +566 -0
- eigenkit-1.0.0/tests/algorithms/test_qrc.py +174 -0
- eigenkit-1.0.0/tests/algorithms/test_qsvc.py +229 -0
- eigenkit-1.0.0/tests/algorithms/test_qsvr.py +57 -0
- eigenkit-1.0.0/tests/algorithms/test_recurrent_hqnc.py +336 -0
- eigenkit-1.0.0/tests/algorithms/test_recurrent_hqnr.py +114 -0
- eigenkit-1.0.0/tests/algorithms/test_secret_fields_bundle.py +154 -0
- eigenkit-1.0.0/tests/algorithms/test_seed_isolation.py +266 -0
- eigenkit-1.0.0/tests/algorithms/test_serialization.py +731 -0
- eigenkit-1.0.0/tests/algorithms/test_set_params_rebuilds_architecture.py +94 -0
- eigenkit-1.0.0/tests/algorithms/test_timeseries.py +552 -0
- eigenkit-1.0.0/tests/algorithms/test_training.py +102 -0
- eigenkit-1.0.0/tests/benchmark/__init__.py +0 -0
- eigenkit-1.0.0/tests/benchmark/conftest.py +35 -0
- eigenkit-1.0.0/tests/benchmark/test_baselines.py +18 -0
- eigenkit-1.0.0/tests/benchmark/test_compare.py +819 -0
- eigenkit-1.0.0/tests/benchmark/test_failed_runs_and_seeding.py +231 -0
- eigenkit-1.0.0/tests/benchmark/test_metrics.py +177 -0
- eigenkit-1.0.0/tests/benchmark/test_result_metric_direction.py +93 -0
- eigenkit-1.0.0/tests/benchmark/test_results.py +429 -0
- eigenkit-1.0.0/tests/chemistry/__init__.py +0 -0
- eigenkit-1.0.0/tests/chemistry/test_ansatz.py +33 -0
- eigenkit-1.0.0/tests/chemistry/test_interop.py +42 -0
- eigenkit-1.0.0/tests/chemistry/test_jordan_wigner.py +70 -0
- eigenkit-1.0.0/tests/chemistry/test_molecule.py +62 -0
- eigenkit-1.0.0/tests/chemistry/test_uccsd.py +105 -0
- eigenkit-1.0.0/tests/chemistry/test_vqe.py +75 -0
- eigenkit-1.0.0/tests/conftest.py +31 -0
- eigenkit-1.0.0/tests/core/__init__.py +0 -0
- eigenkit-1.0.0/tests/core/conftest.py +7 -0
- eigenkit-1.0.0/tests/core/test_backends.py +1376 -0
- eigenkit-1.0.0/tests/core/test_batching.py +300 -0
- eigenkit-1.0.0/tests/core/test_blocks.py +1008 -0
- eigenkit-1.0.0/tests/core/test_braket_async.py +550 -0
- eigenkit-1.0.0/tests/core/test_braket_backend.py +249 -0
- eigenkit-1.0.0/tests/core/test_braket_live.py +289 -0
- eigenkit-1.0.0/tests/core/test_braket_qpu.py +249 -0
- eigenkit-1.0.0/tests/core/test_braket_sample_probabilities.py +767 -0
- eigenkit-1.0.0/tests/core/test_builder.py +168 -0
- eigenkit-1.0.0/tests/core/test_circuit.py +557 -0
- eigenkit-1.0.0/tests/core/test_cudaquantum_backend.py +357 -0
- eigenkit-1.0.0/tests/core/test_declared_gates_are_lowerable.py +114 -0
- eigenkit-1.0.0/tests/core/test_draw.py +182 -0
- eigenkit-1.0.0/tests/core/test_draw_mpl.py +438 -0
- eigenkit-1.0.0/tests/core/test_drawers_cover_every_gate.py +167 -0
- eigenkit-1.0.0/tests/core/test_extended_gates.py +93 -0
- eigenkit-1.0.0/tests/core/test_extended_gates_numpy.py +151 -0
- eigenkit-1.0.0/tests/core/test_hamiltonian_qpe_block.py +227 -0
- eigenkit-1.0.0/tests/core/test_iqm_backend.py +550 -0
- eigenkit-1.0.0/tests/core/test_ir.py +635 -0
- eigenkit-1.0.0/tests/core/test_multi_frequency_shift.py +201 -0
- eigenkit-1.0.0/tests/core/test_numpy_backend.py +572 -0
- eigenkit-1.0.0/tests/core/test_numpy_interface.py +157 -0
- eigenkit-1.0.0/tests/core/test_observables.py +109 -0
- eigenkit-1.0.0/tests/core/test_package_version.py +140 -0
- eigenkit-1.0.0/tests/core/test_pauli_exponential.py +87 -0
- eigenkit-1.0.0/tests/core/test_provider.py +338 -0
- eigenkit-1.0.0/tests/core/test_qiskit_aer_backend.py +370 -0
- eigenkit-1.0.0/tests/core/test_qiskit_runtime_async.py +433 -0
- eigenkit-1.0.0/tests/core/test_qiskit_runtime_backend.py +953 -0
- eigenkit-1.0.0/tests/core/test_qiskit_runtime_ibm_plugins.py +62 -0
- eigenkit-1.0.0/tests/core/test_qpe_blocks.py +303 -0
- eigenkit-1.0.0/tests/core/test_qsim_backend.py +409 -0
- eigenkit-1.0.0/tests/core/test_qulacs_backend.py +355 -0
- eigenkit-1.0.0/tests/core/test_random_state_convention.py +127 -0
- eigenkit-1.0.0/tests/core/test_result_immutability.py +339 -0
- eigenkit-1.0.0/tests/core/test_reuploading_block.py +279 -0
- eigenkit-1.0.0/tests/core/test_sampling.py +261 -0
- eigenkit-1.0.0/tests/core/test_secret_fields.py +125 -0
- eigenkit-1.0.0/tests/core/test_shared_ref_shift.py +105 -0
- eigenkit-1.0.0/tests/core/test_solver_base.py +63 -0
- eigenkit-1.0.0/tests/core/test_state_prep_parity.py +108 -0
- eigenkit-1.0.0/tests/core/test_statevector_phase_parity.py +90 -0
- eigenkit-1.0.0/tests/core/test_tensorcircuit_backend.py +133 -0
- eigenkit-1.0.0/tests/core/test_torch_free_import.py +188 -0
- eigenkit-1.0.0/tests/core/test_trotter_block.py +284 -0
- eigenkit-1.0.0/tests/core/test_trotter_blocks_deep.py +734 -0
- eigenkit-1.0.0/tests/core/test_variational.py +219 -0
- eigenkit-1.0.0/tests/core/test_wire_codecs.py +195 -0
- eigenkit-1.0.0/tests/core/test_zero_state_probability.py +117 -0
- eigenkit-1.0.0/tests/datasets/__init__.py +0 -0
- eigenkit-1.0.0/tests/datasets/test_cache.py +99 -0
- eigenkit-1.0.0/tests/datasets/test_cache_and_labels.py +85 -0
- eigenkit-1.0.0/tests/datasets/test_eda.py +169 -0
- eigenkit-1.0.0/tests/datasets/test_loader_and_series_edges.py +154 -0
- eigenkit-1.0.0/tests/datasets/test_loaders.py +205 -0
- eigenkit-1.0.0/tests/datasets/test_registry.py +226 -0
- eigenkit-1.0.0/tests/datasets/test_synthetic.py +216 -0
- eigenkit-1.0.0/tests/integration/__init__.py +1 -0
- eigenkit-1.0.0/tests/integration/test_user_gpu_cuda_workflows.py +621 -0
- eigenkit-1.0.0/tests/layers/__init__.py +0 -0
- eigenkit-1.0.0/tests/layers/test_basic.py +91 -0
- eigenkit-1.0.0/tests/layers/test_default_ansatz_is_trainable.py +96 -0
- eigenkit-1.0.0/tests/layers/test_degenerate_ansatz_warning.py +186 -0
- eigenkit-1.0.0/tests/layers/test_ensemble.py +70 -0
- eigenkit-1.0.0/tests/layers/test_layer_gradient_values.py +112 -0
- eigenkit-1.0.0/tests/layers/test_layer_input_handling.py +142 -0
- eigenkit-1.0.0/tests/layers/test_minmax_norm.py +93 -0
- eigenkit-1.0.0/tests/layers/test_provider_is_readable.py +87 -0
- eigenkit-1.0.0/tests/layers/test_reupload.py +115 -0
- eigenkit-1.0.0/tests/optimization/__init__.py +0 -0
- eigenkit-1.0.0/tests/optimization/test_problem_energy_agrees_with_hamiltonian.py +104 -0
- eigenkit-1.0.0/tests/optimization/test_problems.py +58 -0
- eigenkit-1.0.0/tests/optimization/test_qaoa.py +116 -0
- eigenkit-1.0.0/tests/photonics/__init__.py +0 -0
- eigenkit-1.0.0/tests/photonics/test_executor.py +86 -0
- eigenkit-1.0.0/tests/photonics/test_gradients.py +245 -0
- eigenkit-1.0.0/tests/photonics/test_import_surface.py +22 -0
- eigenkit-1.0.0/tests/photonics/test_ir.py +119 -0
- eigenkit-1.0.0/tests/photonics/test_perceval_executor.py +132 -0
- eigenkit-1.0.0/tests/photonics/test_quandela_cloud.py +335 -0
- eigenkit-1.0.0/tests/photonics/test_reservoir.py +175 -0
- eigenkit-1.0.0/tests/photonics/test_torch_interface.py +179 -0
- eigenkit-1.0.0/tests/photonics/test_training.py +85 -0
- eigenkit-1.0.0/tests/reservoir/test_reservoir.py +227 -0
- eigenkit-1.0.0/tests/reservoir/test_reservoir_backend_parity.py +66 -0
- eigenkit-1.0.0/tests/test_public_api_contract.py +238 -0
- eigenkit-1.0.0/tests/test_top_level_circuit.py +333 -0
- eigenkit-0.0.0/.github/workflows/release.yml +0 -17
- eigenkit-0.0.0/.gitignore +0 -5
- eigenkit-0.0.0/PKG-INFO +0 -29
- eigenkit-0.0.0/README.md +0 -14
- eigenkit-0.0.0/pyproject.toml +0 -22
- eigenkit-0.0.0/src/eigenkit/__init__.py +0 -8
- {eigenkit-0.0.0 → eigenkit-1.0.0}/LICENSE +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
|
|
222
|
+
# ---------------------------------------------------------------------------
|
|
223
|
+
# Not in the GitHub template
|
|
224
|
+
# ---------------------------------------------------------------------------
|
|
225
|
+
|
|
226
|
+
# Editors and OS
|
|
227
|
+
.idea/
|
|
228
|
+
.vscode/
|
|
229
|
+
.DS_Store
|
|
230
|
+
|
|
231
|
+
# Claude Code
|
|
232
|
+
.claude/
|
|
233
|
+
CLAUDE.md
|
|
234
|
+
CLAUDE.local.md
|
|
235
|
+
|
|
236
|
+
# import-linter (`uv run lint-imports`)
|
|
237
|
+
.import_linter_cache/
|
|
238
|
+
|
|
239
|
+
# What running the example notebooks writes next to them: plots, saved models
|
|
240
|
+
# and the checkpoints `benchmark.compare(save_dir="models")` keeps.
|
|
241
|
+
examples/notebooks/*.png
|
|
242
|
+
examples/notebooks/*.eigenkit
|
|
243
|
+
examples/notebooks/models/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
<!-- version list -->
|
|
4
|
+
|
|
5
|
+
## v1.0.0 (2026-10-13)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
- **deps**: Refresh uv.lock ([#12](https://github.com/eigenorbit/eigenkit/pull/12),
|
|
10
|
+
[`8a6874a`](https://github.com/eigenorbit/eigenkit/commit/8a6874a4746b13b3496b0c7a9b56f48daf2737d6))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- Eigenkit 1.0.0 ([#1](https://github.com/eigenorbit/eigenkit/pull/1),
|
|
15
|
+
[`babce1f`](https://github.com/eigenorbit/eigenkit/commit/babce1fa8c8fffe9c3894dbd4d24b3d13870ba25))
|
eigenkit-1.0.0/NOTICE
ADDED
eigenkit-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: eigenkit
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Build quantum algorithms once. Run them anywhere.
|
|
5
|
+
Project-URL: Homepage, https://eigenorbit.com
|
|
6
|
+
Project-URL: Documentation, https://docs.kit.eigenorbit.com
|
|
7
|
+
Project-URL: Repository, https://github.com/eigenorbit/eigenkit
|
|
8
|
+
Project-URL: Issues, https://github.com/eigenorbit/eigenkit/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/eigenorbit/eigenkit/blob/main/CHANGELOG.md
|
|
10
|
+
Author-email: EigenOrbit <info@eigenorbit.com>
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
License-File: NOTICE
|
|
14
|
+
Keywords: braket,pennylane,pytorch,qaoa,qiskit,quantum computing,quantum machine learning,scikit-learn,variational quantum circuits,vqe
|
|
15
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: Science/Research
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
26
|
+
Classifier: Typing :: Typed
|
|
27
|
+
Requires-Python: <3.15,>=3.12
|
|
28
|
+
Requires-Dist: numpy<3,>=2.4
|
|
29
|
+
Requires-Dist: pydantic<3,>=2.12.4
|
|
30
|
+
Requires-Dist: scipy<2,>=1.10
|
|
31
|
+
Provides-Extra: all
|
|
32
|
+
Requires-Dist: amazon-braket-sdk<2,>=1.117; extra == 'all'
|
|
33
|
+
Requires-Dist: cirq-core>=1.4; extra == 'all'
|
|
34
|
+
Requires-Dist: cuda-quantum-cu13>=0.14.0; (sys_platform == 'linux' or (sys_platform == 'darwin' and platform_machine == 'arm64')) and extra == 'all'
|
|
35
|
+
Requires-Dist: cudaq>=0.14.0; (sys_platform == 'linux' or (sys_platform == 'darwin' and platform_machine == 'arm64')) and extra == 'all'
|
|
36
|
+
Requires-Dist: iqm-client[qiskit]<36,>=35; (python_version < '3.14') and extra == 'all'
|
|
37
|
+
Requires-Dist: jax>=0.4; extra == 'all'
|
|
38
|
+
Requires-Dist: matplotlib>=3.7; extra == 'all'
|
|
39
|
+
Requires-Dist: openfermion>=1.6; extra == 'all'
|
|
40
|
+
Requires-Dist: openfermionpyscf>=0.5; (sys_platform != 'win32') and extra == 'all'
|
|
41
|
+
Requires-Dist: pandas>=2.0; extra == 'all'
|
|
42
|
+
Requires-Dist: pennylane-lightning<0.46,>=0.45; extra == 'all'
|
|
43
|
+
Requires-Dist: pennylane<0.46,>=0.45; extra == 'all'
|
|
44
|
+
Requires-Dist: pydantic>=2.13; (python_version >= '3.14') and extra == 'all'
|
|
45
|
+
Requires-Dist: pylatexenc>=2.10; extra == 'all'
|
|
46
|
+
Requires-Dist: pyscf>=2.3; (sys_platform != 'win32') and extra == 'all'
|
|
47
|
+
Requires-Dist: qiskit-aer<0.18,>=0.16; (python_version < '3.14' or sys_platform != 'linux' or platform_machine != 'aarch64') and extra == 'all'
|
|
48
|
+
Requires-Dist: qiskit-ibm-runtime!=0.44.*,<0.50,>=0.43.1; extra == 'all'
|
|
49
|
+
Requires-Dist: qiskit<3,>=1.4.1; extra == 'all'
|
|
50
|
+
Requires-Dist: qiskit>=2; (python_version >= '3.14') and extra == 'all'
|
|
51
|
+
Requires-Dist: qsimcirq>=0.21; (python_version < '3.14' and (sys_platform != 'linux' or platform_machine != 'aarch64')) and extra == 'all'
|
|
52
|
+
Requires-Dist: qulacs<0.7,>=0.6; (python_version < '3.14') and extra == 'all'
|
|
53
|
+
Requires-Dist: scikit-learn<2,>=1.3; extra == 'all'
|
|
54
|
+
Requires-Dist: tensorcircuit-ng>=1.7; extra == 'all'
|
|
55
|
+
Requires-Dist: torch<3,>=2.5; extra == 'all'
|
|
56
|
+
Requires-Dist: tqdm<5,>=4.66; extra == 'all'
|
|
57
|
+
Provides-Extra: benchmark
|
|
58
|
+
Requires-Dist: matplotlib>=3.7; extra == 'benchmark'
|
|
59
|
+
Requires-Dist: pandas>=2.0; extra == 'benchmark'
|
|
60
|
+
Requires-Dist: scikit-learn<2,>=1.3; extra == 'benchmark'
|
|
61
|
+
Provides-Extra: braket
|
|
62
|
+
Requires-Dist: amazon-braket-sdk<2,>=1.117; extra == 'braket'
|
|
63
|
+
Requires-Dist: pydantic>=2.13; (python_version >= '3.14') and extra == 'braket'
|
|
64
|
+
Provides-Extra: chemistry
|
|
65
|
+
Requires-Dist: openfermion>=1.6; extra == 'chemistry'
|
|
66
|
+
Requires-Dist: openfermionpyscf>=0.5; (sys_platform != 'win32') and extra == 'chemistry'
|
|
67
|
+
Requires-Dist: pyscf>=2.3; (sys_platform != 'win32') and extra == 'chemistry'
|
|
68
|
+
Provides-Extra: cudaquantum
|
|
69
|
+
Requires-Dist: cuda-quantum-cu13>=0.14.0; (sys_platform == 'linux' or (sys_platform == 'darwin' and platform_machine == 'arm64')) and extra == 'cudaquantum'
|
|
70
|
+
Requires-Dist: cudaq>=0.14.0; (sys_platform == 'linux' or (sys_platform == 'darwin' and platform_machine == 'arm64')) and extra == 'cudaquantum'
|
|
71
|
+
Provides-Extra: datasets
|
|
72
|
+
Requires-Dist: scikit-learn<2,>=1.3; extra == 'datasets'
|
|
73
|
+
Provides-Extra: iqm
|
|
74
|
+
Requires-Dist: iqm-client[qiskit]<36,>=35; (python_version < '3.14') and extra == 'iqm'
|
|
75
|
+
Requires-Dist: qiskit-aer<0.18,>=0.16; (python_version < '3.14' or sys_platform != 'linux' or platform_machine != 'aarch64') and extra == 'iqm'
|
|
76
|
+
Requires-Dist: qiskit-ibm-runtime!=0.44.*,<0.50,>=0.43.1; extra == 'iqm'
|
|
77
|
+
Requires-Dist: qiskit<3,>=1.4.1; extra == 'iqm'
|
|
78
|
+
Requires-Dist: qiskit>=2; (python_version >= '3.14') and extra == 'iqm'
|
|
79
|
+
Provides-Extra: pennylane
|
|
80
|
+
Requires-Dist: pennylane-lightning<0.46,>=0.45; extra == 'pennylane'
|
|
81
|
+
Requires-Dist: pennylane<0.46,>=0.45; extra == 'pennylane'
|
|
82
|
+
Provides-Extra: perceval
|
|
83
|
+
Requires-Dist: perceval-quandela<2,>=1.3; extra == 'perceval'
|
|
84
|
+
Provides-Extra: qiskit
|
|
85
|
+
Requires-Dist: qiskit-aer<0.18,>=0.16; (python_version < '3.14' or sys_platform != 'linux' or platform_machine != 'aarch64') and extra == 'qiskit'
|
|
86
|
+
Requires-Dist: qiskit-ibm-runtime!=0.44.*,<0.50,>=0.43.1; extra == 'qiskit'
|
|
87
|
+
Requires-Dist: qiskit<3,>=1.4.1; extra == 'qiskit'
|
|
88
|
+
Requires-Dist: qiskit>=2; (python_version >= '3.14') and extra == 'qiskit'
|
|
89
|
+
Provides-Extra: qml
|
|
90
|
+
Requires-Dist: scikit-learn<2,>=1.3; extra == 'qml'
|
|
91
|
+
Provides-Extra: qsim
|
|
92
|
+
Requires-Dist: cirq-core>=1.4; extra == 'qsim'
|
|
93
|
+
Requires-Dist: qsimcirq>=0.21; (python_version < '3.14' and (sys_platform != 'linux' or platform_machine != 'aarch64')) and extra == 'qsim'
|
|
94
|
+
Provides-Extra: qulacs
|
|
95
|
+
Requires-Dist: qulacs<0.7,>=0.6; (python_version < '3.14') and extra == 'qulacs'
|
|
96
|
+
Provides-Extra: tensorcircuit
|
|
97
|
+
Requires-Dist: jax>=0.4; extra == 'tensorcircuit'
|
|
98
|
+
Requires-Dist: tensorcircuit-ng>=1.7; extra == 'tensorcircuit'
|
|
99
|
+
Provides-Extra: torch
|
|
100
|
+
Requires-Dist: scikit-learn<2,>=1.3; extra == 'torch'
|
|
101
|
+
Requires-Dist: torch<3,>=2.5; extra == 'torch'
|
|
102
|
+
Requires-Dist: tqdm<5,>=4.66; extra == 'torch'
|
|
103
|
+
Provides-Extra: viz
|
|
104
|
+
Requires-Dist: matplotlib>=3.7; extra == 'viz'
|
|
105
|
+
Requires-Dist: pylatexenc>=2.10; extra == 'viz'
|
|
106
|
+
Description-Content-Type: text/markdown
|
|
107
|
+
|
|
108
|
+
# eigenkit
|
|
109
|
+
|
|
110
|
+
[](https://pypi.org/project/eigenkit/)
|
|
111
|
+
[](https://pypi.org/project/eigenkit/)
|
|
112
|
+
[](https://github.com/eigenorbit/eigenkit/blob/main/LICENSE)
|
|
113
|
+
[](https://docs.kit.eigenorbit.com)
|
|
114
|
+
|
|
115
|
+
**Build quantum algorithms once. Run them anywhere.**
|
|
116
|
+
|
|
117
|
+
eigenkit is a provider-neutral quantum computing library by
|
|
118
|
+
[EigenOrbit](https://eigenorbit.com). It separates the definition of a quantum
|
|
119
|
+
algorithm from the backend that executes it. A circuit is described once as
|
|
120
|
+
data: the gates, the qubits they act on, and parameters that are constants or
|
|
121
|
+
references to trainable weights and data inputs. Each provider compiles that
|
|
122
|
+
description into its own SDK's objects and runs it on a simulator or a quantum
|
|
123
|
+
processor, so moving an algorithm to another backend means changing the
|
|
124
|
+
`provider=` argument.
|
|
125
|
+
|
|
126
|
+
## Why move between backends
|
|
127
|
+
|
|
128
|
+
No backend suits every workload, so it is often worth trying several.
|
|
129
|
+
|
|
130
|
+
Simulators differ in what they are fast at. Which one finishes first depends on
|
|
131
|
+
the number of qubits, the structure of the circuit and how much entanglement it
|
|
132
|
+
builds, the batch size, and whether the job evaluates a circuit once or trains
|
|
133
|
+
a model over many batches. They also differ in which gates and parameter
|
|
134
|
+
expressions they accept, and in whether they sample shots or run on a GPU.
|
|
135
|
+
|
|
136
|
+
Quantum processors differ in qubit count, connectivity, native gates, coherence
|
|
137
|
+
and error rates, as well as in price and queue times. A circuit whose
|
|
138
|
+
interactions match a device's coupling map needs fewer routing gates there, so
|
|
139
|
+
the better device can change from one circuit to the next.
|
|
140
|
+
|
|
141
|
+
eigenkit keeps the algorithm the same on all of them, so trying another backend
|
|
142
|
+
means changing one argument.
|
|
143
|
+
|
|
144
|
+
## What's in it
|
|
145
|
+
|
|
146
|
+
- **One circuit, many backends.** Simulators: the built-in numpy simulator,
|
|
147
|
+
PennyLane, Qiskit, Qiskit Aer (statevector and matrix-product-state), Qulacs,
|
|
148
|
+
qsim, TensorCircuit, CUDA-Q and Amazon Braket's simulators. Hardware: IBM
|
|
149
|
+
through Qiskit Runtime, IQM through IQM Resonance, and the QPUs on Amazon
|
|
150
|
+
Braket. Photonic circuits run on Quandela's Perceval.
|
|
151
|
+
- **Gradients on every backend.** A provider's own differentiation is used
|
|
152
|
+
where it has one: the adjoint method on the built-in simulator, Qulacs and
|
|
153
|
+
TensorCircuit, and PennyLane's autodiff. The other simulators and the quantum
|
|
154
|
+
hardware get the library's parameter-shift rule through the same interface.
|
|
155
|
+
On hardware this is opt-in (`enable_gradients=True` in the device config),
|
|
156
|
+
since one backward pass runs at least two jobs per weight.
|
|
157
|
+
- **Two ways to build a circuit.** Gate by gate with `CircuitBuilder`, or from
|
|
158
|
+
ready-made blocks: encodings, variational layers, data re-uploading. Both
|
|
159
|
+
produce the same circuit representation.
|
|
160
|
+
- **Fits the classical stack.** A circuit is a numpy function or a PyTorch
|
|
161
|
+
`nn.Module`, and the ready-made models follow scikit-learn's `fit`/`predict`.
|
|
162
|
+
- **Algorithms.** Machine learning: hybrid neural networks, quantum kernels with
|
|
163
|
+
QSVC/QSVR, reservoir computing. Optimization: QUBO/Ising, Max-Cut, QAOA.
|
|
164
|
+
Chemistry: fermionic operators with the Jordan-Wigner and Bravyi-Kitaev
|
|
165
|
+
mappings, UCCSD, VQE, and molecular Hamiltonians through PySCF and
|
|
166
|
+
OpenFermion. Also HHL, iterative amplitude estimation (IQAE) and portfolio
|
|
167
|
+
risk (VaR/CVaR).
|
|
168
|
+
- **Benchmarking.** `compare()` runs quantum and classical models on the same
|
|
169
|
+
data over several seeds; `eigenkit.datasets` has loaders and synthetic
|
|
170
|
+
generators.
|
|
171
|
+
- **A light core.** numpy, scipy and pydantic. PyTorch, scikit-learn and every
|
|
172
|
+
quantum SDK are optional extras, imported on first use.
|
|
173
|
+
- **Guards on billable hardware.** Compiling for a paid device raises a
|
|
174
|
+
`CostWarning`, and `dry_run_info()` previews a job before it is submitted.
|
|
175
|
+
|
|
176
|
+
The abstraction adds a few tens of microseconds per call against hand-written
|
|
177
|
+
code for the same SDK (measured on PennyLane, Qiskit and Qulacs). The expensive
|
|
178
|
+
native objects, such as a PennyLane QNode or a parametric Qiskit circuit, are
|
|
179
|
+
built once per circuit and reused on every call.
|
|
180
|
+
|
|
181
|
+
## Installation
|
|
182
|
+
|
|
183
|
+
eigenkit needs Python 3.12, 3.13 or 3.14.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
pip install eigenkit
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
That alone builds circuits and runs them on the built-in numpy simulator
|
|
190
|
+
(`provider="numpy"`, the default), and includes the framework-free
|
|
191
|
+
`optimization` (QAOA) and `chemistry` (VQE, Jordan-Wigner / Bravyi-Kitaev)
|
|
192
|
+
domains. PyTorch, scikit-learn and the quantum-SDK backends are opt-in
|
|
193
|
+
**extras**:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
pip install "eigenkit[qiskit,braket]"
|
|
197
|
+
pip install "eigenkit[qml]" # torch-free kernel QML (QSVC/QSVR)
|
|
198
|
+
pip install "eigenkit[torch]" # differentiable hybrid models (HQNC/HQNR)
|
|
199
|
+
pip install "eigenkit[all]"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
| Extra | Adds | Unlocks |
|
|
203
|
+
| ------------- | ------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
204
|
+
| `torch` | PyTorch + scikit-learn (+ tqdm) | `interface="torch"`, the layers, and the hybrid estimators (HQNC/HQNR/...) |
|
|
205
|
+
| `pennylane` | PennyLane + Lightning | `provider="pennylane"` |
|
|
206
|
+
| `qiskit` | Qiskit + Aer + IBM Runtime | `provider="qiskit"`, `"qiskit-aer"`, `"qiskit-aer-mps"`; IBM Runtime / QPU |
|
|
207
|
+
| `braket` | Amazon Braket SDK | `provider="braket"` (local simulator, cloud, AWS QPUs) |
|
|
208
|
+
| `iqm` | iqm-client + its Qiskit adapter | `provider="iqm"` (IQM Resonance direct, plus IQM's fake backends) |
|
|
209
|
+
| `cudaquantum` | NVIDIA CUDA-Q | `CudaQuantumBackend`, opt-in (Linux CPU + GPU; macOS Apple Silicon CPU) |
|
|
210
|
+
| `tensorcircuit` | tensorcircuit-ng + JAX | `provider="tensorcircuit"` |
|
|
211
|
+
| `qulacs` | Qulacs | `provider="qulacs"` |
|
|
212
|
+
| `qsim` | qsimcirq + Cirq | `provider="qsim"` (single-precision, ~1e-6 residual) |
|
|
213
|
+
| `perceval` | Perceval (Quandela's photonic SDK) | `eigenkit.photonics` (local simulation, Quandela Cloud) |
|
|
214
|
+
| `qml` | scikit-learn (torch-free) | `QuantumKernel`, `QSVC`/`QSVR` |
|
|
215
|
+
| `datasets` | scikit-learn | `eigenkit.datasets` |
|
|
216
|
+
| `benchmark` | matplotlib + pandas + scikit-learn | the model comparison harness |
|
|
217
|
+
| `chemistry` | PySCF + OpenFermion (no PySCF on Windows) | real molecules (`molecular_hamiltonian`, `hydrogen_molecule`) |
|
|
218
|
+
| `viz` | matplotlib | `Circuit.draw_mpl()` (the text drawer needs nothing) |
|
|
219
|
+
| `all` | every extra above except `perceval` | — |
|
|
220
|
+
|
|
221
|
+
A backend class and its config are always importable, but
|
|
222
|
+
`Circuit(provider="qiskit")` (and so on), or a torch-only or sklearn-only
|
|
223
|
+
symbol, fails with an install hint until the matching extra is present.
|
|
224
|
+
|
|
225
|
+
Two backends are **opt-in**: installing the package does not register a
|
|
226
|
+
provider name for them, because each needs a deliberate choice from you —
|
|
227
|
+
CUDA-Q sets a process-global target, and Qiskit Runtime submits billable jobs
|
|
228
|
+
to real IBM hardware. Register either yourself once, then use the name
|
|
229
|
+
anywhere:
|
|
230
|
+
|
|
231
|
+
```python
|
|
232
|
+
from eigenkit import CudaQuantumBackend, QiskitRuntimeBackend, register
|
|
233
|
+
|
|
234
|
+
register("cudaq", CudaQuantumBackend())
|
|
235
|
+
register("qiskit-runtime", QiskitRuntimeBackend())
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Every other backend registers itself as soon as its package is importable.
|
|
239
|
+
|
|
240
|
+
CUDA-Q ships wheels for Linux (x86_64 and ARM64) and macOS Apple Silicon; the
|
|
241
|
+
latter runs the CPU-only `qpp-cpu` simulator. On Windows and macOS x86_64 there
|
|
242
|
+
are no wheels, so the extra installs nothing there and the backend raises a
|
|
243
|
+
clear error if you try to use it.
|
|
244
|
+
|
|
245
|
+
PySCF does not support Windows, so there the `chemistry` extra installs
|
|
246
|
+
OpenFermion alone, and real molecules need WSL. Linux ARM has a few notes of
|
|
247
|
+
its own; the Getting started guide lists them under "Platform compatibility".
|
|
248
|
+
|
|
249
|
+
## Quick start
|
|
250
|
+
|
|
251
|
+
A Bell pair, built gate by gate and measured on the built-in simulator:
|
|
252
|
+
|
|
253
|
+
```python
|
|
254
|
+
from eigenkit import Circuit, CircuitBuilder, X, Z
|
|
255
|
+
|
|
256
|
+
qc = CircuitBuilder(n_qubits=2)
|
|
257
|
+
qc.h(0).cnot(0, 1)
|
|
258
|
+
|
|
259
|
+
bell = Circuit(qc.build(), observables=[Z(0) * Z(1), X(0) * X(1)])
|
|
260
|
+
print(bell([])) # [1. 1.] - no trainable weights, so an empty weight vector
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Running it elsewhere means passing a `provider`, for example
|
|
264
|
+
`Circuit(qc.build(), observables=..., provider="qulacs")`.
|
|
265
|
+
|
|
266
|
+
A larger circuit follows the same pattern. This IQP circuit (Hadamards, a layer
|
|
267
|
+
of ZZ rotations, Hadamards) is built by a helper function and run on three
|
|
268
|
+
simulators:
|
|
269
|
+
|
|
270
|
+
```python
|
|
271
|
+
from eigenkit import Circuit, CircuitBuilder, Z
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def iqp(n, edges, angles):
|
|
275
|
+
"""H on every qubit, a ZZ rotation per edge, H on every qubit."""
|
|
276
|
+
qc = CircuitBuilder(n_qubits=n)
|
|
277
|
+
for q in range(n):
|
|
278
|
+
qc.h(q)
|
|
279
|
+
for (i, j), angle in zip(edges, angles):
|
|
280
|
+
qc.pauli_exponential((("Z", i), ("Z", j)), angle)
|
|
281
|
+
for q in range(n):
|
|
282
|
+
qc.h(q)
|
|
283
|
+
return qc.build()
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
spec = iqp(4, [(0, 1), (1, 2), (2, 3), (3, 0)], [0.7, 1.1, 0.4, 1.9])
|
|
287
|
+
observables = [Z(0) * Z(1), Z(1) * Z(2), Z(0) * Z(1) * Z(2) * Z(3)]
|
|
288
|
+
|
|
289
|
+
for provider in ["numpy", "qulacs", "qiskit-aer"]:
|
|
290
|
+
circuit = Circuit(spec, observables=observables, provider=provider)
|
|
291
|
+
print(provider, circuit([]))
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
```text
|
|
295
|
+
numpy [0.46548538 0.11841725 1. ]
|
|
296
|
+
qulacs [0.46548538 0.11841725 1. ]
|
|
297
|
+
qiskit-aer [0.46548538 0.11841725 1. ]
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
`qulacs` and `qiskit-aer` need the `qulacs` and `qiskit` extras. On hardware the
|
|
301
|
+
provider is a device config, and the rest of the program stays the same. This
|
|
302
|
+
needs an IBM Quantum or IQM Resonance account, and compiling for a paid device
|
|
303
|
+
warns with a `CostWarning` first:
|
|
304
|
+
|
|
305
|
+
```python
|
|
306
|
+
from eigenkit import IQMConfig, QiskitRuntimeConfig
|
|
307
|
+
|
|
308
|
+
devices = {
|
|
309
|
+
"IBM Heron": QiskitRuntimeConfig(
|
|
310
|
+
backend_name="ibm_kingston", shots=8192, primitive="sampler"
|
|
311
|
+
),
|
|
312
|
+
"IQM Emerald": IQMConfig(quantum_computer="emerald", shots=8192),
|
|
313
|
+
}
|
|
314
|
+
for name, device in devices.items():
|
|
315
|
+
circuit = Circuit(spec, observables=observables, provider=device)
|
|
316
|
+
print(name, circuit([]))
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Ready-made blocks cover the common shapes, and `jacobian()` returns the
|
|
320
|
+
gradient with respect to the weights:
|
|
321
|
+
|
|
322
|
+
```python
|
|
323
|
+
import numpy as np
|
|
324
|
+
from eigenkit import Circuit, Encoding, Variational, all_z
|
|
325
|
+
|
|
326
|
+
circuit = Circuit(
|
|
327
|
+
blocks=[Encoding(in_features=4), Variational(depth=2)],
|
|
328
|
+
observables=all_z(4),
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
weights = np.zeros(circuit.spec.n_weights)
|
|
332
|
+
x = np.random.uniform(0, np.pi, size=(8, 4)) # a batch of 8 samples
|
|
333
|
+
y = circuit(weights, x) # shape (8, 4): one expectation per qubit
|
|
334
|
+
grad = circuit.jacobian(weights, x[0]) # d<O>/d(weights), no torch needed
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
With `interface="torch"` (the `torch` extra) the same circuit is a
|
|
338
|
+
`torch.nn.Module` that owns its weights and trains inside a larger model.
|
|
339
|
+
|
|
340
|
+
## Documentation
|
|
341
|
+
|
|
342
|
+
The full documentation is at **[docs.kit.eigenorbit.com](https://docs.kit.eigenorbit.com)**:
|
|
343
|
+
a user guide per topic, the algorithms explained, worked examples, and the API
|
|
344
|
+
reference. Every example page also ships as a notebook in
|
|
345
|
+
[`examples/notebooks/`](https://github.com/eigenorbit/eigenkit/tree/main/examples/notebooks).
|
|
346
|
+
|
|
347
|
+
## Contributing
|
|
348
|
+
|
|
349
|
+
Bug reports, ideas and pull requests are welcome.
|
|
350
|
+
[CONTRIBUTING.md](https://github.com/eigenorbit/eigenkit/blob/main/CONTRIBUTING.md)
|
|
351
|
+
covers the development setup, tests and conventions, and
|
|
352
|
+
[ARCHITECTURE.md](https://github.com/eigenorbit/eigenkit/blob/main/ARCHITECTURE.md)
|
|
353
|
+
is a tour of the codebase. Please report security issues privately, as
|
|
354
|
+
described in [SECURITY.md](https://github.com/eigenorbit/eigenkit/blob/main/SECURITY.md).
|
|
355
|
+
|
|
356
|
+
## Citing eigenkit
|
|
357
|
+
|
|
358
|
+
If eigenkit helps your research, please cite it. GitHub's **Cite this
|
|
359
|
+
repository** button gives the reference from
|
|
360
|
+
[CITATION.cff](https://github.com/eigenorbit/eigenkit/blob/main/CITATION.cff).
|
|
361
|
+
|
|
362
|
+
## License
|
|
363
|
+
|
|
364
|
+
eigenkit is licensed under the
|
|
365
|
+
[Apache License 2.0](https://github.com/eigenorbit/eigenkit/blob/main/LICENSE).
|