neuralqx.gauge_groups.u1.u1_gauge_group module¶
Concrete implementation of the Abelian gauge group \(U(1)^N\).
This module defines U1GaugeGroup, a gauge group
implementation compatible with HilbertU1. It provides an
explicit Gauss constraint operator and supports multiple operator backends
netket.operator.LocalOperator
The Gauss constraint is implemented in the squared form
where \(\hat G_v\) is the discrete divergence of the electric flux at vertex \(v\) with sign determined by edge orientation.
- class U1GaugeGroup(H, *, lazy=True, computational=True, jax=True)¶
Bases:
AbstractGaugeGroupImplements the Abelian gauge group \(U(1)^N\) acting on a
HilbertU1.Gauss constraint The Gauss law at each vertex \(v\) is enforced by a generator \(\hat G_v\). On an oriented graph it takes the form
\[\hat G_v = \sum_{\ell \in \mathrm{inc}(v)} \hat E_\ell \;-\; \sum_{\ell \in \mathrm{out}(v)} \hat E_\ell\]and the constraint used for optimisation is the positive operator
\[\hat C = \sum_{v \in V} \hat G_v^2\]For \(U(1)^N\), the full constraint is the sum of \(N\) independent copies. In the local operator backend this is realised by constructing one copy and shifting its support by a fixed site offset per copy.
Operator backends Depending on configuration, the constraint is instantiated as one of
netket.operator.LocalOperator
Group composition This implementation supports a simple notion of composition in terms of the number of independent \(U(1)\) factors
\[U(1)^m \times U(1)^n \mapsto U(1)^{m+n}, \qquad \bigl(U(1)^m\bigr)^k \mapsto U(1)^{mk}\]- Parameters:
H (
HilbertU1) – A \(U(1)\) compatible Hilbert space, must be an instance ofHilbertU1.lazy (
Optional[bool]) – If True and a local operator backend is requested, delay building expensive local operator structures.computational (
Optional[bool]) – If True, prefer computational operator backends.jax (
Optional[bool]) – If True and computational is True, request a JAX compatible computational backend.
- Raises:
IncompatibleHilbertSpaceError – If H is not a
HilbertU1.
- property name: str¶
Return a descriptive name for this gauge group instance.
- Returns:
Name string of the form
"U(1)^N Gauge Group".
- property is_abelian: bool¶
Report whether the gauge group is Abelian.
- Returns:
Always True for \(U(1)^N\).
- init_constraint(*, computational=True, jax=False, lazy=True, modded=False)¶
Construct and return the Gauss constraint operator for \(U(1)^N\).
The constraint used in optimisation is
\[\hat C = \sum_{v \in V} \hat G_v^2\]and for \(U(1)^N\) it is the sum of \(N\) independent shifted copies of the single copy constraint.
Backend selection If computational is True, returns a
GaussConstraintOperatoroptionally in a JAX compatible form. If computational is False, returns anetket.operator.LocalOperatorbuilt by explicitly summing shifted copies of the one copy local operator constraint.The modded option is supported only for computational backends. If modded is True while computational is False, a warning is emitted and the local operator is still constructed without modded arithmetic.
- Parameters:
computational (
Optional[bool]) – If True, return a computational operator backend.jax (
Optional[bool]) – If True and computational is True, return a JAX compatible computational backend.lazy (
Optional[bool]) – If True and a local operator backend is requested, delay building expensive structures.modded (
Optional[bool]) – If True, use modded addition in the computational implementation.
- Return type:
Union[LocalOperatorJax,ComputationalOperator,ComputationalJaxOperator]- Returns:
Constraint operator as a LocalOperator, ComputationalOperator, or ComputationalJaxOperator.