neuralqx.experimental.operators.symbolic.core.base module

Abstract base class for all symbolic operator implementations.

class AbstractSymbolicOperator(hilbert, *, name, dtype_str='complex64', is_hermitian=False, metadata=None)

Bases: ComputationalJaxOperator

Abstract base class for all symbolic (DSL-defined) operators.

Symbolic operators extend ComputationalJaxOperator and declare their action through a typed IR rather than a hand-written JAX kernel. They cannot execute until the compiler has lowered them to a concrete JAX kernel via neuralqx.experimental.operators.symbolic.compiler.SymbolicCompiler.compile().

Attempting to call _get_conn_padded() before compilation raises SymbolicOperatorExecutionError.

Parameters:
  • hilbert (DiscreteHilbert) – Discrete Hilbert space this operator is defined on.

  • name (str) – User-facing operator name.

  • dtype_str (str) – String label for the matrix-element dtype.

  • is_hermitian (bool) – Whether this operator is declared Hermitian.

  • metadata (dict[str, Any] | None) – Optional extra metadata dictionary.