Skip to main content

Crate qslib

Crate qslib 

Source
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§

BasisState
An owned dense state in canonical site order.
BasisStateView
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.
CustomGeometry
A custom ordered collection of finite Cartesian sites.
DenseCouplings
A validated dense symmetric coupling matrix.
DiagonalGauge
A diagonal gauge with phi(b) = pi * sum_i a_i b_i.
DisorderProvenance
Durable provenance for a realized disorder table.
DisorderRealization
A realized, persisted per-interaction disorder table.
FiniteGroup
A validated finite group of site permutations.
FullBasis
Canonical full computational basis in increasing packed-integer order.
Hamiltonian
A deterministic Hamiltonian term list with a physical scalar constant.
InteractionIdentity
Full identity of a physical interaction term.
InteractionTable
Deterministic collection of resolved weighted interactions.
PackedState
A little-endian-by-site packed binary state.
PauliString
A Pauli product with distinct, canonical site support.
Permutation
A gather-direction site permutation storing source_for_destination.
RectangularGeometry
A rectangular lattice with explicit row-major site order and boundaries.
ResolvedModel
A validated Hamiltonian together with the physical inputs that resolved it.
SectorBasis
Canonical fixed-Hamming-weight basis in increasing packed-integer order.
SiteCount
A checked number of sites in a finite simulation system.
SiteId
A zero-based site identifier with a stable serialized representation.
SparseCouplings
A validated sparse pair coupling table.
SpinInversion
Global bitwise spin inversion.
SymmetryCharacter
A validated one-dimensional unitary character aligned with group elements.
WeightedInteraction
A resolved coefficient attached to one canonical interaction identity.
XMajorAdapter
Explicit adapter for legacy x-major flat indexing.

Enums§

BasisBit
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.
BasisError
Errors raised while validating identifiers, basis states, and packed data.
BondMultiplicity
Multiplicity policy for generated lattice bonds.
Boundary
Boundary condition applied independently to a lattice direction.
GeometryError
Errors raised while constructing or querying a simulation geometry.
InteractionChannel
Operator channel attached to one weighted interaction.
InteractionError
Errors raised while resolving weighted interactions and coupling inputs.
LatticeKind
Real-space embedding used by a rectangular coordinate grid.
ModelError
Errors raised while constructing a physical model.
ModelSpecification
The original typed physical specification retained by a resolved model.
OperatorError
Errors raised while constructing or applying local operators.
Pauli
One local Pauli factor in a simulation basis.
PhysicalAxis
A physical Pauli axis named independently from a stored simulation basis.
ShellTolerance
Tolerance policy for selecting a squared-distance shell.
SimulationBasis
The physical Pauli axis diagonal in the stored binary basis.
SymmetryError
Errors raised while constructing or applying a symmetry action.
WordWidth
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 u64 into 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.

Type Aliases§

Complex64
The reference complex scalar for qslib scientific calculations.
Real
The reference real scalar for qslib scientific calculations.