QED LGT Model Class

U(1) lattice gauge-theory model helper with optional matter fields and symmetry-sector construction.

class edlgt.models.QED_model.QED_Model(spin, pure_theory, bg_list=None, plaq_basis=False, link_symmetries=True, get_only_bulk=False, **kwargs)[source]

Bases: QuantumModel

QED lattice gauge model with optional matter fields.

Initialize the QED model and construct its symmetry sector.

Parameters:
  • spin (float or str = integrated) – Gauge-link spin representation.

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

  • bg_list (list, optional) – Optional background-charge configuration used during local-basis projection.

  • get_only_bulk (bool, optional) – Restrict gauge-invariant local states to bulk-compatible ones when supported by the operator factory.

  • **kwargs – Arguments forwarded to QuantumModel.

build_Hamiltonian(g, m=None, theta=0.0, dtype_mode='auto')[source]

Dispatch to the appropriate QED Hamiltonian builder.

Parameters:

dtype_mode (str or bool, optional) – “auto”, “real”, “complex”, or legacy bool flag.

build_truncated_Hamiltonian(g, m=None, theta=0.0, dtype_mode='auto')[source]

Assemble the QED Hamiltonian.

Parameters:
  • g (float) – Gauge coupling.

  • m (float, optional) – Bare fermion mass (used only when matter is present).

  • theta (float, optional) – Topological-angle coupling parameter.

  • dtype_mode (str or bool, optional) – “auto”, “real”, “complex”, or legacy bool flag.

build_integrated_Hamiltonian(g, m, theta=0.0, dtype_mode='auto')[source]

Assemble the integrated-gauge 1D QED Hamiltonian.

Parameters:

dtype_mode (str or bool, optional) – “auto”, “real”, “complex”, or legacy bool flag.

reconstruct_integrated_E2_from_N(density_obs_name='N', density_corr_obs_name='N_N', state_index=None, dynamics=False, compute_density_corr=True, print_values=True)[source]

Reconstruct link-resolved <E^2> in integrated 1D QED from matter density.

Parameters:
  • density_obs_name (str, optional) – Key in self.res containing measured site-resolved <N_k>.

  • density_corr_obs_name (str, optional) – Key in self.res containing measured two-point correlator <N_k N_l>.

  • state_index (int or None, optional) – Eigenstate index used to compute <N_k N_l> on the fly when density_corr_obs_name is missing and compute_density_corr=True. If None and only one eigenstate is available, index 0 is used.

  • dynamics (bool, optional) – If True, interpret state_index as a time index and compute missing correlators on self.H.psi_time[state_index] instead of self.H.Npsi[state_index].

  • compute_density_corr (bool, optional) – If True, compute <N_k N_l> when not already present in self.res. If False, missing correlations raise KeyError.

  • print_values (bool, optional) – If True, print link-resolved reconstructed values and their average using the same style as local observable measurements.

Returns:

Link-resolved reconstructed Casimir values <E_{k,k+1}^2> with shape (n_sites - 1,).

Return type:

numpy.ndarray

Notes

The reconstruction uses

E_n = sum_{k=0}^n [ q_k + N_k + ((-1)^k-1)/2 ].

Therefore:

<E_n^2> = B_n^2 + 2 B_n sum_{k<=n}<N_k> + sum_{k,l<=n}<N_k N_l>,

where B_n = sum_{k=0}^n [q_k + ((-1)^k-1)/2].

get_fermionic_string_correlator(state=None, state_index=None, dynamics=False, print_values=False)[source]

Measure the gauge-invariant fermionic string correlator matrix.

Notes

For the integrated 1D QED model, the off-diagonal entries are built as <Q_dag(i) U(i+1) … U(j-1) Q(j)> for i < j, with Q_dag = Sm, Q = Sp, and U = P_psi = Sz. For the truncated dressed-site model, the same gauge-invariant string is represented by <Q_px_dag(i) U(i+1) … U(j-1) Q_mx(j)>. In both cases, the diagonal is the local density <N(i)>.

measure_fermionic_nongaussianity(state=None, state_index=None, dynamics=False, print_value=True, eig_tol=1e-10)[source]

Measure the fermionic non-Gaussianity from the string correlator.

build_plaquette_Hamiltonian(g, dtype_mode='auto')[source]

Assemble the plaquette-basis QED Hamiltonian.

Parameters:

dtype_mode (str or bool, optional) – “auto”, “real”, “complex”, or legacy bool flag.

check_symmetries()[source]

Check link-symmetry constraints on measured electric fields.

QED_Hamiltonian_couplings(g, m=None, theta=0.0, magnetic_basis=False)[source]

Set QED Hamiltonian couplings from physical parameters.

Parameters:
  • g (float) – Gauge coupling.

  • m (float, optional) – Bare mass parameter (used only with matter).

  • theta (float, optional) – Topological-angle parameter.

  • magnetic_basis (bool, optional) – If True, use the alternative magnetic-basis normalization.

Returns:

Stores couplings in self.coeffs.

Return type:

None

overlap_QMB_state(name)[source]

Return predefined benchmark basis configurations for selected labels.

Parameters:

name (str) – Label of a predefined reference configuration.

Returns:

Configuration in the model symmetry-sector basis.

Return type:

numpy.ndarray

print_state_config(config, amplitude=None)[source]

Log a readable per-site decomposition of a QED basis configuration.