nkdsl.SymbolicOperatorIR

class SymbolicOperatorIR(operator_name, mode, hilbert_size, dtype_str, is_hermitian, terms=<factory>, metadata=<factory>)[source]

Immutable symbolic operator IR container.

Parameters:
operator_name

Name of the operator this IR represents.

Type:

str

mode

IR mode (symbolic for DSL-built operators, jax_kernel for direct JAX-kernel operators).

Type:

str

hilbert_size

Size of the Hilbert space (number of sites).

Type:

int

dtype_str

String representation of the matrix-element dtype.

Type:

str

is_hermitian

Whether the source operator is declared Hermitian.

Type:

bool

terms

Declarative term tuple for symbolic mode.

Type:

tuple

metadata

Optional stable metadata tuple.

Type:

tuple

__init__(operator_name, mode, hilbert_size, dtype_str, is_hermitian, terms=<factory>, metadata=<factory>)
Parameters:
Return type:

None

Methods

__init__(operator_name, mode, hilbert_size, ...)

as_dict()

Returns a JSON-serializable dictionary representation.

from_terms(*, operator_name, hilbert_size, ...)

Builds declarative symbolic-mode operator IR.

metadata_dict()

Returns metadata in dictionary form.

static_fingerprint()

Returns a deterministic SHA-256 digest over the static IR payload.

Attributes

free_symbols

Returns the union of free symbol names across all terms.

term_count

Returns number of declarative terms.

operator_name

mode

hilbert_size

dtype_str

is_hermitian

terms

metadata