utils#
Data#
The structure used to keep track of the data updates |
Array#
Whether the input array is sharded. |
|
Transform the array to be sharded across all devices in the first dimension. |
|
Transform the array to be replicated across all devices. |
|
In multi-host jobs, use |
|
In multi-host jobs, use |
|
In multi-host jobs, use |
|
In multi-host jobs, use |
|
Extend the array. |
|
Equivalent to |
Pytree#
Return the array given by |
|
Transform the arrays in pytree to be replicated on all devices. |
|
The same as |
|
Split a pytree potentially with complex values to two real pytrees, one for the real part and the other for the imaginary part. |
|
Combine two real pytrees to a complex one. |
|
Similar to equinox.apply_updates, but the original data type of the model is kept unchanged. |
Manipulating functions#
f -> chunk_map(shard_map(vmap(f)), use_scan=True) |
|
Convert a vmapped function to a function with chunked batches and parallel computation on all available machines. |
|
f -> shard_map(f), sharded along the first dimension |
Customized arrays for large numbers#
Log-amplitude representation of JAX arrays: value = sign * exp(logabs) where |
|
Array representation with a scale: value = significand * exp(exponent), where exponent is a normalization factor. |
Basis states#
Converts QuSpin basis integers to int8 state array. |
|
Converts state array to QuSpin basis integers. |
|
Return a single neel state with alternating spins. |
|
Return a single stripe state. |
|
Spin structure factor \(\left< \frac{1}{2 \sqrt{N}} S^z_r S^z_0 e^{-iqr} \right>\) |
|
Random basis states. |