nkdsl.CompiledOperator

class CompiledOperator(hilbert, *, name, fn, is_hermitian, dtype, max_conn_size)[source]

An executable operator produced by lowering a SymbolicOperator.

CompiledOperator is the concrete result of symbolic_op.compile() or SymbolicDiscreteJaxOperator(...).compile(). Its get_conn_padded kernel is a pure JAX function that can be JIT-compiled, vmapped, and differentiated.

The class name is fixed and stable, it does not encode the operator name or structure. The readable operator name is available via the name property.

Parameters:
  • hilbert (Any)

  • name (str)

  • fn (Callable)

  • is_hermitian (bool)

  • dtype (Any)

  • max_conn_size (int)

name

Operator name (from the DSL definition).

is_hermitian

Whether this operator is declared Hermitian.

dtype

Matrix-element NumPy dtype.

__init__(hilbert, *, name, fn, is_hermitian, dtype, max_conn_size)
Parameters:
Return type:

None

Methods

__init__(hilbert, *, name, fn, is_hermitian, ...)

get_conn_padded(x)

tree_flatten()

tree_unflatten(aux_data, leaves)

Attributes

dtype

is_hermitian

max_conn_size

name

Returns the readable operator name.