neuralqx.hilbert.u1.layout package

U(1) Hilbert-space layout subpackage.

Concrete layout descriptor for U(1) gauge-copy Hilbert spaces.

Public API

StridedGaugeCopyLayout

Strided block layout: σ[g*E + e] with gauge copy g and edge e.

GaugeCoord

Structured coordinate (gauge_copy, edge_index) for the strided layout.

class StridedGaugeCopyLayout(edges_per_copy, gauge_dimensions)

Bases: AbstractBasisLayout[GaugeCoord]

Strided gauge-copy layout with contiguous copy blocks.

This is the concrete U(1) layout implementation used by neuralqx for multiple gauge copies (i.e. U(1)^N gauge group structure).

If each gauge copy contains \(E\) edge degrees of freedom and there are \(G\) copies, the flattened configuration has length

\[N = E G\]

and is stored as contiguous blocks

\[(\sigma^{(0)}_0, \ldots, \sigma^{(0)}_{E-1}, \sigma^{(1)}_0, \ldots, \sigma^{(1)}_{E-1}, \ldots, \sigma^{(G-1)}_0, \ldots, \sigma^{(G-1)}_{E-1}).\]

The structured coordinate is GaugeCoord(gauge_copy, edge_index) and the flattening map is

\[s = gE + e.\]

This class exposes two API layers

  • Generic layout API
    • site_of()

    • coord_of()

  • Convenience API
    • encode(gauge_copy, edge_index)()

    • decode(site) -> (gauge_copy, edge_index)()

class GaugeCoord(gauge_copy, edge_index)

Bases: object

Structured coordinate for a gauge-copy strided layout.

This coordinate is used by StridedGaugeCopyLayout and represents a site as

  • gauge_copy: which gauge-copy block the site belongs to

  • edge_index: position inside that copy block

The coordinate is intentionally small and immutable so that it is safe to pass around in indexing-heavy code.

class GaugeLayout(edges_per_copy, gauge_dimensions)

Bases: StridedGaugeCopyLayout

Deprecated alias for StridedGaugeCopyLayout.

Submodules