netket.nn#

This sub-module extends flax.linen with layers and tools that are useful to applications in quantum physics. Read more about the design goal of this module in their README

Linear Modules#

DenseSymm

Implements a projection onto a symmetry group.

DenseEquivariant

A group convolution operation that is equivariant over a symmetry group.

MaskedDense1D

1D linear transformation module with mask for autoregressive NN.

MaskedConv1D

1D convolution module with mask for autoregressive NN.

MaskedConv2D

2D convolution module with mask for autoregressive NN.

FastMaskedDense1D

1D linear transformation module with mask for fast autoregressive NN.

FastMaskedConv1D

1D convolution module with mask for fast autoregressive NN.

FastMaskedConv2D

2D convolution module with mask for fast autoregressive NN.

Activation functions#

reim(f)

Modifies a non-linearity to act separately on the real and imaginary parts

reim_relu(x)

reim_selu(x)

log_cosh(x)

log_sinh(x)

log_tanh(x)

Miscellaneous Functions#

binary_encoding(hilbert, x, *[, max_bits])

Encodes the array x into a set of binary-encoded variables described by the shape of a Hilbert space.

Utility functions#

to_array(hilbert, apply_fun, variables[, ...])

Computes apply_fun(variables, states) on all states of hilbert and returns

to_matrix(hilbert, machine, params[, normalize])

Blocks#

blocks.MLP

A Multi-Layer Perceptron with hidden layers.