qlinks.conventions package#
Submodules#
qlinks.conventions.qlm module#
- qlinks.conventions.qlm.staggered_charges_from_sites(lattice, *, magnitude=1, convention='even_positive')[source]#
Generate staggered background charges on lattice sites.
The charge sign is assigned by the parity of the unit-cell coordinate,
eta(r) = (-1) ** sum(cell coordinates). On a square lattice this iseta(x, y) = (-1) ** (x + y).- Parameters:
lattice (LatticeGraph) – Lattice whose sites carry the Gauss-law charges.
magnitude (int) – Absolute value of the staggered charge.
convention (Literal['even_positive', 'odd_positive']) – Which sublattice receives the positive charge.
"even_positive"assigns+magnitudeto the even sublattice;"odd_positive"reverses the sign.
- Returns:
Integer charge array ordered by site id.
- Return type:
- qlinks.conventions.qlm.square_qdm_staggered_charges(lattice, *, magnitude=None, charge_normalization='spin_half', convention='even_positive')[source]#
Return staggered charges for the square QDM-to-QLM mapping.
With spin-half flux variables
E_l in {-1, +1}, the close-packed QDM constraint maps to a staggered Gauss law with charge magnitude one.- Parameters:
lattice (SquareLattice) – Square lattice whose sites receive charges.
magnitude (int | None) – Optional explicit charge magnitude. If omitted, the magnitude is inferred from
charge_normalization.charge_normalization (Literal['integer_flux', 'spin_half']) –
"spin_half"gives user charges±1;"integer_flux"gives user charges±2.convention (Literal['even_positive', 'odd_positive']) – Which sublattice receives the positive charge.
- Returns:
Integer charge array ordered by site id.
- Return type:
Module contents#
- qlinks.conventions.square_qdm_staggered_charges(lattice, *, magnitude=None, charge_normalization='spin_half', convention='even_positive')[source]#
Return staggered charges for the square QDM-to-QLM mapping.
With spin-half flux variables
E_l in {-1, +1}, the close-packed QDM constraint maps to a staggered Gauss law with charge magnitude one.- Parameters:
lattice (SquareLattice) – Square lattice whose sites receive charges.
magnitude (int | None) – Optional explicit charge magnitude. If omitted, the magnitude is inferred from
charge_normalization.charge_normalization (Literal['integer_flux', 'spin_half']) –
"spin_half"gives user charges±1;"integer_flux"gives user charges±2.convention (Literal['even_positive', 'odd_positive']) – Which sublattice receives the positive charge.
- Returns:
Integer charge array ordered by site id.
- Return type:
- qlinks.conventions.staggered_charges_from_sites(lattice, *, magnitude=1, convention='even_positive')[source]#
Generate staggered background charges on lattice sites.
The charge sign is assigned by the parity of the unit-cell coordinate,
eta(r) = (-1) ** sum(cell coordinates). On a square lattice this iseta(x, y) = (-1) ** (x + y).- Parameters:
lattice (LatticeGraph) – Lattice whose sites carry the Gauss-law charges.
magnitude (int) – Absolute value of the staggered charge.
convention (Literal['even_positive', 'odd_positive']) – Which sublattice receives the positive charge.
"even_positive"assigns+magnitudeto the even sublattice;"odd_positive"reverses the sign.
- Returns:
Integer charge array ordered by site id.
- Return type: