neuralqx.experimental.operators.symbolic.compiler.core package

Symbolic compiler core data structures.

class SymbolicCompiledArtifact(operator_name, backend, lowerer_name, compiled_operator, cache_key=None, pass_reports=<factory>, metadata=<factory>)

Bases: object

Compilation artifact produced by the symbolic compiler pipeline.

operator_name

Source operator name.

backend

Selected backend name.

lowerer_name

Lowerer identifier used for code generation.

compiled_operator

Executable compiled operator object.

cache_key

Optional compilation cache key.

pass_reports

Ordered tuple of pass-execution reports.

metadata

Optional artifact metadata.

class SymbolicCompilationContext(*, operator, ir, options, metadata=None)

Bases: object

Holds per-compilation mutable state across pipeline stages.

The context is created by the compiler, mutated in-place by passes and lowerers, and finally read when packaging the compiled artifact.

Parameters:
class SymbolicCompilerOptions(backend_preference='auto', enable_fusion=True, strict_validation=True, cache_enabled=True, cache_namespace='nqx_symbolic_v1', debug_flags=<factory>)

Bases: object

Static and runtime controls for symbolic compiler execution.

backend_preference

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

enable_fusion

Whether fusion-planning passes are enabled.

strict_validation

Whether validation passes fail hard on errors.

cache_enabled

Whether compiled artifacts are cached in-process.

cache_namespace

Namespace string used in cache-key generation.

debug_flags

Optional debug / instrumentation flags.

class SymbolicPassReport(pass_name, duration_ms, metadata=<factory>)

Bases: object

Execution report for one symbolic compiler pass.

pass_name

Stable pass identifier.

duration_ms

Wall-clock duration in milliseconds.

metadata

Optional pass metadata (frozen key-value tuple).

class SymbolicPassPipeline(*, pre_cache_passes, post_cache_passes)

Bases: object

Staged symbolic compiler-pass pipeline.

The pipeline is split into two explicit stages:

  • pre-cache passes: run before the artifact-cache lookup, light-weight validation, backend selection, and normalization.

  • post-cache passes: run only on cache misses, heavier analysis and fusion planning.

Parameters:
class SymbolicCacheKey(token, namespace)

Bases: object

Immutable cache key for compiled symbolic operator artifacts.

class SymbolicCompilationSignature(operator_ir_fingerprint, backend_target, hilbert_size, dtype_str, options_signature=<factory>)

Bases: object

Deterministic compilation signature for cache-key generation.

operator_ir_fingerprint

Stable digest of the operator IR.

backend_target

Resolved backend name.

hilbert_size

Hilbert space size.

dtype_str

Matrix-element dtype string.

options_signature

Static compiler-options signature.

Submodules