nkdsl.compiler.lowering.jax_lowerer¶
JAX backend symbolic operator lowerer.
Converts a SymbolicOperatorIR
into a concrete compiled operator instance whose connectivity
kernel is built by interpreting the
AmplitudeExpr /
PredicateExpr /
UpdateProgram expression trees
as JAX operations at trace time.
Architecture¶
For each IR term the lowerer generates a term runner: a Python function that,
given a single input configuration x (shape [hilbert_size]), returns a
tuple (x_primes, mels, valids) of shape
(max_conn_size, hilbert_size), (max_conn_size,), (max_conn_size,) respectively.
K-body terms use a static index_array (shape [M, K]) and jax.vmap
over its rows. Each row instantiates the iterator-label environment and
evaluates all emissions, producing E branches per row (total M * E).
Branch-multiset note¶
By default, duplicate connected states are coalesced by summing matrix
elements and dropping zero-amplitude entries (including invalidated branches).
This behavior is controlled by
SymbolicCompilerOptions.deduplicate_connected_components.
Functions
|
Applies one update operation to a single configuration vector. |
|
Applies one update program to a single configuration vector. |
|
Builds one compiled operator instance from prepared term runners. |
|
Builds a registry with the default NetKet discrete JAX target. |
|
Creates a compiled operator instance for the requested operator target. |
|
Structured debug event with scope and optional pass filtering. |
|
Evaluates one amplitude expression against an environment mapping. |
|
Evaluates one predicate expression against an environment mapping. |
|
Infers wrapped shift/mod metadata from one Hilbert space. |
|
Builds one executable runner for a single K-body IR term. |
|
Parses a symbol-expression payload into name + declaration map. |
Classes
|
Abstract base for backend-specific symbolic operator lowerers. |
|
Typed expression node for operator matrix elements. |
|
Special type indicating an unconstrained type. |
|
JAX-backend symbolic operator lowerer. |
|
Static K-body iterator over a pre-computed list of site-index tuples. |
|
Typed boolean expression node for operator branch filtering. |
|
Holds per-compilation mutable state across pipeline stages. |
|
Compilation artifact produced by the symbolic compiler pipeline. |
|
One primitive declarative symbolic operator term. |
|
Registry for selectable compiled-operator targets. |
|
One primitive site-update operation. |
|
Ordered immutable sequence of site-update operations. |