NetKet 3.9.1__tar.gz → 3.10__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 (295) hide show
  1. {netket-3.9.1 → netket-3.10}/PKG-INFO +20 -14
  2. {netket-3.9.1 → netket-3.10}/README.md +1 -1
  3. {netket-3.9.1 → netket-3.10}/netket/__init__.py +1 -8
  4. netket-3.10/netket/_version.py +16 -0
  5. {netket-3.9.1 → netket-3.10}/netket/driver/abstract_variational_driver.py +24 -12
  6. {netket-3.9.1 → netket-3.10}/netket/driver/steady_state.py +3 -3
  7. {netket-3.9.1 → netket-3.10}/netket/driver/vmc.py +3 -3
  8. {netket-3.9.1 → netket-3.10}/netket/errors.py +23 -0
  9. {netket-3.9.1 → netket-3.10}/netket/exact.py +3 -1
  10. {netket-3.9.1 → netket-3.10}/netket/experimental/__init__.py +4 -0
  11. {netket-3.9.1 → netket-3.10}/netket/experimental/driver/__init__.py +1 -1
  12. {netket-3.9.1 → netket-3.10}/netket/experimental/driver/tdvp.py +1 -2
  13. {netket-3.9.1 → netket-3.10}/netket/experimental/driver/tdvp_common.py +5 -2
  14. {netket-3.9.1 → netket-3.10}/netket/experimental/driver/tdvp_schmitt.py +5 -6
  15. netket-3.10/netket/experimental/driver/vmc_srt.py +248 -0
  16. {netket-3.9.1 → netket-3.10}/netket/experimental/dynamics/_rk_solver_structures.py +2 -2
  17. {netket-3.9.1 → netket-3.10}/netket/experimental/dynamics/_rk_tableau.py +3 -3
  18. {netket-3.9.1 → netket-3.10}/netket/experimental/hilbert/__init__.py +0 -2
  19. netket-3.10/netket/experimental/hilbert/spin_orbital_fermions.py +311 -0
  20. {netket-3.9.1/netket/experimental/hilbert/random → netket-3.10/netket/experimental/logging}/__init__.py +4 -2
  21. {netket-3.9.1 → netket-3.10}/netket/experimental/logging/hdf5_log.py +15 -5
  22. netket-3.10/netket/experimental/models/__init__.py +15 -0
  23. netket-3.9.1/netket/utils/optional_deps.py → netket-3.10/netket/experimental/observable/__init__.py +2 -5
  24. netket-3.10/netket/experimental/observable/renyi2/S2_operator.py +119 -0
  25. {netket-3.9.1/netket/experimental/logging → netket-3.10/netket/experimental/observable/renyi2}/__init__.py +4 -1
  26. netket-3.10/netket/experimental/observable/renyi2/exact.py +46 -0
  27. netket-3.10/netket/experimental/observable/renyi2/expect.py +111 -0
  28. {netket-3.9.1 → netket-3.10}/netket/experimental/operator/__init__.py +1 -0
  29. {netket-3.9.1 → netket-3.10}/netket/experimental/operator/_fermion_operator_2nd.py +147 -49
  30. {netket-3.9.1 → netket-3.10}/netket/experimental/operator/_fermion_operator_2nd_utils.py +124 -29
  31. {netket-3.9.1 → netket-3.10}/netket/experimental/operator/fermion.py +82 -22
  32. netket-3.10/netket/experimental/operator/pyscf.py +380 -0
  33. {netket-3.9.1 → netket-3.10}/netket/experimental/qsr/dataset.py +12 -13
  34. {netket-3.9.1 → netket-3.10}/netket/experimental/qsr/driver.py +3 -3
  35. {netket-3.9.1 → netket-3.10}/netket/experimental/sampler/metropolis_pmap.py +2 -2
  36. {netket-3.9.1 → netket-3.10}/netket/experimental/sampler/metropolis_pt.py +0 -1
  37. {netket-3.9.1 → netket-3.10}/netket/graph/_lattice_edge_logic.py +4 -3
  38. {netket-3.9.1 → netket-3.10}/netket/graph/abstract_graph.py +6 -5
  39. {netket-3.9.1 → netket-3.10}/netket/graph/common_lattices.py +3 -2
  40. {netket-3.9.1 → netket-3.10}/netket/graph/graph.py +4 -3
  41. {netket-3.9.1 → netket-3.10}/netket/graph/lattice.py +5 -4
  42. {netket-3.9.1 → netket-3.10}/netket/graph/space_group.py +2 -1
  43. {netket-3.9.1 → netket-3.10}/netket/hilbert/abstract_hilbert.py +5 -3
  44. {netket-3.9.1 → netket-3.10}/netket/hilbert/continuous_hilbert.py +9 -6
  45. {netket-3.9.1 → netket-3.10}/netket/hilbert/custom_hilbert.py +8 -3
  46. {netket-3.9.1 → netket-3.10}/netket/hilbert/discrete_hilbert.py +33 -6
  47. {netket-3.9.1 → netket-3.10}/netket/hilbert/doubled_hilbert.py +4 -0
  48. {netket-3.9.1 → netket-3.10}/netket/hilbert/fock.py +7 -2
  49. {netket-3.9.1 → netket-3.10}/netket/hilbert/homogeneous.py +24 -16
  50. {netket-3.9.1 → netket-3.10}/netket/hilbert/index/constrained.py +0 -1
  51. {netket-3.9.1 → netket-3.10}/netket/hilbert/index/unconstrained.py +0 -1
  52. {netket-3.9.1 → netket-3.10}/netket/hilbert/particle.py +39 -16
  53. {netket-3.9.1 → netket-3.10}/netket/hilbert/qubit.py +2 -2
  54. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/base.py +2 -2
  55. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/tensor_hilbert.py +1 -2
  56. {netket-3.9.1 → netket-3.10}/netket/hilbert/spin.py +2 -2
  57. {netket-3.9.1 → netket-3.10}/netket/hilbert/tensor_hilbert.py +6 -4
  58. {netket-3.9.1 → netket-3.10}/netket/hilbert/tensor_hilbert_discrete.py +17 -3
  59. {netket-3.9.1 → netket-3.10}/netket/jax/__init__.py +14 -6
  60. {netket-3.9.1 → netket-3.10}/netket/jax/_expect.py +3 -3
  61. {netket-3.9.1 → netket-3.10}/netket/jax/_grad.py +5 -4
  62. {netket-3.9.1 → netket-3.10}/netket/jax/_jacobian/default_mode.py +5 -1
  63. {netket-3.9.1 → netket-3.10}/netket/jax/_jacobian/jacobian_pytree.py +7 -9
  64. {netket-3.9.1 → netket-3.10}/netket/jax/_jacobian/logic.py +29 -10
  65. {netket-3.9.1 → netket-3.10}/netket/jax/_math.py +32 -1
  66. {netket-3.9.1 → netket-3.10}/netket/jax/_scanmap.py +7 -2
  67. netket-3.10/netket/jax/_utils_dtype.py +85 -0
  68. netket-3.10/netket/jax/_utils_random.py +116 -0
  69. netket-3.9.1/netket/jax/utils.py → netket-3.10/netket/jax/_utils_tree.py +4 -147
  70. {netket-3.9.1 → netket-3.10}/netket/jax/_vjp.py +65 -50
  71. {netket-3.9.1 → netket-3.10}/netket/jax/_vjp_chunked.py +1 -4
  72. {netket-3.9.1 → netket-3.10}/netket/logging/__init__.py +2 -3
  73. {netket-3.9.1 → netket-3.10}/netket/logging/json_log.py +7 -0
  74. {netket-3.9.1 → netket-3.10}/netket/logging/runtime_log.py +6 -1
  75. {netket-3.9.1 → netket-3.10}/netket/logging/state_log.py +2 -0
  76. {netket-3.9.1 → netket-3.10}/netket/logging/tensorboard.py +12 -4
  77. {netket-3.9.1 → netket-3.10}/netket/models/autoreg.py +6 -6
  78. {netket-3.9.1 → netket-3.10}/netket/models/deepset.py +10 -8
  79. {netket-3.9.1 → netket-3.10}/netket/models/equivariant.py +16 -17
  80. {netket-3.9.1 → netket-3.10}/netket/models/fast_autoreg.py +6 -6
  81. {netket-3.9.1 → netket-3.10}/netket/models/mlp.py +4 -4
  82. {netket-3.9.1 → netket-3.10}/netket/models/rbm.py +7 -1
  83. netket-3.10/netket/models/slater.py +135 -0
  84. {netket-3.9.1 → netket-3.10}/netket/nn/blocks/deepset.py +5 -5
  85. {netket-3.9.1 → netket-3.10}/netket/nn/blocks/mlp.py +4 -5
  86. {netket-3.9.1 → netket-3.10}/netket/nn/blocks/symmetry_sum.py +35 -16
  87. {netket-3.9.1 → netket-3.10}/netket/nn/deprecation.py +0 -1
  88. {netket-3.9.1 → netket-3.10}/netket/nn/fast_masked_linear.py +3 -3
  89. {netket-3.9.1 → netket-3.10}/netket/nn/masked_linear.py +5 -5
  90. {netket-3.9.1 → netket-3.10}/netket/nn/symmetric_linear.py +28 -19
  91. {netket-3.9.1 → netket-3.10}/netket/nn/utils.py +15 -20
  92. netket-3.10/netket/operator/_abstract_observable.py +51 -0
  93. {netket-3.9.1 → netket-3.10}/netket/operator/_abstract_operator.py +24 -11
  94. {netket-3.9.1 → netket-3.10}/netket/operator/_abstract_super_operator.py +2 -0
  95. {netket-3.9.1 → netket-3.10}/netket/operator/_bose_hubbard.py +1 -2
  96. {netket-3.9.1 → netket-3.10}/netket/operator/_continuous_operator.py +4 -2
  97. {netket-3.9.1 → netket-3.10}/netket/operator/_discrete_operator.py +7 -5
  98. {netket-3.9.1 → netket-3.10}/netket/operator/_discrete_operator_jax.py +4 -3
  99. {netket-3.9.1 → netket-3.10}/netket/operator/_graph_operator.py +3 -3
  100. {netket-3.9.1 → netket-3.10}/netket/operator/_heisenberg.py +3 -2
  101. {netket-3.9.1 → netket-3.10}/netket/operator/_ising/base.py +4 -4
  102. {netket-3.9.1 → netket-3.10}/netket/operator/_ising/jax.py +11 -2
  103. {netket-3.9.1 → netket-3.10}/netket/operator/_ising/numba.py +4 -1
  104. {netket-3.9.1 → netket-3.10}/netket/operator/_kinetic.py +4 -4
  105. {netket-3.9.1 → netket-3.10}/netket/operator/_lazy.py +0 -1
  106. {netket-3.9.1 → netket-3.10}/netket/operator/_local_liouvillian.py +8 -6
  107. {netket-3.9.1 → netket-3.10}/netket/operator/_local_operator/base.py +22 -15
  108. netket-3.10/netket/operator/_local_operator/compile_helpers.py +303 -0
  109. {netket-3.9.1 → netket-3.10}/netket/operator/_local_operator/convert.py +7 -1
  110. {netket-3.9.1 → netket-3.10}/netket/operator/_local_operator/helpers.py +23 -12
  111. {netket-3.9.1 → netket-3.10}/netket/operator/_pauli_strings/base.py +155 -78
  112. {netket-3.9.1 → netket-3.10}/netket/operator/_pauli_strings/jax.py +24 -7
  113. {netket-3.9.1 → netket-3.10}/netket/operator/_pauli_strings/numba.py +22 -6
  114. {netket-3.9.1 → netket-3.10}/netket/operator/_potential.py +3 -2
  115. {netket-3.9.1 → netket-3.10}/netket/operator/_sumoperators.py +8 -7
  116. {netket-3.9.1 → netket-3.10}/netket/operator/boson.py +24 -18
  117. {netket-3.9.1 → netket-3.10}/netket/operator/spin.py +63 -28
  118. {netket-3.9.1 → netket-3.10}/netket/optimizer/linear_operator.py +2 -2
  119. {netket-3.9.1 → netket-3.10}/netket/optimizer/preconditioner.py +0 -1
  120. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/common.py +1 -1
  121. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/qgt_jacobian_dense.py +3 -2
  122. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/qgt_jacobian_pytree.py +3 -3
  123. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/qgt_onthefly.py +1 -2
  124. {netket-3.9.1 → netket-3.10}/netket/optimizer/solver/solvers.py +10 -10
  125. {netket-3.9.1 → netket-3.10}/netket/optimizer/sr.py +14 -20
  126. {netket-3.9.1 → netket-3.10}/netket/sampler/autoreg.py +2 -22
  127. {netket-3.9.1 → netket-3.10}/netket/sampler/base.py +6 -7
  128. {netket-3.9.1 → netket-3.10}/netket/sampler/exact.py +6 -4
  129. {netket-3.9.1 → netket-3.10}/netket/sampler/metropolis.py +10 -11
  130. {netket-3.9.1 → netket-3.10}/netket/sampler/metropolis_numpy.py +2 -3
  131. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/base.py +2 -3
  132. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/exchange.py +2 -2
  133. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/hamiltonian.py +0 -1
  134. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/multiple.py +3 -3
  135. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/tensor.py +3 -3
  136. {netket-3.9.1 → netket-3.10}/netket/stats/_autocorr.py +3 -0
  137. {netket-3.9.1 → netket-3.10}/netket/stats/mc_stats.py +2 -0
  138. {netket-3.9.1 → netket-3.10}/netket/utils/__init__.py +2 -2
  139. {netket-3.9.1 → netket-3.10}/netket/utils/_dependencies_check.py +18 -8
  140. {netket-3.9.1 → netket-3.10}/netket/utils/config_flags.py +49 -2
  141. {netket-3.9.1 → netket-3.10}/netket/utils/deprecation.py +2 -3
  142. netket-3.10/netket/utils/dispatch.py +46 -0
  143. {netket-3.9.1 → netket-3.10}/netket/utils/group/_group.py +4 -5
  144. {netket-3.9.1 → netket-3.10}/netket/utils/group/_point_group.py +4 -5
  145. {netket-3.9.1 → netket-3.10}/netket/utils/group/_semigroup.py +1 -2
  146. {netket-3.9.1 → netket-3.10}/netket/utils/history.py +6 -6
  147. {netket-3.9.1 → netket-3.10}/netket/utils/holomorphic.py +1 -1
  148. {netket-3.9.1 → netket-3.10}/netket/utils/model_frameworks/base.py +1 -3
  149. {netket-3.9.1 → netket-3.10}/netket/utils/model_frameworks/flax.py +0 -1
  150. {netket-3.9.1 → netket-3.10}/netket/utils/model_frameworks/haiku.py +2 -4
  151. {netket-3.9.1 → netket-3.10}/netket/utils/model_frameworks/jax.py +2 -5
  152. {netket-3.9.1 → netket-3.10}/netket/utils/mpi/__init__.py +5 -0
  153. {netket-3.9.1 → netket-3.10}/netket/utils/mpi/primitives.py +57 -3
  154. netket-3.10/netket/utils/optional_deps.py +39 -0
  155. netket-3.10/netket/utils/plum/__init__.py +61 -0
  156. netket-3.10/netket/utils/plum/_version.py +17 -0
  157. netket-3.10/netket/utils/plum/alias.py +166 -0
  158. netket-3.10/netket/utils/plum/autoreload.py +77 -0
  159. netket-3.10/netket/utils/plum/dispatcher.py +128 -0
  160. netket-3.10/netket/utils/plum/function.py +487 -0
  161. netket-3.10/netket/utils/plum/method.py +232 -0
  162. netket-3.10/netket/utils/plum/overload.py +9 -0
  163. netket-3.10/netket/utils/plum/parametric.py +421 -0
  164. netket-3.10/netket/utils/plum/promotion.py +169 -0
  165. netket-3.10/netket/utils/plum/py.typed +0 -0
  166. netket-3.10/netket/utils/plum/repr.py +179 -0
  167. netket-3.10/netket/utils/plum/resolver.py +307 -0
  168. netket-3.10/netket/utils/plum/signature.py +424 -0
  169. netket-3.10/netket/utils/plum/type.py +296 -0
  170. netket-3.10/netket/utils/plum/util.py +170 -0
  171. {netket-3.9.1 → netket-3.10}/netket/utils/struct/dataclass.py +3 -3
  172. {netket-3.9.1 → netket-3.10}/netket/utils/types.py +2 -1
  173. {netket-3.9.1 → netket-3.10}/netket/utils/version_check.py +2 -2
  174. {netket-3.9.1 → netket-3.10}/netket/vqs/base.py +69 -79
  175. {netket-3.9.1 → netket-3.10}/netket/vqs/full_summ/expect.py +37 -35
  176. {netket-3.9.1 → netket-3.10}/netket/vqs/full_summ/state.py +20 -10
  177. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/common.py +21 -0
  178. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/kernels.py +2 -2
  179. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_mixed_state/expect_chunked.py +7 -0
  180. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_mixed_state/state.py +6 -5
  181. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_state/expect.py +3 -3
  182. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_state/expect_chunked.py +10 -8
  183. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_state/expect_forces.py +5 -5
  184. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_state/expect_forces_chunked.py +12 -14
  185. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_state/expect_grad.py +50 -52
  186. netket-3.10/netket/vqs/mc/mc_state/expect_grad_chunked.py +74 -0
  187. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_state/state.py +83 -53
  188. {netket-3.9.1 → netket-3.10}/pyproject.toml +36 -16
  189. netket-3.9.1/netket/_version.py +0 -4
  190. netket-3.9.1/netket/experimental/hilbert/random/spin_orbital_fermions.py +0 -31
  191. netket-3.9.1/netket/experimental/hilbert/spin_orbital_fermions.py +0 -175
  192. netket-3.9.1/netket/operator/_local_operator/compile_helpers.py +0 -194
  193. netket-3.9.1/netket/utils/dispatch.py +0 -22
  194. netket-3.9.1/netket/vqs/mc/mc_mixed_state/expect_grad_chunked.py +0 -45
  195. netket-3.9.1/netket/vqs/mc/mc_state/expect_grad_chunked.py +0 -89
  196. {netket-3.9.1 → netket-3.10}/.gitignore +0 -0
  197. {netket-3.9.1 → netket-3.10}/LICENSE +0 -0
  198. {netket-3.9.1 → netket-3.10}/netket/callbacks/__init__.py +0 -0
  199. {netket-3.9.1 → netket-3.10}/netket/callbacks/convergence_stopping.py +0 -0
  200. {netket-3.9.1 → netket-3.10}/netket/callbacks/earlystopping.py +0 -0
  201. {netket-3.9.1 → netket-3.10}/netket/callbacks/invalidlossstopping.py +0 -0
  202. {netket-3.9.1 → netket-3.10}/netket/callbacks/timeout.py +0 -0
  203. {netket-3.9.1 → netket-3.10}/netket/driver/__init__.py +0 -0
  204. {netket-3.9.1 → netket-3.10}/netket/driver/vmc_common.py +0 -0
  205. {netket-3.9.1 → netket-3.10}/netket/experimental/dynamics/__init__.py +0 -0
  206. {netket-3.9.1 → netket-3.10}/netket/experimental/dynamics/_rk_solver.py +0 -0
  207. {netket-3.9.1 → netket-3.10}/netket/experimental/qsr/__init__.py +0 -0
  208. {netket-3.9.1 → netket-3.10}/netket/experimental/qsr/logic_helpers.py +0 -0
  209. {netket-3.9.1 → netket-3.10}/netket/experimental/sampler/__init__.py +0 -0
  210. {netket-3.9.1 → netket-3.10}/netket/experimental/vqs/__init__.py +0 -0
  211. {netket-3.9.1 → netket-3.10}/netket/experimental/vqs/io.py +0 -0
  212. {netket-3.9.1 → netket-3.10}/netket/graph/__init__.py +0 -0
  213. {netket-3.9.1 → netket-3.10}/netket/hilbert/__init__.py +0 -0
  214. {netket-3.9.1 → netket-3.10}/netket/hilbert/index/__init__.py +0 -0
  215. {netket-3.9.1 → netket-3.10}/netket/hilbert/index/base.py +0 -0
  216. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/__init__.py +0 -0
  217. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/custom.py +0 -0
  218. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/doubled.py +0 -0
  219. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/fock.py +0 -0
  220. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/particle.py +0 -0
  221. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/qubit.py +0 -0
  222. {netket-3.9.1 → netket-3.10}/netket/hilbert/random/spin.py +0 -0
  223. {netket-3.9.1 → netket-3.10}/netket/jax/_chunk_utils.py +0 -0
  224. {netket-3.9.1 → netket-3.10}/netket/jax/_jacobian/__init__.py +0 -0
  225. {netket-3.9.1 → netket-3.10}/netket/jax/_jacobian/jacobian_dense.py +0 -0
  226. {netket-3.9.1 → netket-3.10}/netket/jax/_vmap_chunked.py +0 -0
  227. {netket-3.9.1 → netket-3.10}/netket/models/README.md +0 -0
  228. {netket-3.9.1 → netket-3.10}/netket/models/__init__.py +0 -0
  229. {netket-3.9.1 → netket-3.10}/netket/models/full_space.py +0 -0
  230. {netket-3.9.1 → netket-3.10}/netket/models/gaussian.py +0 -0
  231. {netket-3.9.1 → netket-3.10}/netket/models/jastrow.py +0 -0
  232. {netket-3.9.1 → netket-3.10}/netket/models/mps.py +0 -0
  233. {netket-3.9.1 → netket-3.10}/netket/models/ndm.py +0 -0
  234. {netket-3.9.1 → netket-3.10}/netket/models/utils.py +0 -0
  235. {netket-3.9.1 → netket-3.10}/netket/nn/__init__.py +0 -0
  236. {netket-3.9.1 → netket-3.10}/netket/nn/activation.py +0 -0
  237. {netket-3.9.1 → netket-3.10}/netket/nn/blocks/__init__.py +0 -0
  238. {netket-3.9.1 → netket-3.10}/netket/nn/initializers.py +0 -0
  239. {netket-3.9.1 → netket-3.10}/netket/operator/__init__.py +0 -0
  240. {netket-3.9.1 → netket-3.10}/netket/operator/_hamiltonian.py +0 -0
  241. {netket-3.9.1 → netket-3.10}/netket/operator/_ising/__init__.py +0 -0
  242. {netket-3.9.1 → netket-3.10}/netket/operator/_local_operator/__init__.py +0 -0
  243. {netket-3.9.1 → netket-3.10}/netket/operator/_pauli_strings/__init__.py +0 -0
  244. {netket-3.9.1 → netket-3.10}/netket/optimizer/__init__.py +0 -0
  245. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/__init__.py +0 -0
  246. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/default.py +0 -0
  247. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/qgt_jacobian_common.py +0 -0
  248. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/qgt_jacobian_pytree_logic.py +0 -0
  249. {netket-3.9.1 → netket-3.10}/netket/optimizer/qgt/qgt_onthefly_logic.py +0 -0
  250. {netket-3.9.1 → netket-3.10}/netket/optimizer/solver/__init__.py +0 -0
  251. {netket-3.9.1 → netket-3.10}/netket/sampler/__init__.py +0 -0
  252. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/__init__.py +0 -0
  253. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/continuous_gaussian.py +0 -0
  254. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/custom_numpy.py +0 -0
  255. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/fixed.py +0 -0
  256. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/hamiltonian_numpy.py +0 -0
  257. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/langevin.py +0 -0
  258. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/local.py +0 -0
  259. {netket-3.9.1 → netket-3.10}/netket/sampler/rules/local_numpy.py +0 -0
  260. {netket-3.9.1 → netket-3.10}/netket/stats/__init__.py +0 -0
  261. {netket-3.9.1 → netket-3.10}/netket/stats/mc_stats_old.py +0 -0
  262. {netket-3.9.1 → netket-3.10}/netket/stats/mpi_stats.py +0 -0
  263. {netket-3.9.1 → netket-3.10}/netket/tools/__init__.py +0 -0
  264. {netket-3.9.1 → netket-3.10}/netket/tools/_common.py +0 -0
  265. {netket-3.9.1 → netket-3.10}/netket/tools/_cpu_info.py +0 -0
  266. {netket-3.9.1 → netket-3.10}/netket/tools/_mpi_info.py +0 -0
  267. {netket-3.9.1 → netket-3.10}/netket/tools/check_mpi.py +0 -0
  268. {netket-3.9.1 → netket-3.10}/netket/tools/info.py +0 -0
  269. {netket-3.9.1 → netket-3.10}/netket/utils/array.py +0 -0
  270. {netket-3.9.1 → netket-3.10}/netket/utils/float.py +0 -0
  271. {netket-3.9.1 → netket-3.10}/netket/utils/group/__init__.py +0 -0
  272. {netket-3.9.1 → netket-3.10}/netket/utils/group/_permutation_group.py +0 -0
  273. {netket-3.9.1 → netket-3.10}/netket/utils/group/axial.py +0 -0
  274. {netket-3.9.1 → netket-3.10}/netket/utils/group/cubic.py +0 -0
  275. {netket-3.9.1 → netket-3.10}/netket/utils/group/icosa.py +0 -0
  276. {netket-3.9.1 → netket-3.10}/netket/utils/group/planar.py +0 -0
  277. {netket-3.9.1 → netket-3.10}/netket/utils/jax.py +0 -0
  278. {netket-3.9.1 → netket-3.10}/netket/utils/model_frameworks/__init__.py +0 -0
  279. {netket-3.9.1 → netket-3.10}/netket/utils/moduletools.py +0 -0
  280. {netket-3.9.1 → netket-3.10}/netket/utils/mpi/mpi.py +0 -0
  281. {netket-3.9.1 → netket-3.10}/netket/utils/numbers.py +0 -0
  282. {netket-3.9.1 → netket-3.10}/netket/utils/partial.py +0 -0
  283. {netket-3.9.1 → netket-3.10}/netket/utils/seed.py +0 -0
  284. {netket-3.9.1 → netket-3.10}/netket/utils/static_number.py +0 -0
  285. {netket-3.9.1 → netket-3.10}/netket/utils/struct/__init__.py +0 -0
  286. {netket-3.9.1 → netket-3.10}/netket/utils/struct/utils.py +0 -0
  287. {netket-3.9.1 → netket-3.10}/netket/utils/summation.py +0 -0
  288. {netket-3.9.1 → netket-3.10}/netket/vqs/__init__.py +0 -0
  289. {netket-3.9.1 → netket-3.10}/netket/vqs/deprecated.py +0 -0
  290. {netket-3.9.1 → netket-3.10}/netket/vqs/experimental.py +0 -0
  291. {netket-3.9.1 → netket-3.10}/netket/vqs/full_summ/__init__.py +0 -0
  292. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/__init__.py +0 -0
  293. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_mixed_state/__init__.py +0 -0
  294. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_mixed_state/expect.py +0 -0
  295. {netket-3.9.1 → netket-3.10}/netket/vqs/mc/mc_state/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: NetKet
3
- Version: 3.9.1
3
+ Version: 3.10
4
4
  Summary: Netket : Machine Learning toolbox for many-body quantum systems.
5
5
  Project-URL: homepage, https://www.netket.org
6
6
  Project-URL: documentation, https://netket.readthedocs.io/en/latest/#
@@ -17,23 +17,26 @@ Classifier: Operating System :: POSIX :: Linux
17
17
  Classifier: Operating System :: Unix
18
18
  Classifier: Programming Language :: Python :: 3
19
19
  Classifier: Topic :: Scientific/Engineering :: Physics
20
- Requires-Python: >=3.8
21
- Requires-Dist: flax<0.8,>=0.6.5
22
- Requires-Dist: igraph<0.11.0,>=0.10.0
20
+ Requires-Python: >=3.9
21
+ Requires-Dist: beartype>=0.16.2
22
+ Requires-Dist: flax<0.8,>=0.7.1
23
+ Requires-Dist: igraph<0.12.0,>=0.10.0
23
24
  Requires-Dist: jax<0.5,>=0.4.3
24
25
  Requires-Dist: jaxlib<0.5,>=0.4.3
25
26
  Requires-Dist: numba4jax<0.1,>=0.0.10.post1
26
- Requires-Dist: numba<0.58,>=0.52
27
+ Requires-Dist: numba<0.59,>=0.52
27
28
  Requires-Dist: numpy~=1.20
28
29
  Requires-Dist: optax<0.2,>=0.1.3
29
30
  Requires-Dist: orjson<4,>=3.4
30
- Requires-Dist: plum-dispatch<3,>=1.5.1
31
+ Requires-Dist: rich>=10.0
31
32
  Requires-Dist: scipy<2,>=1.5.3
32
33
  Requires-Dist: tqdm<5,>=4.60
34
+ Requires-Dist: typing-extensions; python_version <= '3.10'
33
35
  Provides-Extra: dev
34
- Requires-Dist: black==22.10.0; extra == 'dev'
36
+ Requires-Dist: black==23.9.1; extra == 'dev'
35
37
  Requires-Dist: build; extra == 'dev'
36
38
  Requires-Dist: coverage>=5; extra == 'dev'
39
+ Requires-Dist: ipython; extra == 'dev'
37
40
  Requires-Dist: matplotlib>=3; extra == 'dev'
38
41
  Requires-Dist: networkx<4,>=2.4; extra == 'dev'
39
42
  Requires-Dist: pre-commit>=2.7; extra == 'dev'
@@ -41,25 +44,28 @@ Requires-Dist: pytest-cov>=2.10.1; extra == 'dev'
41
44
  Requires-Dist: pytest-json-report>=1.3; extra == 'dev'
42
45
  Requires-Dist: pytest-xdist[psutil]>=2; extra == 'dev'
43
46
  Requires-Dist: pytest>=6; extra == 'dev'
44
- Requires-Dist: ruff==0.0.278; extra == 'dev'
47
+ Requires-Dist: ruff==0.1.0; extra == 'dev'
45
48
  Requires-Dist: wheel; extra == 'dev'
46
49
  Provides-Extra: docs
47
- Requires-Dist: myst-nb~=0.17.1; extra == 'docs'
50
+ Requires-Dist: myst-nb~=1.0.0rc0; extra == 'docs'
48
51
  Requires-Dist: myst-parser<2.1.0,>=0.18.1; extra == 'docs'
49
- Requires-Dist: nbsphinx~=0.9.1; extra == 'docs'
50
52
  Requires-Dist: sphinx-autodoc-typehints~=1.22; extra == 'docs'
51
53
  Requires-Dist: sphinx-book-theme~=1.0.1; extra == 'docs'
52
- Requires-Dist: sphinx<7.1,>=5.3; extra == 'docs'
54
+ Requires-Dist: sphinx-design>=0.4.0; extra == 'docs'
55
+ Requires-Dist: sphinx<7.3,>=6.2; extra == 'docs'
53
56
  Requires-Dist: sphinxcontrib-fulltoc~=1.2.0; extra == 'docs'
54
57
  Requires-Dist: sphinxcontrib-jsmath~=1.0.1; extra == 'docs'
55
- Requires-Dist: sphinxcontrib-napoleon==0.7; extra == 'docs'
56
58
  Provides-Extra: extra
57
59
  Requires-Dist: h5py>=3.7.0; extra == 'extra'
58
60
  Requires-Dist: openfermion>=1.0.0; extra == 'extra'
61
+ Requires-Dist: qutip>=4; extra == 'extra'
59
62
  Requires-Dist: tensorboardx>=2.0.0; extra == 'extra'
60
63
  Provides-Extra: mpi
61
- Requires-Dist: mpi4jax<0.4,>=0.3.9; extra == 'mpi'
64
+ Requires-Dist: mpi4jax<0.5,>=0.3.9; extra == 'mpi'
62
65
  Requires-Dist: mpi4py<4,>=3.0.1; extra == 'mpi'
66
+ Provides-Extra: pyscf
67
+ Requires-Dist: pyscf>=2.0; extra == 'pyscf'
68
+ Requires-Dist: sparse>=0.12.0; extra == 'pyscf'
63
69
  Description-Content-Type: text/markdown
64
70
 
65
71
  <div align="center">
@@ -158,7 +164,7 @@ If you want MPI support, please follow the discussion in [mpi4jax](https://githu
158
164
 
159
165
  ## Getting Started
160
166
 
161
- To get started with NetKet, we recommend you give a look at our [tutorials page](https://netket.readthedocs.io/en/latest/tutorials/gs-ising.htmls), by running them on your computer or on [Google Colaboratory](https://colab.research.google.com).
167
+ To get started with NetKet, we recommend you give a look at our [tutorials page](https://netket.readthedocs.io/en/latest/tutorials/gs-ising.html), by running them on your computer or on [Google Colaboratory](https://colab.research.google.com).
162
168
  There are also many example scripts that you can download, run and edit that showcase some use-cases of NetKet, although they are not commented.
163
169
 
164
170
  If you want to get in touch with us, feel free to open an issue or a discussion here on GitHub, or to join the MLQuantum slack group where several people involved with NetKet hang out. To join the slack channel just accept [this invitation](https://join.slack.com/t/mlquantum/shared_invite/zt-19wibmfdv-LLRI6i43wrLev6oQX0OfOw)
@@ -94,7 +94,7 @@ If you want MPI support, please follow the discussion in [mpi4jax](https://githu
94
94
 
95
95
  ## Getting Started
96
96
 
97
- To get started with NetKet, we recommend you give a look at our [tutorials page](https://netket.readthedocs.io/en/latest/tutorials/gs-ising.htmls), by running them on your computer or on [Google Colaboratory](https://colab.research.google.com).
97
+ To get started with NetKet, we recommend you give a look at our [tutorials page](https://netket.readthedocs.io/en/latest/tutorials/gs-ising.html), by running them on your computer or on [Google Colaboratory](https://colab.research.google.com).
98
98
  There are also many example scripts that you can download, run and edit that showcase some use-cases of NetKet, although they are not commented.
99
99
 
100
100
  If you want to get in touch with us, feel free to open an issue or a discussion here on GitHub, or to join the MLQuantum slack group where several people involved with NetKet hang out. To join the slack channel just accept [this invitation](https://join.slack.com/t/mlquantum/shared_invite/zt-19wibmfdv-LLRI6i43wrLev6oQX0OfOw)
@@ -12,18 +12,11 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- # enable x64 on jax
16
- # must be done at startup.
17
- from jax.config import config
18
-
19
- config.update("jax_enable_x64", True)
20
- del config
21
-
22
15
  from ._version import version as __version__ # noqa: F401
23
16
 
24
- from . import utils
25
17
  from .utils import config
26
18
 
19
+ from . import utils
27
20
  from . import errors
28
21
 
29
22
  __all__ = [
@@ -0,0 +1,16 @@
1
+ # file generated by setuptools_scm
2
+ # don't change, don't track in version control
3
+ TYPE_CHECKING = False
4
+ if TYPE_CHECKING:
5
+ from typing import Tuple, Union
6
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
7
+ else:
8
+ VERSION_TUPLE = object
9
+
10
+ version: str
11
+ __version__: str
12
+ __version_tuple__: VERSION_TUPLE
13
+ version_tuple: VERSION_TUPLE
14
+
15
+ __version__ = version = '3.10'
16
+ __version_tuple__ = version_tuple = (3, 10)
@@ -22,6 +22,7 @@ import jax
22
22
  from jax.tree_util import tree_map
23
23
 
24
24
  from netket.logging import JsonLog
25
+ from netket.operator import AbstractOperator
25
26
  from netket.utils import mpi
26
27
 
27
28
 
@@ -108,19 +109,18 @@ class AbstractVariationalDriver(abc.ABC):
108
109
  def reset(self):
109
110
  """
110
111
  Resets the driver.
111
- Concrete drivers should also call super().reset() to ensure that the step
112
- count is set to 0.
112
+
113
+ Subclasses should make sure to call :code:`super().reset()` to ensure
114
+ that the step count is set to 0.
113
115
  """
114
116
  self.state.reset()
115
117
  self._step_count = 0
116
- pass
117
118
 
118
119
  @abc.abstractmethod
119
120
  def info(self, depth=0):
120
121
  """
121
122
  Returns an info string used to print information to screen about this driver.
122
123
  """
123
- pass # pragma: no cover
124
124
 
125
125
  @property
126
126
  def state(self):
@@ -156,9 +156,10 @@ class AbstractVariationalDriver(abc.ABC):
156
156
  after every `step_size` steps.
157
157
 
158
158
  Args:
159
- n_iter: The total number of steps to perform.
160
- step_size: The number of internal steps the simulation
161
- is advanced every turn.
159
+ n_steps: The total number of steps to perform (this is
160
+ equivalent to the length of the iterator)
161
+ step: The number of internal steps the simulation
162
+ is advanced between yielding from the iterator
162
163
 
163
164
  Yields:
164
165
  int: The current step.
@@ -176,7 +177,9 @@ class AbstractVariationalDriver(abc.ABC):
176
177
  """
177
178
  Performs `steps` optimization steps.
178
179
 
179
- steps: (Default=1) number of steps
180
+ Args:
181
+ steps: (Default=1) number of steps.
182
+
180
183
  """
181
184
  for _ in self.iter(steps):
182
185
  pass
@@ -245,12 +248,15 @@ class AbstractVariationalDriver(abc.ABC):
245
248
  callbacks = _to_iterable(callback)
246
249
  callback_stop = False
247
250
 
248
- with tqdm(total=n_iter, disable=not show_progress) as pbar:
251
+ with tqdm(
252
+ total=n_iter,
253
+ disable=not show_progress,
254
+ dynamic_ncols=True,
255
+ ) as pbar:
249
256
  old_step = self.step_count
250
257
  first_step = True
251
258
 
252
259
  for step in self.iter(n_iter, step_size):
253
-
254
260
  log_data = self.estimate(obs)
255
261
  self._log_additional_data(log_data, step)
256
262
 
@@ -302,7 +308,14 @@ class AbstractVariationalDriver(abc.ABC):
302
308
  A pytree of the same structure as the input, containing MCMC statistics
303
309
  for the corresponding operators as leaves.
304
310
  """
305
- return tree_map(self._estimate_stats, observables)
311
+
312
+ # Do not unpack operators, even if they are pytrees!
313
+ # this is necessary to support jax operators.
314
+ return tree_map(
315
+ self._estimate_stats,
316
+ observables,
317
+ is_leaf=lambda x: isinstance(x, AbstractOperator),
318
+ )
306
319
 
307
320
  def update_parameters(self, dp):
308
321
  """
@@ -329,7 +342,6 @@ class AbstractVariationalDriver(abc.ABC):
329
342
  Returns:
330
343
  Nothing. The log dictionary should be modified in place.
331
344
  """
332
- pass # pragma: no cover
333
345
 
334
346
 
335
347
  @partial(jax.jit, static_argnums=0)
@@ -119,8 +119,8 @@ class SteadyState(AbstractVariationalDriver):
119
119
  argument is the step, used to change some parameters along the
120
120
  optimisation.
121
121
 
122
- Often, this is taken to be :func:`nk.optimizer.SR`. If it is set to
123
- `None`, then the identity is used.
122
+ Often, this is taken to be :func:`~netket.optimizer.SR`. If it is
123
+ set to `None`, then the identity is used.
124
124
  """
125
125
  return self._preconditioner
126
126
 
@@ -158,4 +158,4 @@ class SteadyState(AbstractVariationalDriver):
158
158
  ("SR solver ", self.sr),
159
159
  ]
160
160
  ]
161
- return "\n{}".format(" " * 3 * (depth + 1)).join([str(self)] + lines)
161
+ return "\n{}".format(" " * 3 * (depth + 1)).join([str(self), *lines])
@@ -103,8 +103,8 @@ class VMC(AbstractVariationalDriver):
103
103
  argument is the step, used to change some parameters along the
104
104
  optimisation.
105
105
 
106
- Often, this is taken to be :func:`nk.optimizer.SR`. If it is set to
107
- `None`, then the identity is used.
106
+ Often, this is taken to be :func:`~netket.optimizer.SR`. If it is
107
+ set to `None`, then the identity is used.
108
108
  """
109
109
  return self._preconditioner
110
110
 
@@ -169,4 +169,4 @@ class VMC(AbstractVariationalDriver):
169
169
  ("State ", self.state),
170
170
  ]
171
171
  ]
172
- return "\n{}".format(" " * 3 * (depth + 1)).join([str(self)] + lines)
172
+ return "\n{}".format(" " * 3 * (depth + 1)).join([str(self), *lines])
@@ -599,6 +599,29 @@ class RealQGTComplexDomainError(Exception):
599
599
  )
600
600
 
601
601
 
602
+ class UnoptimalSRtWarning(NetketWarning):
603
+ """
604
+ SRt should be used when the number of parameters exceed the number of samples.
605
+ If this is not the case, employing `netket.driver.VMC` with the `nk.optimizer.SR` preconditioner
606
+ is a more efficient option while maintaining the same parameter dynamics.
607
+
608
+ .. note::
609
+ a detailed discussion can be found in the documentation of
610
+ :func:`netket.experimental.driver.VMC_SRt`).
611
+
612
+ """
613
+
614
+ def __init__(self, n_parameters, n_samples):
615
+ super().__init__(
616
+ f"""
617
+ You are in the case n_samples > num_params ({n_samples} > {n_parameters}),
618
+ for which the `VMC_SRt` is not optimal. Consider using `netket.driver.VMC`
619
+ with the preconditioner `nk.optimizer.SR` to achieve the same parameter dynamics,
620
+ but with improved speed.
621
+ """
622
+ )
623
+
624
+
602
625
  #################################################
603
626
  # Functions to throw errors #
604
627
  #################################################
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from typing import Optional
16
+
15
17
  import numpy as _np
16
18
  from scipy.sparse.linalg import bicgstab as _bicgstab
17
19
  from scipy.sparse.linalg import LinearOperator as _LinearOperator
@@ -26,7 +28,7 @@ def lanczos_ed(
26
28
  k: int = 1,
27
29
  compute_eigenvectors: bool = False,
28
30
  matrix_free: bool = False,
29
- scipy_args: dict = None,
31
+ scipy_args: Optional[dict] = None,
30
32
  ):
31
33
  r"""Computes `first_n` smallest eigenvalues and, optionally, eigenvectors
32
34
  of a Hermitian operator using :meth:`scipy.sparse.linalg.eigsh`.
@@ -18,9 +18,11 @@ __all__ = [
18
18
  "sampler",
19
19
  "vqs",
20
20
  "TDVP",
21
+ "models",
21
22
  "hilbert",
22
23
  "operator",
23
24
  "logging",
25
+ "observable",
24
26
  ]
25
27
 
26
28
  from . import hilbert
@@ -28,9 +30,11 @@ from . import operator
28
30
  from . import driver
29
31
  from . import dynamics
30
32
  from . import sampler
33
+ from . import models
31
34
  from . import vqs
32
35
  from . import logging
33
36
  from . import qsr
37
+ from . import observable
34
38
 
35
39
  from .driver import TDVP
36
40
  from .qsr import QSR
@@ -14,7 +14,7 @@
14
14
 
15
15
  from .tdvp import TDVP
16
16
  from .tdvp_schmitt import TDVPSchmitt
17
-
17
+ from .vmc_srt import VMC_SRt
18
18
  from netket.utils import _hide_submodules
19
19
 
20
20
  _hide_submodules(__name__)
@@ -135,7 +135,7 @@ class TDVP(TDVPBaseDriver):
135
135
  ("state ", self.state),
136
136
  ]
137
137
  ]
138
- return "\n{}".format(" " * 3 * (depth + 1)).join([str(self)] + lines)
138
+ return "\n{}".format(" " * 3 * (depth + 1)).join([str(self), *lines])
139
139
 
140
140
 
141
141
  @odefun.dispatch
@@ -179,7 +179,6 @@ def odefun_tdvp( # noqa: F811
179
179
 
180
180
  @partial(jax.jit, static_argnums=(3, 4))
181
181
  def _map_parameters(forces, parameters, loss_grad_factor, propagation_type, state_T):
182
-
183
182
  forces = jax.tree_map(
184
183
  lambda x, target: loss_grad_factor * x,
185
184
  forces,
@@ -12,7 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- from typing import Callable, Optional, Sequence, Union
15
+ from typing import Callable, Optional, Union
16
+ from collections.abc import Sequence
16
17
  import warnings
17
18
 
18
19
  import jax
@@ -205,6 +206,7 @@ class TDVPBaseDriver(AbstractVariationalDriver):
205
206
  at which this method will stop and yield. By default, a stop is performed
206
207
  after each time step (at potentially varying step size if an adaptive
207
208
  integrator is used).
209
+
208
210
  Yields:
209
211
  The current step count.
210
212
  """
@@ -214,7 +216,7 @@ class TDVPBaseDriver(AbstractVariationalDriver):
214
216
  self,
215
217
  T: float,
216
218
  tstops: Optional[Sequence[float]] = None,
217
- callback: Callable = None,
219
+ callback: Optional[Callable] = None,
218
220
  ):
219
221
  """
220
222
  Implementation of :code:`iter`. This method accepts and additional `callback` object, which
@@ -328,6 +330,7 @@ class TDVPBaseDriver(AbstractVariationalDriver):
328
330
  total=t_end,
329
331
  disable=not show_progress,
330
332
  unit_scale=True,
333
+ dynamic_ncols=True,
331
334
  ) as pbar:
332
335
  first_step = True
333
336
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- from typing import Callable, Union
15
+ from typing import Callable, Union, Optional
16
16
 
17
17
  from functools import partial
18
18
 
@@ -108,9 +108,9 @@ class TDVPSchmitt(TDVPBaseDriver):
108
108
  *,
109
109
  t0: float = 0.0,
110
110
  propagation_type="real",
111
- holomorphic: bool = None,
111
+ holomorphic: Optional[bool] = None,
112
112
  diag_shift: float = 0.0,
113
- diag_scale: float = None,
113
+ diag_scale: Optional[float] = None,
114
114
  error_norm: Union[str, Callable] = "qgt",
115
115
  rcond: float = 1e-14,
116
116
  rcond_smooth: float = 1e-8,
@@ -192,7 +192,7 @@ class TDVPSchmitt(TDVPBaseDriver):
192
192
  ("state ", self.state),
193
193
  ]
194
194
  ]
195
- return "\n{}".format(" " * 3 * (depth + 1)).join([str(self)] + lines)
195
+ return "\n{}".format(" " * 3 * (depth + 1)).join([str(self), *lines])
196
196
 
197
197
 
198
198
  # Copyright notice:
@@ -204,7 +204,7 @@ class TDVPSchmitt(TDVPBaseDriver):
204
204
  @partial(jax.jit, static_argnames=("n_samples"))
205
205
  def _impl(parameters, n_samples, E_loc, S, rhs_coeff, rcond, rcond_smooth, snr_atol):
206
206
  E = stats.statistics(E_loc)
207
- ΔE_loc = E_loc.T.reshape(-1, 1) - E.mean
207
+ ΔE_loc = E_loc.reshape(-1, 1) - E.mean
208
208
 
209
209
  stack_jacobian = S.mode == "complex"
210
210
 
@@ -295,7 +295,6 @@ def odefun_schmitt(state: MCState, self: TDVPSchmitt, t, w, *, stage=0): # noqa
295
295
 
296
296
  @partial(jax.jit, static_argnums=(3, 4))
297
297
  def _map_parameters(forces, parameters, loss_grad_factor, propagation_type, state_T):
298
-
299
298
  forces = jax.tree_map(
300
299
  lambda x, target: loss_grad_factor * x,
301
300
  forces,