NetKet 3.20.3__tar.gz → 3.20.4__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.3 → netket-3.20.4}/PKG-INFO +1 -1
- {netket-3.20.3 → netket-3.20.4}/netket/_src/vqs/transformed_vstate.py +10 -4
- {netket-3.20.3 → netket-3.20.4}/netket/_version.py +2 -2
- {netket-3.20.3 → netket-3.20.4}/netket/errors.py +108 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_discrete_operator_jax.py +8 -1
- {netket-3.20.3 → netket-3.20.4}/.gitignore +0 -0
- {netket-3.20.3 → netket-3.20.4}/LICENSE +0 -0
- {netket-3.20.3 → netket-3.20.4}/README.md +0 -0
- {netket-3.20.3 → netket-3.20.4}/docs/sphinx_extensions/netket_citations.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/driver/vmc_sr.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/ngd/kwargs.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/ngd/sr.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/ngd/sr_srt_common.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/ngd/srt.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/ngd/srt_onthefly.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/operator/hpsi_utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/operator/permutation/permutation_operator_base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/operator/permutation/permutation_operator_construct.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/operator/permutation/permutation_operator_fermion.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/operator/permutation/permutation_operator_spin.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/operator/permutation/trace_utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/symmetry/representation.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/_src/symmetry/representation_construction.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/callbacks/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/callbacks/convergence_stopping.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/callbacks/early_stopping.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/callbacks/invalid_loss_stopping.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/callbacks/timeout.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/driver/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/driver/abstract_variational_driver.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/driver/steady_state.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/driver/vmc.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/exact.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/driver/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/driver/infidelity_sr.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/driver/tdvp.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/driver/tdvp_common.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/driver/tdvp_schmitt.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/_integrator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/_integrator_params.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/_integrator_state.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/_rk/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/_rk/_solver.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/_rk/_tableau.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/_solver.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/dynamics/_utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/geometry/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/geometry/cell.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/hilbert/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/hilbert/continuous_hilbert.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/hilbert/particle.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/hilbert/random/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/hilbert/random/particle.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/logging/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/logging/hdf5_log.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/models/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/models/fast_rnn.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/models/rnn.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/nn/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/nn/rnn/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/nn/rnn/cells.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/nn/rnn/layers.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/nn/rnn/layers_fast.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/nn/rnn/ordering.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/infidelity/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/infidelity/exact.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/infidelity/expect.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/infidelity/infidelity_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/renyi2/S2_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/renyi2/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/renyi2/exact.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/renyi2/expect.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/variance/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/variance/exact.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/variance/expect.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/observable/variance/variance_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/_normal_order_utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/_particle_number_conserving_fermionic/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/_particle_number_conserving_fermionic/_conversion.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/_particle_number_conserving_fermionic/_fermihubbard.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/_particle_number_conserving_fermionic/_kernels.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/_particle_number_conserving_fermionic/_operator_data.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/_particle_number_conserving_fermionic/_operators.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/_pyscf_utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/fermion.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/operator/pyscf.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/qsr/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/qsr/dataset.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/qsr/driver.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/qsr/logic_helpers.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/sampler/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/sampler/rules/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/vqs/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/experimental/vqs/io.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/graph/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/graph/_lattice_draw.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/graph/_lattice_edge_logic.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/graph/abstract_graph.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/graph/common_lattices.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/graph/graph.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/graph/lattice.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/graph/space_group.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/abstract_hilbert.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/constraint/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/constraint/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/constraint/multiple.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/constraint/sum.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/constraint/sum_partition.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/discrete_hilbert.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/doubled_hilbert.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/fock.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/homogeneous.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/index/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/index/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/index/constrained_generic.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/index/constrained_sum.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/index/constrained_sum_partitions.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/index/unconstrained.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/index/uniform_tensor.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/qubit.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/random/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/random/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/random/doubled.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/random/fock.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/random/homogeneous.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/random/qubit.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/random/tensor_hilbert.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/spin.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/spin_orbital_fermions.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/tensor_hilbert.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/hilbert/tensor_hilbert_discrete.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_chunk_utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_expect.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_grad.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_jacobian/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_jacobian/default_mode.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_jacobian/jacobian_dense.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_jacobian/jacobian_pytree.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_jacobian/logic.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_math.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_ntk/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_ntk/logic.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_ntk/utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_scanmap.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_sort.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_sparse.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_utils_dtype.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_utils_random.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_utils_tree.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_vjp.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_vjp_chunked.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/_vmap_chunked.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/sharding/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/sharding/debug.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/sharding/fixed_sharding_decorator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/sharding/fixed_sharding_utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/jax/sharding/flexible_sharding.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/logging/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/logging/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/logging/json_log.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/logging/runtime_log.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/logging/state_log.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/logging/tensorboard.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/README.md +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/autoreg.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/deepset.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/equivariant.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/fast_autoreg.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/full_space.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/gaussian.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/jastrow.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/mlp.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/ndm.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/rbm.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/slater.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/tensor_networks/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/tensor_networks/mpdo.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/tensor_networks/mps.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/models/utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/activation.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/blocks/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/blocks/deepset.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/blocks/mlp.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/blocks/symmetry_sum.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/fast_masked_linear.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/masked_linear.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/symmetric_linear.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/nn/utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_abstract_observable.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_abstract_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_abstract_super_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_bose_hubbard/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_bose_hubbard/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_bose_hubbard/jax.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_bose_hubbard/numba.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_continuous_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_discrete_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_fermion2nd/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_fermion2nd/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_fermion2nd/jax.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_fermion2nd/numba.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_fermion2nd/utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_graph_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_hamiltonian.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_heisenberg.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_ising/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_ising/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_ising/jax.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_ising/numba.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_kinetic.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_lazy.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_local_liouvillian.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_local_operator/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_local_operator/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_local_operator/compile_helpers.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_local_operator/convert.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_local_operator/helpers.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_local_operator/jax.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_local_operator/numba.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_pauli_strings/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_pauli_strings/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_pauli_strings/jax.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_pauli_strings/numba.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_potential.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_prod/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_prod/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_prod/discrete_jax_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_prod/discrete_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_prod/operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_sum/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_sum/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_sum/continuous.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_sum/discrete_jax_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_sum/discrete_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/_sum/operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/boson.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/fermion.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/permutation.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/operator/spin.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/linear_operator.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/preconditioner.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/common.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/default.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/qgt_jacobian.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/qgt_jacobian_common.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/qgt_jacobian_dense.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/qgt_jacobian_pytree.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/qgt_onthefly.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/qgt/qgt_onthefly_logic.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/solver/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/solver/solvers.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/optimizer/sr.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/autoreg.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/exact.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/metropolis.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/metropolis_numpy.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/parallel_tempering.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/continuous_gaussian.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/custom_numpy.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/exchange.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/fermion_2nd.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/fixed.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/global_flip_rule.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/hamiltonian.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/hamiltonian_numpy.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/langevin.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/local.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/local_numpy.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/multiple.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/sampler/rules/tensor.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/stats/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/stats/_autocorr.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/stats/mc_stats.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/stats/mc_stats_old.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/stats/mpi_stats.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/symmetry/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/symmetry/group/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/tools/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/tools/_common.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/tools/_cpu_info.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/tools/check_mpi.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/tools/djaxrun.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/tools/info.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/_dependencies_check.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/_serialization.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/_tips.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/api_utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/array.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/citations/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/citations/cli.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/citations/core.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/citations/docs.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/citations/internal_citations.bib +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/config_flags.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/deprecation.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/dispatch.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/display/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/display/repr.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/float.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/_group.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/_permutation_group.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/_point_group.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/_semigroup.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/axial.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/cubic.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/icosa.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/group/planar.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/history/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/history/accum.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/history/history.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/history/history_dict.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/holomorphic.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/iterators.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/jax.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/model_frameworks/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/model_frameworks/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/model_frameworks/equinox.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/model_frameworks/flax.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/model_frameworks/haiku.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/model_frameworks/jax.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/model_frameworks/nnx.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/model_frameworks/nnx_wrapped.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/moduletools.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/mpi/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/mpi/mpi.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/mpi/primitives.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/numbers.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/optional_deps.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/partial.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/seed.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/static_number.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/static_range.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/struct/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/struct/dataclass.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/struct/fields.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/struct/pytree.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/struct/pytree_serialization_sharding.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/struct/utils.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/summation.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/timing.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/types.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/utils/version_check.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/base.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/full_summ/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/full_summ/expect.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/full_summ/state.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/common.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/kernels.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_mixed_state/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_mixed_state/expect.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_mixed_state/expect_chunked.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_mixed_state/state.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_state/__init__.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_state/expect.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_state/expect_chunked.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_state/expect_forces.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_state/expect_forces_chunked.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_state/expect_grad.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_state/expect_grad_chunked.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/netket/vqs/mc/mc_state/state.py +0 -0
- {netket-3.20.3 → netket-3.20.4}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NetKet
|
|
3
|
-
Version: 3.20.
|
|
3
|
+
Version: 3.20.4
|
|
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/#
|
|
@@ -42,6 +42,8 @@ def apply_operator(operator, vstate, *, seed=None):
|
|
|
42
42
|
chunk_size = max(vstate.chunk_size // operator.max_conn_size, 1)
|
|
43
43
|
|
|
44
44
|
if isinstance(vstate, FullSumState):
|
|
45
|
+
del seed
|
|
46
|
+
|
|
45
47
|
transformed_vstate = FullSumState(
|
|
46
48
|
hilbert=vstate.hilbert,
|
|
47
49
|
apply_fun=transformed_apply_fun,
|
|
@@ -58,14 +60,18 @@ def apply_operator(operator, vstate, *, seed=None):
|
|
|
58
60
|
n_samples=vstate.n_samples,
|
|
59
61
|
n_discard_per_chain=vstate.n_discard_per_chain,
|
|
60
62
|
chunk_size=chunk_size,
|
|
63
|
+
sampler_seed=seed,
|
|
61
64
|
)
|
|
62
65
|
if isinstance(vstate.sampler_state, MetropolisSamplerState):
|
|
66
|
+
# fold in a random counter so that we don't have the same seed as sampler
|
|
67
|
+
# itself.
|
|
68
|
+
seed = jax.random.fold_in(PRNGKey(seed), 123)
|
|
69
|
+
|
|
63
70
|
x = vstate.sampler_state.σ
|
|
64
71
|
xp, mels = operator.get_conn_padded(x)
|
|
65
|
-
seed = PRNGKey(seed)
|
|
66
72
|
ids = jax.random.randint(seed, (x.shape[0],), 0, operator.max_conn_size)
|
|
67
73
|
new_x = xp[jnp.arange(x.shape[0]), ids, :]
|
|
68
|
-
transformed_vstate.sampler_state =
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
transformed_vstate.sampler_state = transformed_vstate.sampler_state.replace(
|
|
75
|
+
σ=new_x
|
|
76
|
+
)
|
|
71
77
|
return transformed_vstate
|
|
@@ -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.4'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 20, 4)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -394,6 +394,114 @@ class JaxOperatorNotConvertibleToNumba(NetketError):
|
|
|
394
394
|
)
|
|
395
395
|
|
|
396
396
|
|
|
397
|
+
class JaxOperatorGetConnInJitError(NetketError):
|
|
398
|
+
"""Illegal attempt to use :meth:`~netket.operator.DiscreteOperator.get_conn_flattened` or
|
|
399
|
+
similar methods inside of a Jax function transformation with a Jax operator.
|
|
400
|
+
|
|
401
|
+
This happens when calling :meth:`~netket.operator.DiscreteOperator.get_conn_flattened` or
|
|
402
|
+
:meth:`~netket.operator.DiscreteOperator.get_conn` inside of a function that is being
|
|
403
|
+
transformed by jax with transformations such as :func:`jax.jit`, :func:`jax.grad`,
|
|
404
|
+
:func:`jax.vmap`, or other jax function transformations.
|
|
405
|
+
|
|
406
|
+
These methods require materializing the output to a concrete numpy array, which is not
|
|
407
|
+
compatible with Jax's abstract tracing mechanism used in function transformations.
|
|
408
|
+
|
|
409
|
+
To avoid this error, use :meth:`~netket.operator.DiscreteOperator.get_conn_padded` instead,
|
|
410
|
+
which returns Jax arrays that are fully compatible with jax function transformations.
|
|
411
|
+
|
|
412
|
+
Example
|
|
413
|
+
-------
|
|
414
|
+
|
|
415
|
+
Instead of:
|
|
416
|
+
|
|
417
|
+
.. code-block:: python
|
|
418
|
+
|
|
419
|
+
import netket as nk
|
|
420
|
+
import jax
|
|
421
|
+
import jax.numpy as jnp
|
|
422
|
+
|
|
423
|
+
graph = nk.graph.Chain(10)
|
|
424
|
+
hilbert = nk.hilbert.Spin(1/2, graph.n_nodes)
|
|
425
|
+
ham = nk.operator.Ising(hilbert, graph, h=1.0)
|
|
426
|
+
ham_jax = ham.to_jax_operator()
|
|
427
|
+
|
|
428
|
+
ma = nk.models.RBM()
|
|
429
|
+
pars = ma.init(jax.random.PRNGKey(1), jnp.ones((2,graph.n_nodes)))
|
|
430
|
+
|
|
431
|
+
samples = hilbert.all_states()
|
|
432
|
+
|
|
433
|
+
@jax.jit
|
|
434
|
+
def compute_local_energies(pars, ham_jax, s):
|
|
435
|
+
# This will raise JaxOperatorGetConnInJitError
|
|
436
|
+
sp, mels = ham_jax.get_conn_flattened(s)
|
|
437
|
+
|
|
438
|
+
logpsi_sp = ma.apply(pars, sp)
|
|
439
|
+
logpsi_s = jnp.expand_dims(ma.apply(pars, s), -1)
|
|
440
|
+
|
|
441
|
+
return jnp.sum(mels * jnp.exp(logpsi_sp-logpsi_s), axis=-1)
|
|
442
|
+
|
|
443
|
+
elocs = compute_local_energies(pars, ham_jax, samples)
|
|
444
|
+
|
|
445
|
+
Use:
|
|
446
|
+
|
|
447
|
+
.. code-block:: python
|
|
448
|
+
|
|
449
|
+
import netket as nk
|
|
450
|
+
import jax
|
|
451
|
+
import jax.numpy as jnp
|
|
452
|
+
|
|
453
|
+
graph = nk.graph.Chain(10)
|
|
454
|
+
hilbert = nk.hilbert.Spin(1/2, graph.n_nodes)
|
|
455
|
+
ham = nk.operator.Ising(hilbert, graph, h=1.0)
|
|
456
|
+
ham_jax = ham.to_jax_operator()
|
|
457
|
+
|
|
458
|
+
ma = nk.models.RBM()
|
|
459
|
+
pars = ma.init(jax.random.PRNGKey(1), jnp.ones((2,graph.n_nodes)))
|
|
460
|
+
|
|
461
|
+
samples = hilbert.all_states()
|
|
462
|
+
|
|
463
|
+
@jax.jit
|
|
464
|
+
def compute_local_energies(pars, ham_jax, s):
|
|
465
|
+
# Use get_conn_padded instead - this works in jax.jit
|
|
466
|
+
sp, mels = ham_jax.get_conn_padded(s)
|
|
467
|
+
|
|
468
|
+
logpsi_sp = ma.apply(pars, sp)
|
|
469
|
+
logpsi_s = jnp.expand_dims(ma.apply(pars, s), -1)
|
|
470
|
+
|
|
471
|
+
return jnp.sum(mels * jnp.exp(logpsi_sp-logpsi_s), axis=-1)
|
|
472
|
+
|
|
473
|
+
elocs = compute_local_energies(pars, ham_jax, samples)
|
|
474
|
+
|
|
475
|
+
.. note::
|
|
476
|
+
|
|
477
|
+
:meth:`~netket.operator.DiscreteOperator.get_conn_padded` returns arrays with a fixed
|
|
478
|
+
padding dimension for the connected elements, which makes them compatible with jax
|
|
479
|
+
transformations. The padding is filled with zeros in the matrix elements array.
|
|
480
|
+
|
|
481
|
+
"""
|
|
482
|
+
|
|
483
|
+
def __init__(self, operator):
|
|
484
|
+
operator_type = type(operator)
|
|
485
|
+
super().__init__(
|
|
486
|
+
f"\n"
|
|
487
|
+
f"Attempted to use 'get_conn_flattened' or 'get_conn' method of a Jax operator ({operator_type}) "
|
|
488
|
+
f"inside a Jax function transformation (jax.jit, jax.grad, jax.vmap & others)."
|
|
489
|
+
f"\n\n"
|
|
490
|
+
f"These methods require materializing the output to concrete numpy arrays, which is "
|
|
491
|
+
f"not compatible with Jax's abstract tracing mechanism."
|
|
492
|
+
f"\n\n"
|
|
493
|
+
f"To fix this error, use 'get_conn_padded' instead, which returns Jax arrays that "
|
|
494
|
+
f"are fully compatible with jax transformations:"
|
|
495
|
+
f"\n\n"
|
|
496
|
+
f" # Instead of:"
|
|
497
|
+
f"\n xp, mels = operator.get_conn(x)"
|
|
498
|
+
f"\n xp, mels = operator.get_conn_flattened(x)"
|
|
499
|
+
f"\n\n"
|
|
500
|
+
f" # Use:"
|
|
501
|
+
f"\n xp, mels = operator.get_conn_padded(x)"
|
|
502
|
+
)
|
|
503
|
+
|
|
504
|
+
|
|
397
505
|
#################################################
|
|
398
506
|
# Jacobian and QGT errors #
|
|
399
507
|
#################################################
|
|
@@ -20,6 +20,7 @@ import jax
|
|
|
20
20
|
import jax.numpy as jnp
|
|
21
21
|
from jax.experimental.sparse import JAXSparse, BCOO, BCSR
|
|
22
22
|
|
|
23
|
+
from netket.errors import concrete_or_error, JaxOperatorGetConnInJitError
|
|
23
24
|
from netket.operator import AbstractOperator, DiscreteOperator
|
|
24
25
|
from netket.utils.optional_deps import import_optional_dependency
|
|
25
26
|
|
|
@@ -168,7 +169,13 @@ class DiscreteJaxOperator(DiscreteOperator):
|
|
|
168
169
|
|
|
169
170
|
"""
|
|
170
171
|
xp, mels = self.get_conn_padded(x)
|
|
171
|
-
|
|
172
|
+
|
|
173
|
+
xp = concrete_or_error(
|
|
174
|
+
np.asarray,
|
|
175
|
+
xp,
|
|
176
|
+
JaxOperatorGetConnInJitError,
|
|
177
|
+
self,
|
|
178
|
+
)
|
|
172
179
|
mels = np.array(mels)
|
|
173
180
|
|
|
174
181
|
if pad:
|
|
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.3 → netket-3.20.4}/netket/_src/operator/permutation/permutation_operator_base.py
RENAMED
|
File without changes
|
{netket-3.20.3 → netket-3.20.4}/netket/_src/operator/permutation/permutation_operator_construct.py
RENAMED
|
File without changes
|
{netket-3.20.3 → netket-3.20.4}/netket/_src/operator/permutation/permutation_operator_fermion.py
RENAMED
|
File without changes
|
{netket-3.20.3 → netket-3.20.4}/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
|
{netket-3.20.3 → netket-3.20.4}/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.3 → netket-3.20.4}/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
|
|
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
|