QED Operators

Operator factories and local gauge-invariant bases for U(1) lattice gauge models.

Operator factories and gauge-invariant local bases for U(1) (QED) models.

edlgt.operators.QED_operators.QED_dressed_site_operators(spin, pure_theory, lattice_dim, U='ladder', fermionic=True, background=0, check_gauss_law=False)[source]

Build dressed-site QED operators for 1D, 2D, or 3D lattices.

Parameters:
  • spin (int) – Gauge-link spin truncation (local link dimension 2*spin + 1).

  • pure_theory (bool) – If True, build the pure-gauge operator set (no matter fields).

  • lattice_dim (int) – Number of spatial lattice dimensions (supported: 1, 2, 3).

  • U (str, optional) – Rishon-shift convention passed to QED_rishon_operators() (typically "ladder" or "spin").

  • fermionic (bool, optional) – If True, use fermionic matter/rishon parity conventions.

  • background (int, optional) – Maximum absolute static background charge included at each site. 0 disables the background degree of freedom.

  • check_gauss_law (bool, optional) – If True, run internal consistency checks on the constructed local Gauss-law operators.

Returns:

Dictionary of dressed-site operators used by the QED model builders.

Return type:

dict

edlgt.operators.QED_operators.QED_gauge_invariant_states(spin, pure_theory, lattice_dim, background=0, get_only_bulk=False)[source]

Construct local gauge-invariant QED basis states and basis matrices.

Parameters:
  • spin (int) – Gauge-link spin truncation.

  • pure_theory (bool) – If True, exclude matter fields.

  • lattice_dim (int) – Number of spatial dimensions.

  • background (int, optional) – Maximum absolute static background charge included at the site.

  • get_only_bulk (bool, optional) – If True, keep only bulk-compatible site subsets when classifying border/corner configurations.

Returns:

(gauge_basis, gauge_states) dictionaries. gauge_basis stores sparse basis matrices (full local basis -> gauge-invariant subspace) and gauge_states stores the corresponding local configurations. When background > 0, exact background-resolved entries keyed by (bg, label) are added alongside the legacy aggregate label keys.

Return type:

tuple

edlgt.operators.QED_operators.QED_gauge_invariant_operators(spin, pure_theory, lattice_dim, background=0, get_only_bulk=False, U='ladder', fermionic=True)[source]

Project QED dressed-site operators onto all compatible GI local bases.

Parameters:
Returns:

Dictionary keyed by (label, op_name). When background == 0, label is a string such as "site", "even_mx", or "odd_px_py". When background != 0, label is an exact basis label of the form (bg, geom_label).

Return type:

dict

edlgt.operators.QED_operators.QED_rishon_operators(spin, pure_theory, U, fermionic=True, background=0)[source]

Build single-rishon operators for a truncated U(1) quantum link model.

The local basis is the electric-field eigenbasis with dimension “2*spin + 1” and eigenvalues “E = -spin, …, +spin” (in increasing order). The operator “U” is implemented as a one-step shift in this basis (chosen so that it raises “E” by one unit where defined).

If “fermionic=True”, rishons are treated as fermionic modes via a local parity operator “P = (-1)**n” and the convention:

Zp     = U @ P
Zm_dag = U
Zm     = Zm_dag.T
Zp_dag = Zp.T

Convenience composites used in corner/plaquette constructions are also provided (e.g. “Zp_P”, “P_Zm_dag”).

Parameters:
  • spin (int) – Truncation parameter (local dimension 2*spin + 1).

  • pure_theory (bool) – Included for API consistency and validation.

  • U (str) – Shift amplitude convention. Supported values are "ladder" and "spin".

  • fermionic (bool, optional) – If True, include parity and enforce fermionic anticommutation checks.

Returns:

Sparse operator dictionary including P, U, rishon creation and annihilation operators, and electric-field operators.

Return type:

dict

edlgt.operators.QED_operators.QED_check_gauss_law(spin, pure_theory, lattice_dim, gauss_law_ops, background=0, threshold=1e-15)[source]

Validate a local QED gauge-invariant basis against Gauss-law constraints.

Parameters:
  • spin (int) – Gauge-link spin truncation.

  • pure_theory (bool) – If True, check the pure-gauge local basis.

  • lattice_dim (int) – Number of spatial lattice dimensions.

  • gauss_law_ops (dict) – Dictionary of local Gauss-law operators keyed by site type.

  • background (int, optional) – Maximum absolute static background charge included in the local basis.

  • threshold (float, optional) – Numerical tolerance used in the consistency checks.

Return type:

None

Raises:
  • TypeError – If input argument types are invalid.

  • ValueError – If the basis is not isometric/projective or does not satisfy Gauss law.

edlgt.operators.QED_operators.QED_plq_supersite_operators(spin, pure_theory, lattice_dim, leg_labels=None, U='ladder', gi_ops=None)[source]

Build plaquette-super-site operators from gauge-invariant dressed legs.

A 2x2 plaquette super-site is the composite of four dressed sites. Each leg contributes its gauge-invariant single-site operators (the Gauss-law projected dressed-site operators from QED_gauge_invariant_operators(), i.e. basis.T @ op @ basis), and the super-site operator is their Kronecker product. Because the per-site Gauss-law projection commutes with the tensor composition, composing the gauge-invariant legs is identical to building the raw dressed composite and then projecting it to the gauge-invariant subspace – but it stays in the (much smaller) gauge-invariant leg-product basis, which is exactly the basis a plaquette-block LBO projector reduces.

The four legs are ordered along the standard zig-zag curve (x fastest), i.e. ascending lattice-site index:

  2|     3|
-- o ---- o --
   |      |
  0|     1|
-- o ---- o --
   |      |

so leg 0 = lower-left, 1 = lower-right, 2 = upper-left, 3 = upper-right. This matches get_plaquette_neighbors() ([origin, +x, +y, +x+y]) and the corner-operator assignment used by PlaquetteTerm.

Parameters:
  • spin (int) – Gauge-link spin truncation.

  • pure_theory (bool) – Must be True (plaquette formulation is pure-gauge only).

  • lattice_dim (int) – Must be 2.

  • leg_labels (list[str], optional) – The four site-labels (zig-zag order) selecting each leg’s gauge-invariant basis. Defaults to the bulk label "site" on every leg. Pass edge/corner labels (e.g. "site_px", "site_px_py") for boundary super-sites under OBC, where the legs have smaller bases.

  • U (str, optional) – Rishon-shift convention forwarded to the dressed-site factory.

  • gi_ops (dict, optional) – Pre-built dressed-site gauge-invariant operators keyed by (site_label, op_name) (the output of QED_gauge_invariant_operators()). This dict depends only on (spin, pure_theory, lattice_dim, U) – NOT on leg_labels – so a caller that assembles many super-sites (e.g. one per position class) can build it ONCE and pass it in, avoiding repeated (and noisily logged) reconstruction. When None it is built internally.

Returns:

Plaquette-super-site operators in the gauge-invariant leg-product basis.

Return type:

dict

Notes

Operator groups (validation status against the dressed-site model):

  • intra-block E2_plq (four interior links) and B2_plq (the plaquette loop + h.c.) – verified to reproduce the dressed-site E2 / PlaquetteTerm expectation values exactly.

  • inter-block electric E2_plq_p{d} / E2_plq_m{d} – the Casimir of the links the super-site shares with its +d / -d neighbour.

  • inter-block magnetic B2_plq_p{d} / B2_plq_m{d} (2-body, with _dag) and B2_plq_{p,m}x_{p,m}y (4-body) – each super-site’s share of a straddling / four-corner plaquette loop, derived from geometry so that B2_plq_px(i) (x) B2_plq_mx(i+x) (and the four-body product) reproduce the corresponding loop. Pending end-to-end energy validation.

  • boundary link generators E_plq_{p,m}{d} – per-direction boundary electric flux, for the inter-super-site link symmetries.