neuralqx.operators.computational.Euclidean4d.numba.area_difference module¶
- class AreaDifferenceSquaredOperator(H, edges)¶
Bases:
ComputationalOperatorDiagonal operator implementing the squared area difference between two edges in the U(1)^3 model:
\[(\hat A_{e_1} - \hat A_{e_2})^2 \;=\; \hat A_{e_1}^2 + \hat A_{e_2}^2 - 2\,\hat A_{e_1}\hat A_{e_2},\]where for a single edge (e), (hat A_e = |vec m_e|_2 = sqrt{(m_e^{(1)})^2 + (m_e^{(2)})^2 + (m_e^{(3)})^2}).
Since this operator is diagonal in the (|vec mrangle) basis, its matrix element on a configuration (sigma) is simply
\[\big(\|\vec m_{e_1}\|_2 - \|\vec m_{e_2}\|_2\big)^2 \;=\; \|\vec m_{e_1}\|_2^2 + \|\vec m_{e_2}\|_2^2 \;-\; 2\,\|\vec m_{e_1}\|_2\,\|\vec m_{e_2}\|_2.\]The operator precomputes the three component indices for each of the two edges using the graph’s
edge_to_indexand static gauge offsets. This avoids any Python-side control-flow inside jitted code and prevents recompilation.Notes
Assumes U(1)^3 (
gauge_dim == 3) and unit overall normalization (8πℓₚ² absorbed)If both edges are the same, the operator correctly yields zero everywhere
- property is_hermitian: bool¶
This function must return either
TrueorFalsebased on whether your operator is Hermitian or not. Note that unlike for the case ofLocalOperatortypes, 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:
Trueif this operator is Hermitian,Falseotherwise
- 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)
- class AreaDifferenceSquaredSurfacesOperator(H, surfaces)¶
Bases:
ComputationalOperatorDiagonal operator implementing the squared area difference between two surfaces (each a list of edges) in the U(1)^3 model:
\[(\hat A(S_1) - \hat A(S_2))^2 \;=\; \hat A(S_1)^2 + \hat A(S_2)^2 - 2\,\hat A(S_1)\hat A(S_2),\]where for a surface (S = {e_i}),
\[\hat A(S) = \sum_{e_i \in S} \sqrt{ (m_{e_i}^{(1)})^2 + (m_{e_i}^{(2)})^2 + (m_{e_i}^{(3)})^2 }.\]This operator is diagonal in the (|vec mrangle) basis, and so its matrix element on a configuration (sigma) is simply
\[\big(\hat A(S_1) - \hat A(S_2)\big)^2.\]Notes
Assumes U(1)^3 (
gauge_dim == 3) and unit normalization (8πℓₚ² absorbed).If both surfaces are identical, the operator yields zero everywhere.
- property is_hermitian: bool¶
This function must return either
TrueorFalsebased on whether your operator is Hermitian or not. Note that unlike for the case ofLocalOperatortypes, 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:
Trueif this operator is Hermitian,Falseotherwise
- 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)