Skip to main content
Ctrl+K

qlinks

  • GitHub
  • qlinks

User guide

  • Overview
  • Installation
  • Typical workflow
  • Thermodynamic ETH diagnostics
  • Tensor-network cage ansatzes
  • Minimal examples
  • Current development status
  • Repository refactor status
  • Architecture diagnostics

API reference

  • qlinks package
    • qlinks.backends package
    • qlinks.basis package
      • qlinks.basis.solvers package
    • qlinks.builders package
    • qlinks.caging package
    • qlinks.constraints package
    • qlinks.conventions package
    • qlinks.encoded package
    • qlinks.exceptions package
    • qlinks.io package
    • qlinks.lattice package
    • qlinks.local_structure package
    • qlinks.models package
    • qlinks.open_system package
    • qlinks.operators package
    • qlinks.variables package
    • qlinks.visualizer package

Project

  • Contributing
  • 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 sign is assigned by the parity of the unit-cell coordinate, eta(r) = (-1) ** sum(cell coordinates). On a square lattice this is 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']) – Which sublattice receives the positive charge. "even_positive" assigns +magnitude to the even sublattice; "odd_positive" reverses the sign.

Returns:

Integer charge array ordered by site id.

Return type:

ndarray[tuple[Any, …], dtype[int64]]

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:

ndarray[tuple[Any, …], dtype[int64]]

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:

ndarray[tuple[Any, …], dtype[int64]]

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 is 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']) – Which sublattice receives the positive charge. "even_positive" assigns +magnitude to the even sublattice; "odd_positive" reverses the sign.

Returns:

Integer charge array ordered by site id.

Return type:

ndarray[tuple[Any, …], dtype[int64]]

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.