NetKet 3.20.0__tar.gz → 3.20.2__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.
- {netket-3.20.0 → netket-3.20.2}/PKG-INFO +2 -2
- {netket-3.20.0 → netket-3.20.2}/netket/_version.py +2 -2
- {netket-3.20.0 → netket-3.20.2}/netket/jax/__init__.py +16 -1
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_jacobian/jacobian_dense.py +3 -2
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_jacobian/logic.py +2 -2
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_utils_tree.py +3 -12
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/qgt_jacobian_dense.py +2 -1
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/qgt_jacobian_pytree.py +5 -4
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/qgt_onthefly.py +3 -2
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/solver/solvers.py +7 -8
- {netket-3.20.0 → netket-3.20.2}/netket/utils/model_frameworks/nnx.py +12 -6
- {netket-3.20.0 → netket-3.20.2}/pyproject.toml +1 -1
- {netket-3.20.0 → netket-3.20.2}/.gitignore +0 -0
- {netket-3.20.0 → netket-3.20.2}/LICENSE +0 -0
- {netket-3.20.0 → netket-3.20.2}/README.md +0 -0
- {netket-3.20.0 → netket-3.20.2}/docs/sphinx_extensions/netket_citations.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/driver/vmc_sr.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/ngd/kwargs.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/ngd/sr.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/ngd/sr_srt_common.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/ngd/srt.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/ngd/srt_onthefly.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/operator/hpsi_utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/permutation_operator_base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/permutation_operator_construct.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/permutation_operator_fermion.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/permutation_operator_spin.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/trace_utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/symmetry/representation.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/symmetry/representation_construction.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/_src/vqs/transformed_vstate.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/callbacks/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/callbacks/convergence_stopping.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/callbacks/early_stopping.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/callbacks/invalid_loss_stopping.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/callbacks/timeout.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/driver/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/driver/abstract_variational_driver.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/driver/steady_state.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/driver/vmc.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/errors.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/exact.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/driver/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/driver/infidelity_sr.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/driver/tdvp.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/driver/tdvp_common.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/driver/tdvp_schmitt.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/_integrator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/_integrator_params.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/_integrator_state.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/_rk/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/_rk/_solver.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/_rk/_tableau.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/_solver.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/dynamics/_utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/geometry/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/geometry/cell.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/hilbert/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/hilbert/continuous_hilbert.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/hilbert/particle.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/hilbert/random/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/hilbert/random/particle.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/logging/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/logging/hdf5_log.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/models/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/models/fast_rnn.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/models/rnn.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/nn/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/nn/rnn/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/nn/rnn/cells.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/nn/rnn/layers.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/nn/rnn/layers_fast.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/nn/rnn/ordering.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/infidelity/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/infidelity/exact.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/infidelity/expect.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/infidelity/infidelity_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/renyi2/S2_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/renyi2/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/renyi2/exact.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/renyi2/expect.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/variance/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/variance/exact.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/variance/expect.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/variance/variance_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/_normal_order_utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/_particle_number_conserving_fermionic/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/_particle_number_conserving_fermionic/_conversion.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/_particle_number_conserving_fermionic/_fermihubbard.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/_particle_number_conserving_fermionic/_kernels.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/_particle_number_conserving_fermionic/_operator_data.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/_particle_number_conserving_fermionic/_operators.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/_pyscf_utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/fermion.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/operator/pyscf.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/qsr/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/qsr/dataset.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/qsr/driver.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/qsr/logic_helpers.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/sampler/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/sampler/rules/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/vqs/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/experimental/vqs/io.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/graph/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/graph/_lattice_draw.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/graph/_lattice_edge_logic.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/graph/abstract_graph.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/graph/common_lattices.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/graph/graph.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/graph/lattice.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/graph/space_group.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/abstract_hilbert.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/constraint/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/constraint/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/constraint/multiple.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/constraint/sum.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/constraint/sum_partition.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/discrete_hilbert.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/doubled_hilbert.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/fock.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/homogeneous.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/index/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/index/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/index/constrained_generic.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/index/constrained_sum.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/index/constrained_sum_partitions.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/index/unconstrained.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/index/uniform_tensor.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/qubit.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/random/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/random/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/random/doubled.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/random/fock.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/random/homogeneous.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/random/qubit.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/random/tensor_hilbert.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/spin.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/spin_orbital_fermions.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/tensor_hilbert.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/hilbert/tensor_hilbert_discrete.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_chunk_utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_expect.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_grad.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_jacobian/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_jacobian/default_mode.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_jacobian/jacobian_pytree.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_math.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_ntk/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_ntk/logic.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_ntk/utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_scanmap.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_sort.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_sparse.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_utils_dtype.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_utils_random.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_vjp.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_vjp_chunked.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/_vmap_chunked.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/sharding/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/sharding/debug.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/sharding/fixed_sharding_decorator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/sharding/fixed_sharding_utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/jax/sharding/flexible_sharding.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/logging/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/logging/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/logging/json_log.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/logging/runtime_log.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/logging/state_log.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/logging/tensorboard.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/README.md +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/autoreg.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/deepset.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/equivariant.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/fast_autoreg.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/full_space.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/gaussian.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/jastrow.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/mlp.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/ndm.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/rbm.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/slater.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/tensor_networks/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/tensor_networks/mpdo.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/tensor_networks/mps.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/models/utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/activation.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/blocks/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/blocks/deepset.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/blocks/mlp.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/blocks/symmetry_sum.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/fast_masked_linear.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/masked_linear.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/symmetric_linear.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/nn/utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_abstract_observable.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_abstract_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_abstract_super_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_bose_hubbard/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_bose_hubbard/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_bose_hubbard/jax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_bose_hubbard/numba.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_continuous_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_discrete_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_discrete_operator_jax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_fermion2nd/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_fermion2nd/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_fermion2nd/jax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_fermion2nd/numba.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_fermion2nd/utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_graph_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_hamiltonian.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_heisenberg.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_ising/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_ising/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_ising/jax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_ising/numba.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_kinetic.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_lazy.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_local_liouvillian.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_local_operator/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_local_operator/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_local_operator/compile_helpers.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_local_operator/convert.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_local_operator/helpers.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_local_operator/jax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_local_operator/numba.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_pauli_strings/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_pauli_strings/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_pauli_strings/jax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_pauli_strings/numba.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_potential.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_prod/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_prod/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_prod/discrete_jax_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_prod/discrete_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_prod/operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_sum/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_sum/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_sum/continuous.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_sum/discrete_jax_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_sum/discrete_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/_sum/operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/boson.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/fermion.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/permutation.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/operator/spin.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/linear_operator.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/preconditioner.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/common.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/default.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/qgt_jacobian.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/qgt_jacobian_common.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/qgt/qgt_onthefly_logic.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/solver/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/optimizer/sr.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/autoreg.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/exact.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/metropolis.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/metropolis_numpy.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/parallel_tempering.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/continuous_gaussian.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/custom_numpy.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/exchange.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/fermion_2nd.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/fixed.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/global_flip_rule.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/hamiltonian.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/hamiltonian_numpy.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/langevin.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/local.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/local_numpy.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/multiple.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/sampler/rules/tensor.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/stats/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/stats/_autocorr.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/stats/mc_stats.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/stats/mc_stats_old.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/stats/mpi_stats.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/symmetry/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/symmetry/group/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/tools/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/tools/_common.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/tools/_cpu_info.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/tools/check_mpi.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/tools/djaxrun.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/tools/info.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/_dependencies_check.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/_serialization.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/_tips.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/api_utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/array.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/citations/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/citations/cli.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/citations/core.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/citations/docs.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/citations/internal_citations.bib +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/config_flags.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/deprecation.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/dispatch.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/display/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/display/repr.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/float.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/_group.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/_permutation_group.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/_point_group.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/_semigroup.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/axial.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/cubic.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/icosa.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/group/planar.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/history/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/history/accum.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/history/history.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/history/history_dict.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/holomorphic.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/iterators.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/jax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/model_frameworks/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/model_frameworks/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/model_frameworks/equinox.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/model_frameworks/flax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/model_frameworks/haiku.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/model_frameworks/jax.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/model_frameworks/nnx_wrapped.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/moduletools.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/mpi/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/mpi/mpi.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/mpi/primitives.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/numbers.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/optional_deps.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/partial.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/seed.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/static_number.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/static_range.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/struct/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/struct/dataclass.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/struct/fields.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/struct/pytree.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/struct/pytree_serialization_sharding.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/struct/utils.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/summation.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/timing.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/types.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/utils/version_check.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/base.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/full_summ/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/full_summ/expect.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/full_summ/state.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/common.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/kernels.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_mixed_state/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_mixed_state/expect.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_mixed_state/expect_chunked.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_mixed_state/state.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_state/__init__.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_state/expect.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_state/expect_chunked.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_state/expect_forces.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_state/expect_forces_chunked.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_state/expect_grad.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_state/expect_grad_chunked.py +0 -0
- {netket-3.20.0 → netket-3.20.2}/netket/vqs/mc/mc_state/state.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NetKet
|
|
3
|
-
Version: 3.20.
|
|
3
|
+
Version: 3.20.2
|
|
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/#
|
|
@@ -46,7 +46,7 @@ Requires-Dist: pytest-json-report>=1.3; extra == 'dev'
|
|
|
46
46
|
Requires-Dist: pytest-xdist[psutil]>=2; extra == 'dev'
|
|
47
47
|
Requires-Dist: pytest>=6; extra == 'dev'
|
|
48
48
|
Requires-Dist: qutip>=5; extra == 'dev'
|
|
49
|
-
Requires-Dist: ruff==0.
|
|
49
|
+
Requires-Dist: ruff==0.14.1; extra == 'dev'
|
|
50
50
|
Requires-Dist: wheel>=0.38.1; extra == 'dev'
|
|
51
51
|
Provides-Extra: docs
|
|
52
52
|
Requires-Dist: ipywidgets>=8.1.7; extra == 'docs'
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '3.20.
|
|
32
|
-
__version_tuple__ = version_tuple = (3, 20,
|
|
31
|
+
__version__ = version = '3.20.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 20, 2)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -23,7 +23,7 @@ from ._utils_dtype import (
|
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
from ._utils_tree import (
|
|
26
|
-
tree_ravel,
|
|
26
|
+
tree_ravel as _deprecated_tree_ravel,
|
|
27
27
|
tree_size,
|
|
28
28
|
eval_shape,
|
|
29
29
|
tree_leaf_isreal,
|
|
@@ -69,3 +69,18 @@ from . import sharding
|
|
|
69
69
|
from netket.utils import _hide_submodules
|
|
70
70
|
|
|
71
71
|
_hide_submodules(__name__, ignore="sharding")
|
|
72
|
+
|
|
73
|
+
# Deprecation machinery
|
|
74
|
+
_deprecations = {
|
|
75
|
+
# January 2025, NetKet 3.16
|
|
76
|
+
"tree_ravel": (
|
|
77
|
+
"netket.jax.tree_ravel is deprecated: use jax.flatten_util.ravel_pytree directly",
|
|
78
|
+
_deprecated_tree_ravel,
|
|
79
|
+
),
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
from netket.utils.deprecation import deprecation_getattr as _deprecation_getattr
|
|
83
|
+
|
|
84
|
+
__getattr__ = _deprecation_getattr(__name__, _deprecations)
|
|
85
|
+
|
|
86
|
+
del _deprecation_getattr
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
from jax import numpy as jnp
|
|
16
|
+
from jax.flatten_util import ravel_pytree
|
|
16
17
|
|
|
17
18
|
from netket.utils.types import Array, PyTree
|
|
18
19
|
import netket.jax as nkjax
|
|
@@ -25,9 +26,9 @@ from .jacobian_pytree import (
|
|
|
25
26
|
|
|
26
27
|
def ravel(x: PyTree) -> Array:
|
|
27
28
|
"""
|
|
28
|
-
shorthand for
|
|
29
|
+
shorthand for ravel_pytree
|
|
29
30
|
"""
|
|
30
|
-
dense, _ =
|
|
31
|
+
dense, _ = ravel_pytree(x)
|
|
31
32
|
return dense
|
|
32
33
|
|
|
33
34
|
|
|
@@ -121,8 +121,8 @@ def jacobian(
|
|
|
121
121
|
dimension matches the number of samples (the first axis of **samples**),
|
|
122
122
|
while the second dimension will match the total number of parameters.
|
|
123
123
|
This raveling is equivalent to :func:`jax.vmap` of
|
|
124
|
-
:func:`
|
|
125
|
-
:code:`jax.vmap(
|
|
124
|
+
:func:`jax.flatten_util.ravel_pytree`,
|
|
125
|
+
:code:`jax.vmap(ravel_pytree, nk.jax.jacobian(...))`.
|
|
126
126
|
If using **complex** mode with real parameters the returned tensor
|
|
127
127
|
has 3 dimensions, where the first and last match the other modes while
|
|
128
128
|
the middle one has size 2, and encodes the gradient of the real and
|
|
@@ -17,15 +17,13 @@ from collections.abc import Callable
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
import jax
|
|
20
|
-
import netket.jax as nkjax
|
|
21
20
|
from jax import numpy as jnp
|
|
22
21
|
from jax.tree_util import (
|
|
23
22
|
register_pytree_node,
|
|
24
|
-
tree_flatten,
|
|
25
|
-
tree_unflatten,
|
|
26
23
|
tree_map,
|
|
27
24
|
tree_leaves,
|
|
28
25
|
)
|
|
26
|
+
from jax.flatten_util import ravel_pytree
|
|
29
27
|
|
|
30
28
|
from netket.utils.types import PyTree, Scalar
|
|
31
29
|
from netket.utils.numbers import is_scalar
|
|
@@ -43,14 +41,7 @@ def tree_ravel(pytree: PyTree) -> tuple[jnp.ndarray, Callable]:
|
|
|
43
41
|
unflattening a 1D vector of the same length back to a pytree of of the same
|
|
44
42
|
structure as the input ``pytree``.
|
|
45
43
|
"""
|
|
46
|
-
|
|
47
|
-
flat, unravel_list = nkjax.vjp(_ravel_list, *leaves)
|
|
48
|
-
unravel_pytree = lambda flat: tree_unflatten(treedef, unravel_list(flat))
|
|
49
|
-
return flat, unravel_pytree
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def _ravel_list(*lst):
|
|
53
|
-
return jnp.concatenate([jnp.ravel(elt) for elt in lst]) if lst else jnp.array([])
|
|
44
|
+
return ravel_pytree(pytree)
|
|
54
45
|
|
|
55
46
|
|
|
56
47
|
def eval_shape(fun, *args, has_aux=False, **kwargs):
|
|
@@ -131,7 +122,7 @@ def tree_norm(a: PyTree, ord: int = 2) -> Scalar:
|
|
|
131
122
|
r"""
|
|
132
123
|
Compute the norm of a pytree, intended as a 1D vector of values.
|
|
133
124
|
|
|
134
|
-
Equivalent to :code:`jnp.linalg.norm(
|
|
125
|
+
Equivalent to :code:`jnp.linalg.norm(jax.flatten_util.ravel_pytree(a)[0], ord)`.
|
|
135
126
|
|
|
136
127
|
Args:
|
|
137
128
|
a: A pytree, interpreted as a vector
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import jax
|
|
17
17
|
from jax import numpy as jnp
|
|
18
|
+
from jax.flatten_util import ravel_pytree
|
|
18
19
|
from flax import struct
|
|
19
20
|
|
|
20
21
|
from netket.utils.types import Scalar, PyTree
|
|
@@ -286,6 +287,6 @@ def convert_tree_to_dense_format(vec, mode, *, disable=False):
|
|
|
286
287
|
if mode != "holomorphic":
|
|
287
288
|
vec, reassemble = nkjax.tree_to_real(vec)
|
|
288
289
|
if not hasattr(vec, "ndim"):
|
|
289
|
-
vec, unravel =
|
|
290
|
+
vec, unravel = ravel_pytree(vec)
|
|
290
291
|
|
|
291
292
|
return vec, lambda x: reassemble(unravel(x))
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import jax
|
|
17
17
|
from jax import numpy as jnp
|
|
18
|
+
from jax.flatten_util import ravel_pytree
|
|
18
19
|
from flax import struct
|
|
19
20
|
|
|
20
21
|
from netket.utils.types import Array, PyTree, Scalar
|
|
@@ -71,7 +72,7 @@ class QGTJacobianPyTreeT(LinearOperator):
|
|
|
71
72
|
def __matmul__(self, vec: PyTree | Array) -> PyTree | Array:
|
|
72
73
|
# Turn vector RHS into PyTree
|
|
73
74
|
if hasattr(vec, "ndim"):
|
|
74
|
-
_, unravel =
|
|
75
|
+
_, unravel = ravel_pytree(self._params_structure)
|
|
75
76
|
vec = unravel(vec)
|
|
76
77
|
ravel = True
|
|
77
78
|
else:
|
|
@@ -98,7 +99,7 @@ class QGTJacobianPyTreeT(LinearOperator):
|
|
|
98
99
|
|
|
99
100
|
# Ravel PyTree back into vector as needed
|
|
100
101
|
if ravel:
|
|
101
|
-
result, _ =
|
|
102
|
+
result, _ = ravel_pytree(result)
|
|
102
103
|
|
|
103
104
|
return result
|
|
104
105
|
|
|
@@ -179,12 +180,12 @@ class QGTJacobianPyTreeT(LinearOperator):
|
|
|
179
180
|
if self.mode == "complex" or self.mode == "imag":
|
|
180
181
|
# I want to iterate across the samples and real/imaginary part
|
|
181
182
|
O = jax.tree_util.tree_map(lambda x: x.reshape(-1, *x.shape[2:]), O)
|
|
182
|
-
O = jax.vmap(lambda l:
|
|
183
|
+
O = jax.vmap(lambda l: ravel_pytree(l)[0])(O)
|
|
183
184
|
|
|
184
185
|
if self.scale is None:
|
|
185
186
|
diag = jnp.eye(O.shape[-1])
|
|
186
187
|
else:
|
|
187
|
-
scale, _ =
|
|
188
|
+
scale, _ = ravel_pytree(self.scale)
|
|
188
189
|
O = O * scale[jnp.newaxis, :]
|
|
189
190
|
diag = jnp.diag(scale**2)
|
|
190
191
|
|
|
@@ -17,6 +17,7 @@ import warnings
|
|
|
17
17
|
|
|
18
18
|
import jax
|
|
19
19
|
from jax import numpy as jnp
|
|
20
|
+
from jax.flatten_util import ravel_pytree
|
|
20
21
|
from flax import struct
|
|
21
22
|
|
|
22
23
|
import netket.jax as nkjax
|
|
@@ -248,7 +249,7 @@ def onthefly_mat_treevec(
|
|
|
248
249
|
"""
|
|
249
250
|
)
|
|
250
251
|
|
|
251
|
-
_, unravel =
|
|
252
|
+
_, unravel = ravel_pytree(S._params)
|
|
252
253
|
vec = unravel(vec)
|
|
253
254
|
ravel_result = True
|
|
254
255
|
else:
|
|
@@ -261,7 +262,7 @@ def onthefly_mat_treevec(
|
|
|
261
262
|
res = S._mat_vec(vec, S.diag_shift)
|
|
262
263
|
|
|
263
264
|
if ravel_result:
|
|
264
|
-
res, _ =
|
|
265
|
+
res, _ = ravel_pytree(res)
|
|
265
266
|
|
|
266
267
|
return res
|
|
267
268
|
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
import jax
|
|
17
17
|
import jax.numpy as jnp
|
|
18
18
|
import jax.scipy as jsp
|
|
19
|
-
|
|
20
|
-
from netket.jax import tree_ravel
|
|
19
|
+
from jax.flatten_util import ravel_pytree
|
|
21
20
|
from netket.utils.api_utils import partial_from_kwargs
|
|
22
21
|
from netket.utils.deprecation import warn_deprecation
|
|
23
22
|
|
|
@@ -100,7 +99,7 @@ def pinv_smooth(
|
|
|
100
99
|
|
|
101
100
|
if not isinstance(A, jax.Array):
|
|
102
101
|
A = A.to_dense()
|
|
103
|
-
b, unravel =
|
|
102
|
+
b, unravel = ravel_pytree(b)
|
|
104
103
|
|
|
105
104
|
Σ, U = jnp.linalg.eigh(A)
|
|
106
105
|
|
|
@@ -166,7 +165,7 @@ def pinv(A, b, *, rtol: float = 1e-12, x0=None, rcond: float = None):
|
|
|
166
165
|
|
|
167
166
|
if not isinstance(A, jax.Array):
|
|
168
167
|
A = A.to_dense()
|
|
169
|
-
b, unravel =
|
|
168
|
+
b, unravel = ravel_pytree(b)
|
|
170
169
|
|
|
171
170
|
A_inv = jnp.linalg.pinv(A, rtol=rtol, hermitian=True)
|
|
172
171
|
|
|
@@ -197,7 +196,7 @@ def svd(A, b, *, rcond=None, x0=None):
|
|
|
197
196
|
|
|
198
197
|
if not isinstance(A, jax.Array):
|
|
199
198
|
A = A.to_dense()
|
|
200
|
-
b, unravel =
|
|
199
|
+
b, unravel = ravel_pytree(b)
|
|
201
200
|
|
|
202
201
|
x, residuals, rank, s = jnp.linalg.lstsq(A, b, rcond=rcond)
|
|
203
202
|
|
|
@@ -228,7 +227,7 @@ def cholesky(A, b, *, lower=False, x0=None):
|
|
|
228
227
|
|
|
229
228
|
if not isinstance(A, jax.Array):
|
|
230
229
|
A = A.to_dense()
|
|
231
|
-
b, unravel =
|
|
230
|
+
b, unravel = ravel_pytree(b)
|
|
232
231
|
|
|
233
232
|
c, low = jsp.linalg.cho_factor(A, lower=lower)
|
|
234
233
|
x = jsp.linalg.cho_solve((c, low), b)
|
|
@@ -259,7 +258,7 @@ def LU(A, b, *, trans=0, x0=None):
|
|
|
259
258
|
|
|
260
259
|
if not isinstance(A, jax.Array):
|
|
261
260
|
A = A.to_dense()
|
|
262
|
-
b, unravel =
|
|
261
|
+
b, unravel = ravel_pytree(b)
|
|
263
262
|
|
|
264
263
|
lu, piv = jsp.linalg.lu_factor(A)
|
|
265
264
|
x = jsp.linalg.lu_solve((lu, piv), b, trans=0)
|
|
@@ -291,7 +290,7 @@ def solve(A, b, *, assume_a="pos", x0=None):
|
|
|
291
290
|
|
|
292
291
|
if not isinstance(A, jax.Array):
|
|
293
292
|
A = A.to_dense()
|
|
294
|
-
b, unravel =
|
|
293
|
+
b, unravel = ravel_pytree(b)
|
|
295
294
|
|
|
296
295
|
x = jsp.linalg.solve(A, b, assume_a="pos")
|
|
297
296
|
return unravel(x), None
|
|
@@ -80,12 +80,18 @@ class NNXWrapper:
|
|
|
80
80
|
return nnx_module
|
|
81
81
|
|
|
82
82
|
def __getattr__(self, name):
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
# Use try-except instead of hasattr to avoid infinite recursion
|
|
84
|
+
# when checking for attributes that don't exist
|
|
85
|
+
graphdef_type = _get_graphdef_type(object.__getattribute__(self, "graphdef"))
|
|
86
|
+
try:
|
|
87
|
+
# Check if the attribute exists on the graphdef type's class
|
|
88
|
+
getattr(graphdef_type, name)
|
|
89
|
+
return partial(object.__getattribute__(self, "apply"), method=name)
|
|
90
|
+
except AttributeError:
|
|
91
|
+
raise AttributeError(
|
|
92
|
+
f"{graphdef_type} (wrapped into a '{type(self).__name__}')"
|
|
93
|
+
f" has no attribute '{name}'"
|
|
94
|
+
)
|
|
89
95
|
|
|
90
96
|
def __hash__(self):
|
|
91
97
|
return hash(("NNXWrapper", self.graphdef))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/permutation_operator_base.py
RENAMED
|
File without changes
|
{netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/permutation_operator_construct.py
RENAMED
|
File without changes
|
{netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/permutation_operator_fermion.py
RENAMED
|
File without changes
|
{netket-3.20.0 → netket-3.20.2}/netket/_src/operator/permutation/permutation_operator_spin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/infidelity/infidelity_operator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netket-3.20.0 → netket-3.20.2}/netket/experimental/observable/variance/variance_operator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|