eigenkit 1.1.0__tar.gz → 1.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. eigenkit-1.2.1/CHANGELOG.md +115 -0
  2. {eigenkit-1.1.0 → eigenkit-1.2.1}/PKG-INFO +5 -4
  3. {eigenkit-1.1.0 → eigenkit-1.2.1}/README.md +2 -1
  4. {eigenkit-1.1.0 → eigenkit-1.2.1}/pyproject.toml +30 -4
  5. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/__init__.py +2 -0
  6. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/algorithms/hhl.py +88 -87
  7. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/algorithms/iqae.py +13 -12
  8. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/algorithms/portfolio_risk.py +13 -12
  9. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/benchmark/_results.py +3 -3
  10. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/ansatz.py +25 -19
  11. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/exact.py +2 -1
  12. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/fermion.py +4 -4
  13. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/mappings.py +1 -1
  14. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/models.py +14 -12
  15. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/molecule.py +6 -5
  16. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/vqe.py +3 -3
  17. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/braket_backend.py +2 -2
  18. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/cudaquantum_backend.py +3 -2
  19. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/numpy_backend.py +20 -19
  20. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/pennylane_backend.py +6 -5
  21. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/qiskit_aer_backend.py +4 -4
  22. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/qiskit_backend.py +5 -5
  23. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/qiskit_runtime_backend.py +26 -1
  24. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/qsim_backend.py +4 -4
  25. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/qulacs_backend.py +37 -30
  26. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/blocks.py +79 -63
  27. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/builder.py +8 -7
  28. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/circuit.py +13 -11
  29. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/ir.py +15 -15
  30. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/observables.py +5 -5
  31. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/optimizers.py +5 -5
  32. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/provider.py +13 -13
  33. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/variational.py +14 -12
  34. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/datasets/__init__.py +2 -2
  35. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/datasets/_synthetic.py +15 -13
  36. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/optimization/problems.py +23 -21
  37. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/optimization/qaoa.py +15 -14
  38. eigenkit-1.2.1/src/eigenkit/orthogonal/__init__.py +114 -0
  39. eigenkit-1.2.1/src/eigenkit/orthogonal/blocks.py +424 -0
  40. eigenkit-1.2.1/src/eigenkit/orthogonal/circuit.py +93 -0
  41. eigenkit-1.2.1/src/eigenkit/orthogonal/matrix.py +164 -0
  42. eigenkit-1.2.1/src/eigenkit/orthogonal/topology.py +358 -0
  43. eigenkit-1.2.1/src/eigenkit/orthogonal/torch/__init__.py +60 -0
  44. eigenkit-1.2.1/src/eigenkit/orthogonal/torch/adapters.py +365 -0
  45. eigenkit-1.2.1/src/eigenkit/orthogonal/torch/functional.py +136 -0
  46. eigenkit-1.2.1/src/eigenkit/orthogonal/torch/modules.py +652 -0
  47. eigenkit-1.2.1/src/eigenkit/orthogonal/torch/robust.py +412 -0
  48. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/backends/perceval_backend.py +2 -1
  49. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/executor.py +7 -5
  50. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/gradients.py +24 -23
  51. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/ir.py +9 -7
  52. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/reservoir.py +6 -5
  53. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/_alignment.py +20 -16
  54. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/_base.py +1 -1
  55. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/_kernels.py +16 -15
  56. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/_serialization.py +39 -21
  57. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/qrc.py +12 -10
  58. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/reservoir/__init__.py +5 -5
  59. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/reservoir/features.py +5 -3
  60. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/reservoir/policies.py +31 -25
  61. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/reservoir/readout.py +6 -5
  62. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/circuit.py +2 -2
  63. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/custom.py +10 -0
  64. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/timeseries.py +3 -3
  65. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/layers/__init__.py +6 -2
  66. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/layers/minmax.py +3 -3
  67. eigenkit-1.2.1/src/eigenkit/torch/layers/orthogonal_qnn.py +198 -0
  68. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/layers/reupload.py +3 -3
  69. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/README.md +1 -1
  70. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_qiskit_runtime_backend.py +82 -0
  71. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_router_seam.py +1 -1
  72. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_layer_gradient_values.py +2 -0
  73. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_layer_input_handling.py +2 -0
  74. eigenkit-1.2.1/tests/layers/test_orthogonal_qnn.py +320 -0
  75. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_provider_is_readable.py +3 -2
  76. eigenkit-1.2.1/tests/orthogonal/_reference.py +349 -0
  77. eigenkit-1.2.1/tests/orthogonal/test_blocks.py +207 -0
  78. eigenkit-1.2.1/tests/orthogonal/test_circuit_parity.py +92 -0
  79. eigenkit-1.2.1/tests/orthogonal/test_docstring_examples.py +44 -0
  80. eigenkit-1.2.1/tests/orthogonal/test_import_surface.py +19 -0
  81. eigenkit-1.2.1/tests/orthogonal/test_matrix.py +164 -0
  82. eigenkit-1.2.1/tests/orthogonal/test_topology.py +229 -0
  83. eigenkit-1.2.1/tests/orthogonal/test_torch_adapters.py +369 -0
  84. eigenkit-1.2.1/tests/orthogonal/test_torch_modules.py +577 -0
  85. eigenkit-1.2.1/tests/orthogonal/test_torch_reference.py +207 -0
  86. eigenkit-1.2.1/tests/orthogonal/test_torch_robust.py +390 -0
  87. eigenkit-1.2.1/tests/orthogonal/test_unary_loader.py +170 -0
  88. eigenkit-1.2.1/tests/photonics/__init__.py +0 -0
  89. eigenkit-1.1.0/CHANGELOG.md +0 -56
  90. {eigenkit-1.1.0 → eigenkit-1.2.1}/.gitignore +0 -0
  91. {eigenkit-1.1.0 → eigenkit-1.2.1}/LICENSE +0 -0
  92. {eigenkit-1.1.0 → eigenkit-1.2.1}/NOTICE +0 -0
  93. {eigenkit-1.1.0 → eigenkit-1.2.1}/conftest.py +0 -0
  94. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/algorithms/__init__.py +0 -0
  95. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/algorithms/_hamiltonian_sim.py +0 -0
  96. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/algorithms/_provider_checks.py +0 -0
  97. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/benchmark/__init__.py +0 -0
  98. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/benchmark/_baselines.py +0 -0
  99. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/benchmark/_io.py +0 -0
  100. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/benchmark/_metrics.py +0 -0
  101. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/benchmark/_runner.py +0 -0
  102. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/__init__.py +0 -0
  103. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/_pauli.py +0 -0
  104. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/chemistry/interop.py +0 -0
  105. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/circuit.py +0 -0
  106. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/configs.py +0 -0
  107. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/__init__.py +0 -0
  108. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/_results.py +0 -0
  109. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/__init__.py +0 -0
  110. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/_kernel_support.py +0 -0
  111. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/_sampling.py +0 -0
  112. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/_state_prep.py +0 -0
  113. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/iqm_backend.py +0 -0
  114. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/backends/tensorcircuit_backend.py +0 -0
  115. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/draw.py +0 -0
  116. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/draw_mpl.py +0 -0
  117. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/interfaces.py +0 -0
  118. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/secret_fields.py +0 -0
  119. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/solver.py +0 -0
  120. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/core/wire.py +0 -0
  121. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/datasets/_cache.py +0 -0
  122. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/datasets/_loaders.py +0 -0
  123. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/datasets/_registry.py +0 -0
  124. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/datasets/eda.py +0 -0
  125. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/optimization/__init__.py +0 -0
  126. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/__init__.py +0 -0
  127. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/backends/__init__.py +0 -0
  128. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/backends/perceval_remote.py +0 -0
  129. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/photonics/torch.py +0 -0
  130. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/py.typed +0 -0
  131. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/__init__.py +0 -0
  132. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/_registry.py +0 -0
  133. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/qsvc.py +0 -0
  134. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/qml/qsvr.py +0 -0
  135. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/reservoir/driver.py +0 -0
  136. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/__init__.py +0 -0
  137. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/__init__.py +0 -0
  138. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/_nn.py +0 -0
  139. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/_seeding.py +0 -0
  140. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/_training.py +0 -0
  141. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/generic.py +0 -0
  142. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/hqnc.py +0 -0
  143. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/hqnr.py +0 -0
  144. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/recurrent_hqnc.py +0 -0
  145. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/estimators/recurrent_hqnr.py +0 -0
  146. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/interface.py +0 -0
  147. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/layers/_dtype.py +0 -0
  148. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/layers/_expressivity.py +0 -0
  149. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/layers/basic.py +0 -0
  150. {eigenkit-1.1.0 → eigenkit-1.2.1}/src/eigenkit/torch/layers/ensemble.py +0 -0
  151. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/__init__.py +0 -0
  152. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/conftest.py +0 -0
  153. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_alignment.py +0 -0
  154. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_base.py +0 -0
  155. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_custom.py +0 -0
  156. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_estimator_contract.py +0 -0
  157. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_estimator_family_conformance.py +0 -0
  158. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_estimator_layer_defaults_agree.py +0 -0
  159. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_fitted_model_access.py +0 -0
  160. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_generic.py +0 -0
  161. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_generic_model_handling.py +0 -0
  162. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hamiltonian_sim.py +0 -0
  163. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hamiltonian_sim_deep.py +0 -0
  164. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl.py +0 -0
  165. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_honest.py +0 -0
  166. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_honest_edge_cases.py +0 -0
  167. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_honest_params.py +0 -0
  168. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_honest_properties.py +0 -0
  169. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_honest_theory.py +0 -0
  170. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_honest_trotter.py +0 -0
  171. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_internals.py +0 -0
  172. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_iqae_portfolio_comprehensive.py +0 -0
  173. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hhl_solves_the_system.py +0 -0
  174. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hqnc.py +0 -0
  175. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_hqnr.py +0 -0
  176. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_iqae.py +0 -0
  177. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_kernels.py +0 -0
  178. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_portfolio_risk.py +0 -0
  179. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_qrc.py +0 -0
  180. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_qsvc.py +0 -0
  181. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_qsvr.py +0 -0
  182. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_recurrent_hqnc.py +0 -0
  183. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_recurrent_hqnr.py +0 -0
  184. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_secret_fields_bundle.py +0 -0
  185. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_seed_isolation.py +0 -0
  186. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_serialization.py +0 -0
  187. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_set_params_rebuilds_architecture.py +0 -0
  188. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_timeseries.py +0 -0
  189. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/algorithms/test_training.py +0 -0
  190. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/benchmark/__init__.py +0 -0
  191. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/benchmark/conftest.py +0 -0
  192. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/benchmark/test_baselines.py +0 -0
  193. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/benchmark/test_compare.py +0 -0
  194. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/benchmark/test_failed_runs_and_seeding.py +0 -0
  195. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/benchmark/test_metrics.py +0 -0
  196. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/benchmark/test_result_metric_direction.py +0 -0
  197. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/benchmark/test_results.py +0 -0
  198. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/chemistry/__init__.py +0 -0
  199. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/chemistry/test_ansatz.py +0 -0
  200. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/chemistry/test_interop.py +0 -0
  201. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/chemistry/test_jordan_wigner.py +0 -0
  202. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/chemistry/test_molecule.py +0 -0
  203. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/chemistry/test_uccsd.py +0 -0
  204. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/chemistry/test_vqe.py +0 -0
  205. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/conftest.py +0 -0
  206. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/__init__.py +0 -0
  207. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/conftest.py +0 -0
  208. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_backends.py +0 -0
  209. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_batching.py +0 -0
  210. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_blocks.py +0 -0
  211. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_braket_async.py +0 -0
  212. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_braket_backend.py +0 -0
  213. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_braket_live.py +0 -0
  214. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_braket_qpu.py +0 -0
  215. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_braket_sample_probabilities.py +0 -0
  216. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_builder.py +0 -0
  217. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_circuit.py +0 -0
  218. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_cudaquantum_backend.py +0 -0
  219. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_declared_gates_are_lowerable.py +0 -0
  220. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_draw.py +0 -0
  221. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_draw_mpl.py +0 -0
  222. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_drawers_cover_every_gate.py +0 -0
  223. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_extended_gates.py +0 -0
  224. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_extended_gates_numpy.py +0 -0
  225. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_hamiltonian_qpe_block.py +0 -0
  226. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_iqm_backend.py +0 -0
  227. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_ir.py +0 -0
  228. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_multi_frequency_shift.py +0 -0
  229. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_numpy_backend.py +0 -0
  230. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_numpy_interface.py +0 -0
  231. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_observables.py +0 -0
  232. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_package_version.py +0 -0
  233. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_pauli_exponential.py +0 -0
  234. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_provider.py +0 -0
  235. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_qiskit_aer_backend.py +0 -0
  236. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_qiskit_runtime_async.py +0 -0
  237. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_qiskit_runtime_ibm_plugins.py +0 -0
  238. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_qpe_blocks.py +0 -0
  239. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_qsim_backend.py +0 -0
  240. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_qulacs_backend.py +0 -0
  241. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_random_state_convention.py +0 -0
  242. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_result_immutability.py +0 -0
  243. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_reuploading_block.py +0 -0
  244. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_sampling.py +0 -0
  245. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_secret_fields.py +0 -0
  246. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_shared_ref_shift.py +0 -0
  247. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_solver_base.py +0 -0
  248. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_state_prep_parity.py +0 -0
  249. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_statevector_phase_parity.py +0 -0
  250. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_tensorcircuit_backend.py +0 -0
  251. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_torch_free_import.py +0 -0
  252. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_trotter_block.py +0 -0
  253. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_trotter_blocks_deep.py +0 -0
  254. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_variational.py +0 -0
  255. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_wire_codecs.py +0 -0
  256. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/core/test_zero_state_probability.py +0 -0
  257. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/datasets/__init__.py +0 -0
  258. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/datasets/test_cache.py +0 -0
  259. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/datasets/test_cache_and_labels.py +0 -0
  260. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/datasets/test_eda.py +0 -0
  261. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/datasets/test_loader_and_series_edges.py +0 -0
  262. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/datasets/test_loaders.py +0 -0
  263. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/datasets/test_registry.py +0 -0
  264. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/datasets/test_synthetic.py +0 -0
  265. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/integration/__init__.py +0 -0
  266. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/integration/test_user_gpu_cuda_workflows.py +0 -0
  267. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/__init__.py +0 -0
  268. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_basic.py +0 -0
  269. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_default_ansatz_is_trainable.py +0 -0
  270. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_degenerate_ansatz_warning.py +0 -0
  271. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_ensemble.py +0 -0
  272. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_minmax_norm.py +0 -0
  273. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/layers/test_reupload.py +0 -0
  274. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/optimization/__init__.py +0 -0
  275. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/optimization/test_problem_energy_agrees_with_hamiltonian.py +0 -0
  276. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/optimization/test_problems.py +0 -0
  277. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/optimization/test_qaoa.py +0 -0
  278. {eigenkit-1.1.0/tests/photonics → eigenkit-1.2.1/tests/orthogonal}/__init__.py +0 -0
  279. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_executor.py +0 -0
  280. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_gradients.py +0 -0
  281. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_import_surface.py +0 -0
  282. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_ir.py +0 -0
  283. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_perceval_executor.py +0 -0
  284. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_quandela_cloud.py +0 -0
  285. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_reservoir.py +0 -0
  286. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_torch_interface.py +0 -0
  287. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/photonics/test_training.py +0 -0
  288. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/reservoir/test_reservoir.py +0 -0
  289. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/reservoir/test_reservoir_backend_parity.py +0 -0
  290. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/test_public_api_contract.py +0 -0
  291. {eigenkit-1.1.0 → eigenkit-1.2.1}/tests/test_top_level_circuit.py +0 -0
@@ -0,0 +1,115 @@
1
+ # Changelog
2
+
3
+ <!-- version list -->
4
+
5
+ ## v1.2.1 (2026-11-05)
6
+
7
+ ### Bug Fixes
8
+
9
+ - Require eigenorbit-router-client 0.2 in the router extra
10
+ ([#38](https://github.com/eigenorbit/eigenkit/pull/38),
11
+ [`bc0eb8e`](https://github.com/eigenorbit/eigenkit/commit/bc0eb8e955c6d7fc1260c16fd7953a30c5207649))
12
+
13
+ ### Chores
14
+
15
+ - **release**: Order changelog sections by importance
16
+ ([#37](https://github.com/eigenorbit/eigenkit/pull/37),
17
+ [`a35c5ff`](https://github.com/eigenorbit/eigenkit/commit/a35c5ff4f6730f0be4a45cb7b0fc647cd3b3719d))
18
+
19
+
20
+ ## v1.2.0 (2026-11-05)
21
+
22
+ ### Features
23
+
24
+ - Add eigenkit.orthogonal (orthogonal networks, certified robustness, OrthogonalQNN)
25
+ ([#32](https://github.com/eigenorbit/eigenkit/pull/32),
26
+ [`a4bca92`](https://github.com/eigenorbit/eigenkit/commit/a4bca921bf9dd5a796dfe5488b632bfeabbd7781))
27
+
28
+ - Pass primitive options to the Qiskit Runtime primitives
29
+ ([#31](https://github.com/eigenorbit/eigenkit/pull/31),
30
+ [`65164a3`](https://github.com/eigenorbit/eigenkit/commit/65164a3ea09e57e0519a6c93e0737ea09ee1cd4f))
31
+
32
+ ### Bug Fixes
33
+
34
+ - **orthogonal**: Exact certificate distances, single adapter names
35
+ ([#34](https://github.com/eigenorbit/eigenkit/pull/34),
36
+ [`8d617a2`](https://github.com/eigenorbit/eigenkit/commit/8d617a212b699c76caa5a93ae15cb89bb019b900))
37
+
38
+ ### Documentation
39
+
40
+ - Write formulas in MathJax ([#35](https://github.com/eigenorbit/eigenkit/pull/35),
41
+ [`f0275ea`](https://github.com/eigenorbit/eigenkit/commit/f0275ea2c30a221f7a05963b5c5f579322b3ecab))
42
+
43
+ ### Continuous Integration
44
+
45
+ - Publish a docs preview for each pull request
46
+ ([#33](https://github.com/eigenorbit/eigenkit/pull/33),
47
+ [`a2ff611`](https://github.com/eigenorbit/eigenkit/commit/a2ff6115e8ae53c68bbd52b6e718a8bd3b2de32c))
48
+
49
+ - **deps**: Bump astral-sh/setup-uv from 10.3.2 to 10.3.3
50
+ ([#23](https://github.com/eigenorbit/eigenkit/pull/23),
51
+ [`bf13039`](https://github.com/eigenorbit/eigenkit/commit/bf130392e056fdc3e98b51c36e6867e87088b162))
52
+
53
+ ### Chores
54
+
55
+ - **deps**: Bump amazon-braket-sdk, pytest and jax
56
+ ([#36](https://github.com/eigenorbit/eigenkit/pull/36),
57
+ [`54a9e34`](https://github.com/eigenorbit/eigenkit/commit/54a9e3467883456ff171ad4992f0b206abcc6fe1))
58
+
59
+ - **deps**: Bump vulnerable locked dependencies
60
+ ([#27](https://github.com/eigenorbit/eigenkit/pull/27),
61
+ [`8bf972b`](https://github.com/eigenorbit/eigenkit/commit/8bf972b978f2656ee0f64e75715ed0238d42b0bb))
62
+
63
+
64
+ ## v1.1.0 (2026-10-19)
65
+
66
+ ### Features
67
+
68
+ - Add the router provider for eigenorbit-router-client
69
+ ([#18](https://github.com/eigenorbit/eigenkit/pull/18),
70
+ [`80a2b10`](https://github.com/eigenorbit/eigenkit/commit/80a2b105129498c1ca756a8e5c4931a33656a2e4))
71
+
72
+ ### Documentation
73
+
74
+ - Add the Qiskit Ecosystem badge ([#19](https://github.com/eigenorbit/eigenkit/pull/19),
75
+ [`091edeb`](https://github.com/eigenorbit/eigenkit/commit/091edebc4ac3d0855eb1988ab8e1bcf7a62b96a8))
76
+
77
+
78
+ ## v1.0.1 (2026-10-13)
79
+
80
+ ### Bug Fixes
81
+
82
+ - Install cuda-quantum on Apple Silicon from a uv lock
83
+ ([#16](https://github.com/eigenorbit/eigenkit/pull/16),
84
+ [`44a826a`](https://github.com/eigenorbit/eigenkit/commit/44a826ad08ec55ecd15ed097187817d66414eb95))
85
+
86
+ - List the pennylane provider only when PennyLane is installed
87
+ ([#14](https://github.com/eigenorbit/eigenkit/pull/14),
88
+ [`6ff13ac`](https://github.com/eigenorbit/eigenkit/commit/6ff13ac150a7db59f31d4126f2517fc78575820a))
89
+
90
+ ### Documentation
91
+
92
+ - Add link previews, structured data and robots.txt
93
+ ([#17](https://github.com/eigenorbit/eigenkit/pull/17),
94
+ [`63c17be`](https://github.com/eigenorbit/eigenkit/commit/63c17be38e8a97d3a918c91b7f21feb45531a07c))
95
+
96
+ - Describe eigenkit as an open-source Python library
97
+ ([#15](https://github.com/eigenorbit/eigenkit/pull/15),
98
+ [`898e48d`](https://github.com/eigenorbit/eigenkit/commit/898e48d64bf06e8fd77ebe3b885718bca90c04e1))
99
+
100
+ - Tidy the 1.0.0 changelog entry ([#13](https://github.com/eigenorbit/eigenkit/pull/13),
101
+ [`007f2fd`](https://github.com/eigenorbit/eigenkit/commit/007f2fd24c0a0ab2e708c0759d48f7557e4d96b5))
102
+
103
+ ### Continuous Integration
104
+
105
+ - **deps**: Bump astral-sh/setup-uv from 10.2.0 to 10.3.0
106
+ ([#2](https://github.com/eigenorbit/eigenkit/pull/2),
107
+ [`498700e`](https://github.com/eigenorbit/eigenkit/commit/498700e5817cefc87ee2a660e41c0aa94c3de4cd))
108
+
109
+
110
+ ## v1.0.0 (2026-10-13)
111
+
112
+ ### Features
113
+
114
+ - eigenkit 1.0.0 ([#1](https://github.com/eigenorbit/eigenkit/pull/1),
115
+ [`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.1.0
3
+ Version: 1.2.1
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,7 +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
+ Requires-Dist: eigenorbit-router-client<1,>=0.2; extra == 'all'
38
38
  Requires-Dist: iqm-client[qiskit]<36,>=35; (python_version < '3.14') and extra == 'all'
39
39
  Requires-Dist: jax>=0.4; extra == 'all'
40
40
  Requires-Dist: matplotlib>=3.7; extra == 'all'
@@ -97,7 +97,7 @@ Requires-Dist: qsimcirq>=0.21; (python_version < '3.14' and (sys_platform != 'li
97
97
  Provides-Extra: qulacs
98
98
  Requires-Dist: qulacs<0.7,>=0.6; (python_version < '3.14') and extra == 'qulacs'
99
99
  Provides-Extra: router
100
- Requires-Dist: eigenorbit-router-client<1,>=0.1; extra == 'router'
100
+ Requires-Dist: eigenorbit-router-client<1,>=0.2; extra == 'router'
101
101
  Provides-Extra: tensorcircuit
102
102
  Requires-Dist: jax>=0.4; extra == 'tensorcircuit'
103
103
  Requires-Dist: tensorcircuit-ng>=1.7; extra == 'tensorcircuit'
@@ -166,7 +166,8 @@ means changing one argument.
166
166
  - **Fits the classical stack.** A circuit is a numpy function or a PyTorch
167
167
  `nn.Module`, and the ready-made models follow scikit-learn's `fit`/`predict`.
168
168
  - **Algorithms.** Machine learning: hybrid neural networks, quantum kernels with
169
- QSVC/QSVR, reservoir computing. Optimization: QUBO/Ising, Max-Cut, QAOA.
169
+ QSVC/QSVR, reservoir computing, orthogonal networks of RBS gates (orthogonal
170
+ fine-tuning, certified robustness). Optimization: QUBO/Ising, Max-Cut, QAOA.
170
171
  Chemistry: fermionic operators with the Jordan-Wigner and Bravyi-Kitaev
171
172
  mappings, UCCSD, VQE, and molecular Hamiltonians through PySCF and
172
173
  OpenFermion. Also HHL, iterative amplitude estimation (IQAE) and portfolio
@@ -54,7 +54,8 @@ means changing one argument.
54
54
  - **Fits the classical stack.** A circuit is a numpy function or a PyTorch
55
55
  `nn.Module`, and the ready-made models follow scikit-learn's `fit`/`predict`.
56
56
  - **Algorithms.** Machine learning: hybrid neural networks, quantum kernels with
57
- QSVC/QSVR, reservoir computing. Optimization: QUBO/Ising, Max-Cut, QAOA.
57
+ QSVC/QSVR, reservoir computing, orthogonal networks of RBS gates (orthogonal
58
+ fine-tuning, certified robustness). Optimization: QUBO/Ising, Max-Cut, QAOA.
58
59
  Chemistry: fermionic operators with the Jordan-Wigner and Bravyi-Kitaev
59
60
  mappings, UCCSD, VQE, and molecular Hamiltonians through PySCF and
60
61
  OpenFermion. Also HHL, iterative amplitude estimation (IQAE) and portfolio
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "eigenkit"
3
- version = "1.1.0"
3
+ version = "1.2.1"
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"
@@ -126,7 +126,7 @@ perceval = [
126
126
  ]
127
127
  # EigenOrbit Router client: real QPUs with one EigenOrbit API key.
128
128
  router = [
129
- "eigenorbit-router-client>=0.1,<1",
129
+ "eigenorbit-router-client>=0.2,<1",
130
130
  ]
131
131
  # Synthetic + real datasets and the sklearn baselines used by them.
132
132
  datasets = [
@@ -181,6 +181,11 @@ build_command = """
181
181
  uv build
182
182
  """
183
183
 
184
+ [tool.semantic_release.changelog]
185
+ # Same as the package's default templates, but the sections are ordered by
186
+ # importance (features first) instead of alphabetically.
187
+ template_dir = "tools/release-templates"
188
+
184
189
  [[tool.uv.index]]
185
190
  name = "pytorch-cu126"
186
191
  url = "https://download.pytorch.org/whl/cu126"
@@ -297,12 +302,18 @@ source_modules = [
297
302
  "eigenkit.optimization",
298
303
  "eigenkit.chemistry",
299
304
  "eigenkit.reservoir",
305
+ "eigenkit.orthogonal",
300
306
  ]
301
307
  forbidden_modules = ["torch", "pennylane", "qiskit", "braket", "sklearn", "qulacs", "perceval"]
308
+ # eigenkit.orthogonal.torch is the torch ring of the orthogonal package, loaded
309
+ # lazily by its __getattr__; the framework-free modules of that package are pinned
310
+ # by their own contract below, which ignores nothing.
311
+ ignore_imports = ["eigenkit.orthogonal.torch.** -> torch"]
302
312
 
303
313
  # The qml tier (kernels, SVMs, the sklearn estimator base) may use scikit-learn,
304
314
  # but must not require torch or a specific backend SDK at import: the kernels run
305
- # on the numpy interface, so a torch-free install can still use them.
315
+ # on the numpy interface, so a torch-free install can still use them. Nor does it
316
+ # import the orthogonal ring: _serialization looks its block types up by name.
306
317
  [[tool.importlinter.contracts]]
307
318
  name = "QML tier does not require torch"
308
319
  type = "forbidden"
@@ -314,7 +325,7 @@ source_modules = [
314
325
  "eigenkit.qml.qsvr",
315
326
  "eigenkit.qml.qrc",
316
327
  ]
317
- forbidden_modules = ["torch", "pennylane", "qiskit", "braket", "qulacs"]
328
+ forbidden_modules = ["torch", "pennylane", "qiskit", "braket", "qulacs", "eigenkit.orthogonal"]
318
329
  # Runtime-only edge, never hit at import: _serialization imports torch inside
319
330
  # functions only when a bundle carries torch state.
320
331
  ignore_imports = [
@@ -347,3 +358,18 @@ source_modules = [
347
358
  "eigenkit.photonics.gradients",
348
359
  ]
349
360
  forbidden_modules = ["perceval", "torch", "pennylane", "qiskit", "braket", "sklearn", "qulacs"]
361
+
362
+ # The orthogonal-network maths (topologies, matrices, circuit blocks) is NumPy only,
363
+ # so a torch-free install can build the matrices and circuits. Its PyTorch modules
364
+ # live in eigenkit.orthogonal.torch, which the package loads lazily; the import
365
+ # surface staying torch-free is pinned by tests/orthogonal/test_import_surface.py.
366
+ [[tool.importlinter.contracts]]
367
+ name = "Orthogonal compute layer is framework-free"
368
+ type = "forbidden"
369
+ source_modules = [
370
+ "eigenkit.orthogonal.topology",
371
+ "eigenkit.orthogonal.matrix",
372
+ "eigenkit.orthogonal.blocks",
373
+ "eigenkit.orthogonal.circuit",
374
+ ]
375
+ 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 `x` with `Ax ≈ b`. It is `float64` for real inputs,
58
- and `complex128` when `A` or `b` has a non-zero imaginary part.
59
- euclidean_norm: The norm `‖solution‖` of the returned solution. It is
60
- computed after the classical least-squares rescaling, so it is not a
61
- norm that HHL itself measures.
62
- residual: The relative error `‖Ax − b‖ / ‖b‖`, computed with the original
63
- `A` and `b`.
64
- success_probability: The probability that the ancilla is in `|1⟩`, summed
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 `|1⟩` and the clock register in
68
- `|0…0⟩`. This is the physical post-selection rate. It is never larger
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 `|x⟩`, not a vector of numbers. The full
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 `N` components of `|x⟩` costs `O(N)`
83
- measurements, which cancels the speedup. In practice, `|x⟩` is passed to
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 `1/λ` needs a separate protocol. All of this applies to both values
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
- `x = raw · ⟨A·raw, b⟩ / ‖A·raw‖²`, which uses the full classical `A` and
93
- `b`. Only the direction of `raw` comes from the quantum computation. The
94
- rescaling can change `residual` by an order of magnitude, and for an
95
- indefinite `A` its sign correction is not reliable, because
96
- `⟨Ax, b⟩ ≥ 0` does not imply `⟨x, A⁻¹b⟩ ≥ 0`.
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 `Ax = b` for any invertible square matrix `A`. If `A` is Hermitian, it is
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 `A†Ax = A†b`, which have the same solution and a
144
- Hermitian, positive semidefinite system matrix. The cost of this conversion is
145
- that the condition number `κ` is squared.
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 `1/λ` of each eigenvalue is encoded in the
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 `|1⟩` and the clock register is in `|0⟩`. HHL produces
153
- the quantum state `|x⟩`, so reading a classical vector from it is only possible
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: `A` is
164
- a sum of a few short Pauli terms, `A` is well conditioned, and the state `|b⟩`
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.* `e^{iAt}` is Trotterised from the Pauli
168
- decomposition of `A`, so its cost follows the number of Pauli terms. This
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.* `|b⟩` is prepared with
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 `O(N)`
176
- gates, so a real speedup assumes that `b` comes from a formula, from an
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 `κ` is never an input. It only bounds
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 `2^n_l` angles, where `n_l` is
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
- `Θ(2^n_l)`. The circuit can be built from elementary gates, but its
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 `A` and `b`, the readout discards the
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 `A` or a complex `b`, which
198
- keep that error. At `trotter_order=2`, the default, the first-order commutator
199
- already cancels by construction, so there is nothing left to remove, and real
200
- and complex inputs both converge as `steps⁻²`. This advantage was not designed.
201
- It depends on the test for real inputs in
202
- [`solve()`][eigenkit.algorithms.HHL.solve], so a change to that test changes
203
- the convergence rate at order 1.
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 `U = e^{iAt}`. If given, it must be positive and
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 `[0, 1)`. For a Hermitian `A`,
216
- buckets whose estimated eigenvalue is below `epsilon * λ_max` are
217
- treated as zero. For the normal equations, the cutoff applies to the
218
- singular values instead, and it is implemented as `epsilon²` on the
219
- squared spectrum. If no eigenvalue is above the cutoff, `solve()` raises
220
- an error. The default is `0.01`.
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`, `e^{iAt}` is a dense `QubitUnitary` computed with
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 `O(N³)` precomputation and the dense unitary mean that
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 `C` of the inversion comes
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 `e^{iAt}` is Trotterised into elementary
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 `O(N³)` rank check. This check makes the
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 `‖A_eff − A‖` stays below
243
- `trotter_tolerance × C`, which is below the eigenvalue resolution of
244
- the clock register. This matters because, with a fixed step size, the
245
- circuit is exact HHL for an effective matrix `A_eff` whose eigenvectors
246
- are rotated even when its eigenvalues are exact. That changes the
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
- solver warns if the drift bound then exceeds `C/2`. Above that value,
250
- an extreme eigenvalue can be captured by the Nyquist bucket or wrap
251
- around the branch cut. The automatic choice is limited by a gate
252
- budget, and the solver says so when the limit is reached. The default
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 `O(τ)` to `O(τ²)`, and `A_eff`
257
- stays real for a real `A`. At order 1, `A_eff` picks up `Y`-type terms,
258
- and a real system returns a complex state. Order 1 is kept for cost
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 × C`.
262
- The default, `0.25`, keeps the drift at a quarter of a bucket, below
263
- the `C/2` threshold at which the Nyquist bucket can capture an
264
- eigenvalue. At order 2, the cost grows as `steps ∝ 1/√tolerance`.
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 `[0, 1)`.
269
+ finite number, or if `epsilon` is outside \([0, 1)\).
269
270
 
270
271
  Example:
271
- This example solves a `2 × 2` Hermitian system:
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 `Ax = b`.
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 `O(N³)` singular value decomposition (SVD) to reject a
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`, `C`, the rotation angles or the
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 `O(N³)` work.
378
+ `solve()` itself still does \(O(N^3)\) work.
378
379
  """
379
380
  from ._provider_checks import check_required_gates
380
381
 
@@ -26,7 +26,7 @@ ShotMode = Literal["auto", "synthetic", "provider"]
26
26
 
27
27
  @dataclass(frozen=True, eq=False)
28
28
  class IQAEResult(ValueEquality):
29
- """Outcome of a completed Iterative Quantum Amplitude Estimation (IQAE) run.
29
+ r"""Outcome of a completed Iterative Quantum Amplitude Estimation (IQAE) run.
30
30
 
31
31
  The result is read-only. Assigning to a field raises `FrozenInstanceError`, so
32
32
  a mistyped `=` (instead of `==`) cannot change a result. This type holds no
@@ -37,7 +37,7 @@ class IQAEResult(ValueEquality):
37
37
  correctly and efficiently.
38
38
 
39
39
  Attributes:
40
- estimation: The point estimate of the amplitude `a`.
40
+ estimation: The point estimate of the amplitude \(a\).
41
41
  confidence_interval: The `(lower, upper)` Clopper-Pearson interval at the
42
42
  requested confidence level `1 - alpha`.
43
43
  n_rounds: The number of rounds that the run executed. It can also be read
@@ -72,13 +72,14 @@ class IQAEResult(ValueEquality):
72
72
  class IQAE(BaseQuantumSolver):
73
73
  r"""Iterative Quantum Amplitude Estimation (IQAE).
74
74
 
75
- Estimates `a = |⟨ψ₁|A|0⟩|²` to an additive precision `epsilon`, with a failure
76
- probability of at most `alpha`. It uses the Grover operator
77
- `Q = A S₀ A† S_ψ₁`, built from the oracle `A` that you provide.
75
+ Estimates \(a = \lvert \langle \psi_1 | A | 0 \rangle \rvert^2\) to an additive
76
+ precision `epsilon`, with a failure probability of at most `alpha`. It uses the Grover
77
+ operator \(Q = A S_0 A^\dagger S_{\psi_1}\), built from the oracle \(A\) that you
78
+ provide.
78
79
 
79
80
  The oracle can be given in two forms:
80
81
 
81
- * A **PennyLane callable** `oracle(wires)`, which applies the circuit `A` in
82
+ * A **PennyLane callable** `oracle(wires)`, which applies the circuit \(A\) in
82
83
  place. The last wire (`wires[-1]`) must be the ancilla qubit:
83
84
 
84
85
  ```python
@@ -97,11 +98,11 @@ class IQAE(BaseQuantumSolver):
97
98
 
98
99
  Args:
99
100
  epsilon: The additive precision to reach, that is, the half-width of the
100
- final confidence interval for `a`. It must be in `(0, π/8)`.
101
+ final confidence interval for \(a\). It must be in \((0, \pi/8)\).
101
102
  alpha: The total failure probability. The algorithm applies a Bonferroni
102
103
  correction, so the confidence interval of each round is valid at level
103
- `alpha / T`, where `T = ceil(log2(π / (8 * epsilon)))` is the maximum
104
- number of rounds. It must be in `(0, 1)`.
104
+ \(\alpha / T\), where \(T = \lceil \log_2(\pi / (8\varepsilon)) \rceil\) is
105
+ the maximum number of rounds. It must be in \((0, 1)\).
105
106
  n_qubits: The total number of qubits, including the ancilla.
106
107
  provider: The backend to use: a registered name (`"numpy"`, `"pennylane"`,
107
108
  `"qiskit"` and so on), a config instance, or a backend object. The
@@ -120,7 +121,7 @@ class IQAE(BaseQuantumSolver):
120
121
  a finite `shots`, and synthetic binomial noise is used otherwise.
121
122
  `"provider"` always samples from the backend. `"synthetic"` always uses
122
123
  exact expectation values plus seeded binomial noise.
123
- min_ratio: The minimum ratio `K_{i+1} / K_i` between the Grover powers of
124
+ min_ratio: The minimum ratio \(K_{i+1} / K_i\) between the Grover powers of
124
125
  consecutive rounds. It must be greater than 1.
125
126
  random_state: The seed of the random number generator used for the shot
126
127
  noise. An integer gives reproducible results, and `None` uses a
@@ -203,11 +204,11 @@ class IQAE(BaseQuantumSolver):
203
204
  _REQUIRED_GATES: frozenset[str] = frozenset({"QubitUnitary", "X", "MCZ", "Z"})
204
205
 
205
206
  def solve(self, oracle: Callable | CircuitSpec) -> IQAEResult:
206
- """Estimate the amplitude `a = |⟨ψ₁|A|0⟩|²`.
207
+ r"""Estimate the amplitude \(a = \lvert \langle \psi_1 | A | 0 \rangle \rvert^2\).
207
208
 
208
209
  Args:
209
210
  oracle: Either a PennyLane callable `oracle(wires)` that builds the
210
- state-preparation circuit `A`, or a
211
+ state-preparation circuit \(A\), or a
211
212
  [`CircuitSpec`][eigenkit.core.ir.CircuitSpec] produced by
212
213
  [`CircuitBuilder`][eigenkit.core.builder.CircuitBuilder]. In both
213
214
  cases, the last qubit is treated as the ancilla.