neuralqx.operators.computational.Euclidean4d.numba package

class AreaOperator(H, edges, *, squared=False)

Bases: ComputationalOperator

Returns the area operator for a surface through which edges pass through. The specified surface should be a list of edges of the graph which are assumed to pucnture through the desired surface.

The area for a given graph is given by

\[\hat{A}(S) |\vec{m}\rangle = \sum_{e \cap S\neq\varnothing} \sqrt{ \big(m_e^{(1)}\big)^2 + \big(m_e^{(2)}\big)^2 + \big(m_e^{(3)}\big)^2 } |\vec{m}\rangle\]

i.e. for each edge intersecting (S) take its three U(1) charges, square them, sum, and take the square root. (In the generic normalization one would multiply by 8πℓₚ² here that prefactor is set to 1 by convention, see Notes.)

Orientation of an edge does not affect the result since the operator uses the charge norm. If an edge punctures the surface multiple times, it should be included with several times.

For non-planar graphs, these edges should be supplied in accordance to the edges appearing from the neuralqx.graph.Graph.edges (that is, not in the non-planar representation).

Notes: here it is assumed the following
  • unit Planck length

  • Immirzi parameter of value 1.0

  • Hence the 8πℓₚ² factor is absorbed into units

class AreaDifferenceSquaredOperator(H, edges)

Bases: ComputationalOperator

Diagonal 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_index and 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

class AreaDifferenceSquaredSurfacesOperator(H, surfaces)

Bases: ComputationalOperator

Diagonal 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.

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)\).

class VolumeOperator(H, vertex)

Bases: ComputationalOperator

Returns the (diagonal) volume operator at a single vertex v in the U(1)^3 model.

The operator acts on the charge basis \(|\vec{m}\rangle\) by summing, over all oriented edge triplets that meet at v, the signed scalar triple products of the corresponding 3-component U(1) charge vectors, and then taking the absolute value and square root:

\[\hat{V}_v \,|\vec{m}\rangle \;=\; \sqrt{\left| \sum_{(e_1,e_2,e_3)\ni v} \epsilon_v(e_1,e_2,e_3)\; \vec m_{e_1}\!\cdot\!\big(\vec m_{e_2}\times \vec m_{e_3}\big) \right|}\;|\vec{m}\rangle,\]

where each edge charge vector is

\[\vec m_{e} = \big( m_e^{(1)}, \, m_e^{(2)} , \, m_e^{(3)} \big),\]

and \(\epsilon_v(e_1, e_2, e_3) \in \{+1,-1\}\) is the orientation sign of the ordered triple at the vertex (right-hand rule with the graph’s local orientation). The operator is Hermitian and non-negative, and it is diagonal in the charge basis.

Implementation details

  • The set of contributing triplets at v is taken from graph.connectivities[str(v)]['edges'], their orientation signs are taken from graph.signs[str(v)].

  • Each triplet contributes \(\epsilon_v(e_1,e_2,e_3)\;\vec m_{e_1}\!\cdot\!(\vec m_{e_2}\times\vec m_{e_3})\). All contributions are summed before applying \(\sqrt{|\cdot|}\).

  • Edge orientations enter only through \(\epsilon_v(\cdot)\), the charge vectors themselves are used as-is.

Notes

  • Units: overall normalization/constant is 1 by convention

  • For non-planar embeddings, the triplets should be provided in the same ordering/convention as returned by the graph’s connectivities (not by any planarized drawing).

ThiemannRegularisedVertexConstraint(lqx, vertex, *, apply_lapse=True, adjoint=False)
ThiemannRegularisedVertexConstraintFast(lqx, vertex, *, apply_lapse=True, adjoint=False)

Submodules