Expand description
Shared scientific vocabulary and reusable quantum simulation components.
The facade always provides core. Optional Cargo features expose exact,
variational, stochastic series expansion, and artifact capabilities as they
become supported. Scientific behavior is introduced test-first under the
conventions documented by the project.
Re-exports§
pub use qslib_core as core;
Structs§
- Basis
State - An owned dense state in canonical site order.
- Basis
State View - An immutable dense view over a canonical binary state.
- Bond
- An undirected bond with an optional periodic-image translation.
- Coordinate
- A finite Cartesian coordinate associated with one canonical site.
- Custom
Geometry - A custom ordered collection of finite Cartesian sites.
- Dense
Couplings - A validated dense symmetric coupling matrix.
- Diagonal
Gauge - A diagonal gauge with
phi(b) = pi * sum_i a_i b_i. - Disorder
Provenance - Durable provenance for a realized disorder table.
- Disorder
Realization - A realized, persisted per-interaction disorder table.
- Finite
Group - A validated finite group of site permutations.
- Full
Basis - Canonical full computational basis in increasing packed-integer order.
- Hamiltonian
- A deterministic Hamiltonian term list with a physical scalar constant.
- Interaction
Identity - Full identity of a physical interaction term.
- Interaction
Table - Deterministic collection of resolved weighted interactions.
- Packed
State - A little-endian-by-site packed binary state.
- Pauli
String - A Pauli product with distinct, canonical site support.
- Permutation
- A gather-direction site permutation storing
source_for_destination. - Rectangular
Geometry - A rectangular lattice with explicit row-major site order and boundaries.
- Resolved
Model - A validated Hamiltonian together with the physical inputs that resolved it.
- Sector
Basis - Canonical fixed-Hamming-weight basis in increasing packed-integer order.
- Site
Count - A checked number of sites in a finite simulation system.
- SiteId
- A zero-based site identifier with a stable serialized representation.
- Sparse
Couplings - A validated sparse pair coupling table.
- Spin
Inversion - Global bitwise spin inversion.
- Symmetry
Character - A validated one-dimensional unitary character aligned with group elements.
- Weighted
Interaction - A resolved coefficient attached to one canonical interaction identity.
- XMajor
Adapter - Explicit adapter for legacy x-major flat indexing.
Enums§
- Basis
Bit - A binary value in canonical site order. It is not a model-specific spin label or a Rydberg occupation until an explicit model interprets it.
- Basis
Error - Errors raised while validating identifiers, basis states, and packed data.
- Bond
Multiplicity - Multiplicity policy for generated lattice bonds.
- Boundary
- Boundary condition applied independently to a lattice direction.
- Geometry
Error - Errors raised while constructing or querying a simulation geometry.
- Interaction
Channel - Operator channel attached to one weighted interaction.
- Interaction
Error - Errors raised while resolving weighted interactions and coupling inputs.
- Lattice
Kind - Real-space embedding used by a rectangular coordinate grid.
- Model
Error - Errors raised while constructing a physical model.
- Model
Specification - The original typed physical specification retained by a resolved model.
- Operator
Error - Errors raised while constructing or applying local operators.
- Pauli
- One local Pauli factor in a simulation basis.
- Physical
Axis - A physical Pauli axis named independently from a stored simulation basis.
- Shell
Tolerance - Tolerance policy for selecting a squared-distance shell.
- Simulation
Basis - The physical Pauli axis diagonal in the stored binary basis.
- Symmetry
Error - Errors raised while constructing or applying a symmetry action.
- Word
Width - Width of each word in a serialized packed-state byte stream.
Constants§
- QSLIB_
SEED_ SCHEME - Stable seed-scheme identifier persisted in qslib artifacts.
Functions§
- derive_
seed - Derive a 32-byte child stream using the ADR-0003 canonical framing.
- ensure_
finite - Reject a non-finite real value before it enters a scientific calculation.
- expand_
master_ seed - Expand a convenient
u64into the canonical 32-byte master seed. - heisenberg
- Build isotropic pair-dependent Heisenberg exchange in any Pauli-axis basis.
- is_
interaction_ symmetry - Return whether a weighted interaction table is invariant under a site action.
- j1j2
- Build the square-lattice homogeneous J1-J2 Heisenberg shorthand.
- j1j2_
disordered - Build a J1-J2 Heisenberg model with one coefficient per resolved shell bond.
- legacy_
x_ major_ permutation - Build the explicit legacy x-major to canonical row-major site permutation.
- rectangle_
point_ group - Build the four-element rectangle point group.
- rydberg
- Build the canonical driven Rydberg Hamiltonian in the z simulation basis.
- square_
point_ group - Build the eight-element square dihedral point group.
- sublattice_
gauge - Construct the checkerboard sublattice sign gauge on a square geometry.
- tfim
- Build the physical transverse-field Ising Hamiltonian.
- translation
- Build a rectangular periodic or open translation.
- translation_
group - Build the translation group of a periodic rectangular geometry.
- validate_
model_ symmetry - Validate a full resolved model, including onsite and mapped Pauli terms.
- validate_
spin_ inversion - Validate global spin inversion against a resolved model in its selected basis.