nkdsl.dsl.selectorsΒΆ

Symbolic selector helpers for the declarative symbolic operator DSL.

Selectors are lightweight immutable facades used at build time to construct IR symbol references pointing to site quantum numbers, site indices, and free named parameters.

Functions

emitted(label)

Returns a symbolic selector bound to the emitted/connected state x'.

site(label)

Returns a symbolic site selector.

source_index(flat_index)

Returns a static source-configuration read x[flat_index].

symbol(name, *[, default, doc, dtype])

Returns a free symbolic amplitude expression by name.

target_index(flat_index)

Returns a static emitted/target-configuration read x'[flat_index].

Classes

AmplitudeExpr(op[, args])

Typed expression node for operator matrix elements.

Any(*args, **kwargs)

Special type indicating an unconstrained type.

SiteSelector(label[, namespace])

Symbolic selector for one Hilbert-space site iterator.