nkdsl.compiler.diagnostics.state_samplingΒΆ

Hilbert-space sampling and validity helpers for diagnostics.

Functions

build_hilbert_support_lookup(hilbert, *, ...)

Builds exact Hilbert support lookup for membership checks.

evaluate_constraint_accepts_state(hilbert, state)

Evaluates one Hilbert constraint predicate for a candidate state.

illegal_local_state_positions(state, ...)

Finds indices with values outside the Hilbert local-state basis.

sample_source_states(hilbert, *, max_samples)

Samples source states used by dynamic connectivity diagnostics.

state_to_tuple(state)

Converts one state vector to a hashable tuple.

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.