nkdsl.SymbolicCompilerOptions

class SymbolicCompilerOptions(backend_preference='auto', deduplicate_connected_components=True, enable_fusion=True, strict_validation=True, cache_enabled=True, cache_namespace='nqx_symbolic_v1', operator_lowering='netket_discrete_jax', diagnostics_enabled=True, diagnostics_min_severity='warning', fail_on_warnings=False, max_diagnostics=200, lint_state_sample_size=32, lint_branch_sample_cap=4096, lint_max_exact_hilbert_states=8192, debug_flags=<factory>)[source]

Static and runtime controls for symbolic compiler execution.

Parameters:
  • backend_preference (str)

  • deduplicate_connected_components (bool)

  • enable_fusion (bool)

  • strict_validation (bool)

  • cache_enabled (bool)

  • cache_namespace (str)

  • operator_lowering (str)

  • diagnostics_enabled (bool)

  • diagnostics_min_severity (str)

  • fail_on_warnings (bool)

  • max_diagnostics (int)

  • lint_state_sample_size (int)

  • lint_branch_sample_cap (int)

  • lint_max_exact_hilbert_states (int)

  • debug_flags (tuple)

backend_preference

Preferred lowering backend (currently only jax is supported, auto resolves to jax).

Type:

str

deduplicate_connected_components

Whether lowered connectivity kernels should merge duplicate connected states and drop zero matrix elements.

Type:

bool

enable_fusion

Whether fusion-planning passes are enabled.

Type:

bool

strict_validation

Whether validation passes fail hard on errors.

Type:

bool

cache_enabled

Whether compiled artifacts are cached in-process.

Type:

bool

cache_namespace

Namespace string used in cache-key generation.

Type:

str

operator_lowering

Registry key selecting the compiled-operator target.

Type:

str

diagnostics_enabled

Whether DSL diagnostics pass is enabled.

Type:

bool

diagnostics_min_severity

Minimum severity shown/enforced by diagnostics ("info", "warning", "error").

Type:

str

fail_on_warnings

Whether warnings should fail compilation.

Type:

bool

max_diagnostics

Maximum number of diagnostics retained per compile.

Type:

int

lint_state_sample_size

Number of source states sampled by dynamic connectivity diagnostics.

Type:

int

lint_branch_sample_cap

Maximum sampled branch evaluations for dynamic connectivity diagnostics.

Type:

int

lint_max_exact_hilbert_states

Maximum Hilbert cardinality for exact support-membership checks during diagnostics.

Type:

int

debug_flags

Optional debug / instrumentation flags.

Type:

tuple

__init__(backend_preference='auto', deduplicate_connected_components=True, enable_fusion=True, strict_validation=True, cache_enabled=True, cache_namespace='nqx_symbolic_v1', operator_lowering='netket_discrete_jax', diagnostics_enabled=True, diagnostics_min_severity='warning', fail_on_warnings=False, max_diagnostics=200, lint_state_sample_size=32, lint_branch_sample_cap=4096, lint_max_exact_hilbert_states=8192, debug_flags=<factory>)
Parameters:
  • backend_preference (str)

  • deduplicate_connected_components (bool)

  • enable_fusion (bool)

  • strict_validation (bool)

  • cache_enabled (bool)

  • cache_namespace (str)

  • operator_lowering (str)

  • diagnostics_enabled (bool)

  • diagnostics_min_severity (str)

  • fail_on_warnings (bool)

  • max_diagnostics (int)

  • lint_state_sample_size (int)

  • lint_branch_sample_cap (int)

  • lint_max_exact_hilbert_states (int)

  • debug_flags (tuple)

Return type:

None

Methods

__init__([backend_preference, ...])

debug_flag_map()

Returns debug flags as a mutable dictionary.

from_mapping(*[, backend_preference, ...])

Builds options from user-friendly keyword arguments.

static_signature()

Returns a deterministic static signature for cache-key generation.

Attributes