Overview#
qlinks provides building blocks for exact-diagonalization studies of
constrained quantum lattice models. Its main use cases are quantum link models
(QLM), quantum dimer models (QDM), constrained spin models, Fock-space graph
visualization, and interference-cage diagnostics.
The package is organized in layers rather than around one monolithic solver:
qlinks.latticeGeometry objects for chains and two-dimensional lattices. Lattices provide sites, links, plaquettes, boundary conditions, orientations, and helper methods used by model and visualizer code.
qlinks.variablesLocal Hilbert spaces and variable layouts. A layout says which physical degree of freedom lives on each site or link and how those variables are encoded as basis configurations.
qlinks.constraintsandqlinks.basisConstraint objects and basis solvers. The common workflow is to enumerate only configurations that obey Gauss-law, dimer-covering, blockade, winding, or other sector constraints.
qlinks.operatorsandqlinks.buildersLocal operators and sparse Hamiltonian builders. Builders apply local updates to constrained basis states and assemble sparse matrices.
qlinks.modelsHigh-level model classes that package a lattice, layout, constraints, sectors, local terms, and build options behind a compact user API.
qlinks.cagingInterference-cage search, classification, local reduced-density-matrix diagnostics, region-support extraction, local cage searches, and Lindblad construction helpers.
qlinks.open_systemLindblad operators, Liouvillian solvers, Monte Carlo wavefunction sampling, random state helpers, and dark-state diagnostics.
qlinks.visualizerReal-space basis visualizers and Fock-space graph visualizers for basis states, cage support, Hamiltonian graphs, Liouvillian graphs, and stochastic trajectories.
Design principles#
The central design idea is to keep the model-specific pieces local and reusable.
A model defines its lattice, constraints, sectors, and local Hamiltonian terms;
the shared basis solvers and sparse builders then handle enumeration and matrix
assembly. Downstream tools consume the resulting qlinks.models.ModelBuildResult
so that they can reuse the same basis, Hamiltonian, kinetic term, and potential
term without rebuilding them.
This separation is especially important for caging workflows. The search layer works on sparse matrices and self-loop values, while the classification, visualizer, and open-system layers can optionally use model-level geometric metadata to interpret the same cage in real space.