nkdslΒΆ
Symbolic operator subsystem for NetKet.
Typical workflow:
from nkdsl import SymbolicDiscreteJaxOperator
from nkdsl.dsl import site, hop
hopping_op = (
SymbolicDiscreteJaxOperator(hi, "hopping")
.for_each_pair("i", "j")
.where(site("i") > 0)
.emit(hop("i", "j"), matrix_element=1.0)
.build()
)
compiled = hopping_op.compile()
xp, mels = compiled.get_conn_padded(x_batch)
Functions
|
Returns an |
|
Lists emission clause names currently registered. |
|
Lists iterator clause names currently registered. |
|
Lists predicate clause names currently registered. |
|
Coerces user values into typed amplitude-expression nodes. |
|
Coerces user values into typed predicate-expression nodes. |
|
Module-level convenience function for one-shot symbolic compilation. |
|
Returns the module-level shared in-memory artifact store. |
|
Builds the default symbolic lowerer registry. |
|
Returns the module-level shared operator-lowering target registry. |
|
Builds the default two-stage symbolic compiler pass pipeline. |
|
Returns a symbolic selector bound to the emitted/connected state x'. |
|
Returns an |
|
Returns the identity (no-op) |
|
Returns an |
|
Registers either an iterator clause, predicate clause or an emission clause class. |
|
Registers one emission clause class. |
|
Registers one iterator clause class. |
|
Registers one predicate clause class. |
|
Returns an |
|
Returns an |
|
Returns an Update performing a Hilbert-aware wrapped modular shift. |
|
Returns a symbolic site selector. |
|
Returns a static source-configuration read |
|
Returns an |
|
Returns a free symbolic amplitude expression by name. |
|
Returns a static emitted/target-configuration read |
|
Returns an |
Classes
|
Abstract base class for custom fluent emission clauses. |
|
Abstract base class for custom fluent iterator clauses. |
|
Abstract base class for custom fluent predicate clauses. |
|
Abstract base class for all symbolic (DSL-defined) operators. |
|
Typed expression node for operator matrix elements. |
|
An executable operator produced by lowering a |
|
One normalized emission-clause action. |
|
One output branch (connected state + matrix element) of a term. |
Utility context passed to DSL callables at build time. |
|
|
Static K-body iterator over a pre-computed list of site-index tuples. |
|
Typed boolean expression node for operator branch filtering. |
|
Symbolic selector for one Hilbert-space site iterator. |
|
Immutable cache key for compiled symbolic operator artifacts. |
|
Holds per-compilation mutable state across pipeline stages. |
|
Deterministic compilation signature for cache-key generation. |
|
Compilation artifact produced by the symbolic compiler pipeline. |
|
Orchestrates the symbolic operator compilation pipeline. |
|
Static and runtime controls for symbolic compiler execution. |
|
Fluent builder for declarative symbolic quantum operators. |
|
One primitive declarative symbolic operator term. |
|
A symbolic operator built via the |
|
Immutable symbolic operator IR container. |
|
Registry for selectable compiled-operator targets. |
|
Describes one compiled-operator target selectable during lowering. |
|
Additive composition of multiple symbolic operators sharing one Hilbert space. |
|
Immutable, chainable site-update program builder. |
|
One primitive site-update operation. |
|
Ordered immutable sequence of site-update operations. |
Exceptions
|
Base exception for all nkdsl-specific errors. |
|
Base exception for symbolic compilation failures. |
|
Raised when symbolic compilation fails at any pipeline stage. |
|
Raised when diagnostics are configured to fail the compilation flow. |
|
Base exception for symbolic-DSL and symbolic-compiler errors. |
|
Base exception for symbolic operator construction and execution errors. |
|
Raised when a symbolic operator is executed before compilation. |