netket.models.ARNNSequential#

class netket.models.ARNNSequential[source]#

Bases: AbstractARNN

Implementation of an ARNN that sequentially calls its layers, and optionally an activation function.

A subclass must assign a list of ARNN layers to self._layers in setup. If it has a callable attribute activation, it will be called before every layer except the first.

Note

If you want to use real parameters and output a complex wave function, such as in Hibat-Allah et. {it al}, you can implement conditionals_log_psi differently, compute the modulus and the phase using the output of the last RNN layer, and combine them into the wave function.

During the sampling, conditionals_log_psi is called and only the modulus is needed, so the computation of the phase becomes an overhead. To avoid this overhead, you can override conditional and only compute the modulus there.

Attributes
hilbert: HomogeneousHilbert#

the Hilbert space. Only homogeneous unconstrained Hilbert spaces are supported.

Methods
__call__(inputs)#

Computes the log wave-functions for input configurations.

Parameters:

inputs (Union[ndarray, Array]) – configurations with dimensions (batch, Hilbert.size).

Return type:

Union[ndarray, Array]

Returns:

The log psi with dimension (batch,).

conditionals_log_psi(inputs)[source]#

Computes the log of the conditional wave-functions for each site to take each value.

Parameters:

inputs (Union[ndarray, Array]) – configurations with dimensions (batch, Hilbert.size).

Return type:

Union[ndarray, Array]

Returns:

The log psi with dimensions (batch, Hilbert.size, Hilbert.local_size).

reshape_inputs(inputs)[source]#

Reshapes the inputs from (batch_size, hilbert_size) to (batch_size, spatial_dims…) before sending them to the ARNN layers.

Return type:

Union[ndarray, Array]

Parameters: