Data structures
Each entry is a base class with its subclasses (←), and the module in
src/bfss/ that defines it.
HilbertVector(element of the singlet space) ←TrialFunction(a trial wavefunction : aProfiletimes a polynomial singlet) andExpansion(finite combination over aBasis);hilbert.Expansion.dilatedapplies the unitary dilation , which is how states are measured and how optimized coefficients are placed at .Profile←ProjectedGaussian;hilbert.Scalars(number system of the matrix elements) ←Rationals(exact) andReals(prec)(balls ofprecbits);scalars. The same assembly, masters and observables run in either.LinearCombination(element of a free module over a coefficient ring) ←Polynomial(three variables; ←Polyincovariants, with coefficients on the slice) andMatrixPolynomial( over the invariants of : Wishart moments with , integrands with ), both inalgebra, andFermionOperator(normal-ordered words) infock. The subclasses differ only in their coefficient ring and product.PolynomialSinglet←Seed← {TensorSeed,ExpressionSeed}, andPolynomialSinglet←OperatorImage(image under an equivariant operator field) ← {YukawaPower,InvariantMultiple};covariants.SeedSetholds the seeds of a basis.Operator(the expression language ofExpressionSeed) ←ScalarOp,BaseOp,Product,Sum;covariants.QuadraticForm←Block,Observable, andPiece(integrand of aBlock) ←Insertion,Gradient,OneSidedB;blocks, which also holds theAssemblerof matrix elements.SliceArithmetic(operators on the gauge slice over a field) ←ComplexContextinfiber, andModularContext( sectors of orbit space, modulo a prime) incontract.Ansatz(orderedShells) builds aBasis;ansatz.Engineinstatecaches operators and contraction tables.
Files
A bfss.state.v1 JSON file (state) holds the seed definitions, the ordered
trial wavefunctions (widths a, b, invariant exponents , Yukawa
power , seed name), their coefficients as decimal strings, and metadata:
dilation (), canonical_width, Haux_eigenvalue (the
optimizer's smallest eigenvalue , the minimal
), fidelity_lower_bound
(), matrix_elements (the number system) and,
after bfss optimize or bfss measure --store, observables (the midpoints
printed by bfss measure). Every building block serializes itself, so loading
rebuilds the wavefunction with the generic machinery.
A bfss.ansatz.v1 file (ansatz) describes a basis as shells: widths ×
invariant prefactors × seeds × ranges of Yukawa powers.
Generated from variational/docs/data-structures.md at the tag release.