Skip to main content
Ctrl+K

qlinks 1.0.1 documentation

  • GitHub

Contents:

  • qlinks package
    • qlinks.backends package
    • qlinks.basis package
      • qlinks.basis.solvers package
    • qlinks.builders package
    • qlinks.constraints package
    • qlinks.conventions package
    • qlinks.encoded package
    • qlinks.exceptions package
    • qlinks.lattice package
    • qlinks.models package
    • qlinks.open_sys package
    • qlinks.operators package
    • qlinks.variables package
    • qlinks.visualizer package
  • Repository
  • Suggest edit
  • Open issue

qlinks.conventions package

Contents

  • Submodules
  • qlinks.conventions.qlm module
    • staggered_charges_from_sites()
    • square_qdm_staggered_charges()
  • Module contents
    • square_qdm_staggered_charges()
    • staggered_charges_from_sites()

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 is assigned by the parity of the unit-cell coordinate:

eta(r) = (-1) ** sum(cell coordinates)

For a square lattice, this is simply:

eta(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']) –

    “even_positive”:

    even sublattice gets +magnitude, odd sublattice gets -magnitude.

    ”odd_positive”:

    even sublattice gets -magnitude, odd sublattice gets +magnitude.

Returns:

Integer array of shape (lattice.num_sites,), ordered by site id.

Return type:

charges

qlinks.conventions.qlm.square_qdm_staggered_charges(lattice, *, magnitude=None, charge_normalization='spin_half', convention='even_positive')[source]#

Staggered charges for the square-lattice QDM-to-QLM mapping.

For the current spin-half flux convention E_l in {-1, +1}, the close-packed QDM constraint

one dimer touching each site

maps naturally to a staggered Gauss law with charge magnitude 1 on the square lattice.

Parameters:
  • lattice (SquareLattice) – SquareLattice instance.

  • charge_normalization (Literal['integer_flux', 'spin_half']) –

    “spin_half”:

    The user-facing charges are ±1, matching the spin-half flux convention.

    ”integer_flux”:

    The user-facing charges are ±2, matching the integer-flux convention where E_l in {-2, 0, +2}.

  • convention (Literal['even_positive', 'odd_positive']) – Which sublattice receives the positive charge.

  • magnitude (int | None)

Returns:

Integer array ordered by site id.

Return type:

charges

Module contents#

qlinks.conventions.square_qdm_staggered_charges(lattice, *, magnitude=None, charge_normalization='spin_half', convention='even_positive')[source]#

Staggered charges for the square-lattice QDM-to-QLM mapping.

For the current spin-half flux convention E_l in {-1, +1}, the close-packed QDM constraint

one dimer touching each site

maps naturally to a staggered Gauss law with charge magnitude 1 on the square lattice.

Parameters:
  • lattice (SquareLattice) – SquareLattice instance.

  • charge_normalization (Literal['integer_flux', 'spin_half']) –

    “spin_half”:

    The user-facing charges are ±1, matching the spin-half flux convention.

    ”integer_flux”:

    The user-facing charges are ±2, matching the integer-flux convention where E_l in {-2, 0, +2}.

  • convention (Literal['even_positive', 'odd_positive']) – Which sublattice receives the positive charge.

  • magnitude (int | None)

Returns:

Integer array ordered by site id.

Return type:

charges

qlinks.conventions.staggered_charges_from_sites(lattice, *, magnitude=1, convention='even_positive')[source]#

Generate staggered background charges on lattice sites.

The charge is assigned by the parity of the unit-cell coordinate:

eta(r) = (-1) ** sum(cell coordinates)

For a square lattice, this is simply:

eta(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']) –

    “even_positive”:

    even sublattice gets +magnitude, odd sublattice gets -magnitude.

    ”odd_positive”:

    even sublattice gets -magnitude, odd sublattice gets +magnitude.

Returns:

Integer array of shape (lattice.num_sites,), ordered by site id.

Return type:

charges

previous

qlinks.constraints package

next

qlinks.encoded package

Contents
  • Submodules
  • qlinks.conventions.qlm module
    • staggered_charges_from_sites()
    • square_qdm_staggered_charges()
  • Module contents
    • square_qdm_staggered_charges()
    • staggered_charges_from_sites()

By Tan Tao-Lin

© Copyright 2023, Tan Tao-Lin.