neuralqx.lqx.wcl.core.wcl_3d module

commutator(a, b)

A function that returns the commutator [A, B] = AB - BA

shift_loop(loop, k, per_copy_nodes)

Helper function to shift a minimal loop from level 0 to k, while keeping data.

class LqxWCL3D(hilbert, graph, gauge_group, *, computational=True, spacetime_dimensions=3, model_name='(2+1)-Euclidean LQG', is_4d=False)

Bases: LqxWCL1D

minimal_loop_holonomy(minimal_loop, vertex_index=None, adjoint=0, *, computational=None, jax=True, dimension=3)

Returns the 3-D minimal loop holonomy. Here, the minimal loop holonomy over the entire tensor product space is h_T = h_1 ⊗ I_2 ⊗ I_3 ⊗ … ⊗ I_N + I_1 ⊗ h_2 ⊗ I_3 ⊗ … I_N + I_1 ⊗ I_2 ⊗ … ⊗ h_N

Parameters:
  • minimal_loop (list) – the minimal loop currently being requested to compute the minimal loop holonomy for

  • adjoint (int) – a flag to determine whether the adjoint operator is requested

  • vertex_index (int) – this is a dummy parameter in this model

  • computational (Optional[bool]) – if True, the operator is implemented as a computational operator

  • jax (Optional[bool]) – if True, and a computational operator implementation is requested, the operator is returned as a JAX computational operator

  • dimension (Optional[int]) – This controls the dimension on which the minimal loop holonomy is implemented in (e.g. call dimensions = 1 in a 3-d model to get the U(1) operator).

Returns:

the N-D minimal loop holonomy

holonomy(edge, adjoint=False, *, computational=None, jax=None, dimension=3)

Returns the holonomy operator acting on an edge by acting on each gauge dimension individually

\[\hat{h}_{e} = \sum_{i}^{gauge_dims} \hat{h}_{e_{i}}\]
Parameters:
  • edge (Union[list, tuple]) – the edge the minimal loop holonomy operator should act on. This should be one specified from the

  • adjoint (bool) – if True, the operator acts as a lowering operator, otherwise a raising operator on the U(1) DOFs

  • computational (Optional[bool]) – if True, the operator is implemented as a computational operator

  • jax (Optional[bool]) – if True, and a computational operator implementation is requested, the operator is returned as a JAX computational operator

  • adjoint – if True, the operator acts as a lowering operator, otherwise a raising operator on the U(1) DOFs. Note that this is a dummy parameter in this model.

  • dimension (Optional[int]) – This controls the dimension on which the holonomy operator is implemented in (e.g. call dimensions = 1 in a 3-d model to get the U(1) operator)

Returns:

volume(vertex, *, computational=None, jax=None)

Returns the 3-d spatial volume operator without any Taylor expansion

Parameters:
  • vertex (int) – the vertex the operator acts on

  • computational (Optional[bool]) – (non-functional)

  • jax (Optional[bool]) – (non-functional)

Returns:

squared_volume(vertex, *, computational=None, jax=None)

Returns the squared 3-d spatial volume operator without any Taylor expansion

Parameters:
  • vertex (int) – the vertex the operator acts on

  • computational (Optional[bool]) – (non-functional)

  • jax (Optional[bool]) – (non-functional)

Returns:

sqrt_volume(vertex, *, computational=None, jax=None)

Returns the squared 3-d spatial volume operator without any Taylor expansion

Parameters:
  • vertex (int) – the vertex the operator acts on

  • computational (Optional[bool]) – (non-functional)

  • jax (Optional[bool]) – (non-functional)

Returns:

taylor_expanded_volume(order, a, vertex, square_root)

A function the return the Taylor expansion of \(f(x) = \sqrt{x}\) or \(f(x) = \sqrt{\sqrt{x}}\) where x = volume operator around a point a and up to given order

Essentially, x is \(V^{2}\) where \(V\) is the (2+1)-d volume operator. Therefore, sqrtVol = False then returns an approximation of the volume up to the given order, and sqrtVol = True returns an approximation of \(\sqrt{V}\) up to the given order

Parameters:
  • order (int) – the order of the expansion

  • a (float) – the point to expand around

  • vertex (int) – the vertex the volume operator acts on

  • square_root (bool) – a flag to see if we request the volume or its square root

thiemann_regularized_constraint(vertex, *, jax=False, fast=True, adjoint=False, apply_lapse=False)

A function that creates the Thiemann regularized constraint. This will return the TRC on the specified vertex.

Parameters:
  • vertex (str) – the vertex on which the constraint acts on

  • adjoint (Optional[bool]) – a flag to determine if the adjoint operator is requested

  • jax (Optional[bool]) – a flag to determine whether the returned ComputationalOperator should be of ComputationalOperator or ComputationalJaxOperator type

  • fast (Optional[bool]) – if True, a faster Numba based ComputationalOperator implementation is returned

  • apply_lapse (Optional[bool]) – if True, the operator will use the lapse saved in self.lapses

Return type:

List

Returns:

the Thiemann regularized constraint

thiemann_quadratic_constraint(*, computational=None, jax=True, **kwargs)

Return a quadratic constraint object Σᵥ Ĥᵥ Ĥᵥᵀ where Ĥᵥᵀ is the adjoint of the Thiemann regularised constraint at the vertex v.

When kwargs['adjoint'] = True (default is False), this method returns Σᵥ Ĥᵥᵀ Ĥᵥ instead of Σᵥ Ĥᵥ Ĥᵥᵀ.

Note: for the optional kwargs, you can specify:
  • kwargs[‘adjoint’] (bool): if set to False, the Σᵥ Ĥᵥ Ĥᵥᵀ version is returned, otherwise Σᵥ Ĥᵥᵀ Ĥᵥ

  • kwargs[‘apply_lapse’] (bool): if set to True, lapses will be applied when constructing

    the individual constraints.

  • kwargs[‘lazy’] (bool): if set to True, the quadratic constraint is implemented using

    NetKet’s Squared lazy wrapper.

  • kwargs[‘fast’] (bool): if True, and jax is False, a faster Numba based

    ComputationalOperator is returned

Parameters:
  • computational (Optional[bool]) – (not functional)

  • kwargs – see the docstring

  • jax (Optional[bool]) – a flag to determine whether the returned ComputationalOperator should be of ComputationalOperator or ComputationalJaxOperator type