neuralqx.operators.computational.Euclidean4d.numba.gauss module

class GaussConstraintOperator(H, gauge_dim=None, modded=False)

Bases: ComputationalOperator

Diagonal Gauß constraint operator enforcing charge-vector conservation at each vertex.

For a gauge of dimension gauge_dim (e.g. U(1)^g), let each edge e carry a charge vector \(\vec m_e \in \mathbb{Z}^{g}\). For each vertex \(v\), define the Gauss vector \(\vec G_v(\sigma) = \sum_{e\to v}\vec m_e - \sum_{e\leftarrow v}\vec m_e\), i.e. incoming minus outgoing charge vectors.

The constraint value on a configuration \(\sigma\) is the sum of squared norms (L2) of all Gauss vectors: .. math:

\mathcal{G}(\sigma) = \sum_{v} \|\vec G_v(\sigma)\|_2^2
= \sum_v \sum_{a=1}^{g} \bigl(G_v^{(a)}(\sigma)\bigr)^2.

The operator is diagonal in the charge basis and returns exactly one connection: the state itself with matrix element \(\mathcal{G}(\sigma)\).

property is_hermitian: bool

This function must return either True or False based on whether your operator is Hermitian or not. Note that unlike for the case of LocalOperator types, you must specify by-hand whether this operator is Hermitian or not, there is no implementation to deduce that information for you as there is no matrices stored in this operator type.

This property plays a role in determining the computational path to be taken when computing gradients. If you specify that the operator is Hermitian while in reality it is not, the computed gradients will be incorrect.

Returns:

True if this operator is Hermitian, False otherwise

property dtype

Specify a JAX NumPy or NumPy dtype for this operator (that is, what is the dtype of the matrix elements returned by this operator)