nkdsl.compiler.diagnostics.rules.symbol_rulesΒΆ

Symbol and index-bound diagnostics rules.

Functions

iter_term_amplitude_nodes(term)

Yields all amplitude nodes reachable from one symbolic IR term.

iter_term_static_index_nodes(term)

Yields all static-index uses in one term.

parse_symbol_declaration_args(args)

Parses a symbol-expression payload into name + declaration map.

Classes

AbstractDiagnosticRule()

Abstract base class for one diagnostics rule.

AmplitudeExpr(op[, args])

Typed expression node for operator matrix elements.

DSLDiagnostic(code, severity, message, ...)

One DSL lint/diagnostic finding produced by compiler diagnostics.

DiagnosticRuleContext(operator, ir, options)

Immutable context passed to diagnostics rules.

PotentialZeroDivisionRule()

Reports direct divisions by runtime state values that may be zero.

StaticIndexBoundsRule()

Reports static source/target index reads outside Hilbert bounds.

UnresolvedFreeSymbolsRule()

Reports unresolved free symbols present in the operator IR.