neuralqx.operators.computational.misc.numba package

class NDU1Holonomy(H, edge_index, *, adjoint=False)

Bases: ComputationalOperator

N-D (K-copy) holonomy on a single base edge index edge_index:

Decomposed action:

h_1 ⊗ I ⊗ … + I ⊗ h_2 ⊗ … + … + I ⊗ … ⊗ h_K

  • For each gauge copy k ∈ {0, …, K-1}, produces one connected configuration σ’_k where only the k-th copy’s edge is shifted by ±1

  • Matrix elements are all 1.

  • adjoint=True flips the direction to lowering (-1), otherwise raising (+1).

class U1Holonomy(H, edge_index, *, adjoint=False)

Bases: ComputationalOperator

A pure U(1) holonomy on a single edge index edge_index:
  • Emits one connected configuration σ’ where that edge is shifted by ±1 (with wrap-mod).

  • Matrix element (weight) is identically 1.

class MinimalLoopHolonomy(H, minimal_loop, *, copy=0, adjoint=False)

Bases: ComputationalOperator

Minimal loop holonomy on a single gauge copy.

Given a dressed minimal loop:

[ ((u, v, key), {“type”: …}), … ]

this operator applies the total shift of all loop edges on one chosen gauge copy (with wrap-mod), emitting a single connected configuration and unit matrix element

class NDMinimalLoopHolonomy(H, minimal_loop, *, adjoint=0)

Bases: ComputationalOperator

N-D minimal loop holonomy as a light-weight ComputationalOperator.

This implements the decomposed action

h_1 ⊗ I ⊗ … + I ⊗ h_2 ⊗ … + … + I ⊗ … ⊗ h_N

Each h_k acts on a single gauge copy (k-th) by shifting the charges along the provided dressed minimal loop. The direction (+1 or -1) for each edge in the loop is deduced from the “type” entry in the dressed data.

class OneMinusHalfHolonomy(H, minimal_loop, *, copy=0)

Bases: ComputationalOperator

Operator: I - 0.5 * ( h_{a,k} + h_{a,k}^dagger )

Acts on a single gauge copy k:
  • Connection 0: diagonal, σ (weight +1)

  • Connection 1: forward minimal-loop holonomy h_{a,k} (weight -1/2)

  • Connection 2: adjoint/backward minimal-loop holonomy h_{a,k}^dagger (weight -1/2)

If the dressed minimal loop is empty, this reduces to identity (one diagonal connection).

class Number(H, edge)

Bases: ComputationalOperator

Diagonal “number” operator for a single edge with U(1) DoF.

(Number at edge=e) |σ⟩ = σ[e] · |σ⟩

class Identity(H, const=1.0)

Bases: ComputationalOperator

Diagonal identity-like operator with an optional scalar factor const.

(Identity(const=c)) |σ⟩ = c · |σ⟩

  • Exactly one connected component (diagonal).

  • Hermitian iff const is real.

class Coloring(H, site, charge_vector)

Bases: ComputationalOperator

Copy-resolved coloring on U(1)^gdim: δ_{(σ[site+k*nE])_k, charge_vector}

This is a diagonal indicator on a base edge ‘site’ across gauge copies:
(Coloring at site=e, charge_vector=(q1,…,q_g)) |σ⟩

= [ (σ[e + k*n_edges_total] == q_{k+1} for all k) ] · |σ⟩

Works for generic gauge_dim (default use-case: U(1)^3 with gauge_dim=3).

class ChargeColoring(H, site, charge)

Bases: ComputationalOperator

Single-site charge-coloring: δ_{σ[site], charge}.

This is a diagonal indicator on one degree of freedom (edge-component):

(ChargeColoring at site=e, charge=q) |σ⟩ = [σ[e] == q] · |σ⟩

Returns a single diagonal connection (σ itself) with matrix element 1.0 when σ[…, site]==charge, otherwise 0.0.