neuralqx.experimental.operators.symbolic.core.operator module¶
Unified symbolic operator type produced by the Operator DSL builder.
- class SymbolicOperator(hilbert, name, ir_terms, *, dtype_str='complex64', is_hermitian=False, metadata=None)¶
Bases:
AbstractSymbolicOperatorA symbolic operator built via the
DOperatorDSL.SymbolicOperatoris the canonical result ofDOperator(...).build(). It holds an ordered list of typed IR terms and provides a.compile()method to lower them to an executableCompiledOperator.Instances are not directly executable: calling
get_conn_paddedbefore compilation raisesSymbolicOperatorExecutionError.- name¶
User-facing operator name.
- hilbert¶
The NetKet Hilbert space.
- dtype¶
Matrix-element dtype.
- is_hermitian¶
Whether this operator is declared Hermitian.
Example:
op = ( DOperator(hi, "hopping") .for_each_pair("i", "j") .where(site("i") > 0) .emit(shift("i", -1).shift("j", +1), amplitude=1.0) .build() ) compiled = op.compile() xp, mels = compiled.get_conn_padded(x_batch)