|
Uni20
Asynchronous tensor and runtime library.
|
Status: implemented U(1) spin-half construction checkpoint. The historical tensorcontraction-integration branch remains the reference for later U(1)xU(1) Fermi-Hubbard builders.
The model layer constructs symmetry-aware finite-chain values over the ordinary BlockTensor, FiniteMps, and FiniteMpo types. It does not introduce a second tensor representation.
models::make_spin_half_u1_site() returns SpinHalfU1Site, containing:
Symmetry;LocalSpace ordered as |up>, |down>;+1/2 and -1/2 QNum values.The component name defaults to "Sz". The explicit ordering is used by the MPS and MPO builders, while all legality still follows from the stored quantum numbers rather than positional assumptions in contraction code.
models::make_neel_product_mps() constructs an alternating normalized product state. Its default pattern is
and SpinHalfState::down selects the opposite first state. Every site contains one scalar block of value one. Bond i contains one dimension-one sector whose charge is the cumulative sum of physical charges to its left:
Consequently each stored key obeys the MPS selection rule q_right = q_left + q_physical, and the final boundary records the total-charge sector. The rank-one state is normalized and both left- and right-canonical. This is the intended initial state for the first finite DMRG driver, so that driver does not require a separate canonicalization pass.
The optional storage policy must provide immediately accessible local blocks. Sparse storage allocates only the selected product-state block, while complete storage allocates its canonical legal-key set. Async and distributed storage require a separate initialization protocol and are not accepted by this synchronous builder.
models::make_spin_half_heisenberg_mpo() constructs
as a sparse FiniteMpo. The five-state interior auxiliary is ordered as:
| Coordinate | Charge | Meaning |
|---|---|---|
| 0 | 0 | start |
| 1 | -1 | pending S- channel, opened by S+ |
| 2 | +1 | pending S+ channel, opened by S- |
| 3 | 0 | pending Sz channel |
| 4 | 0 | finish |
In left-auxiliary row and right-auxiliary column order, the bulk operator is:
The left and right boundary auxiliary spaces each contain one scalar state. The first site retains the start row, the last site retains the finish column, and boundary coordinate zero therefore selects exactly the open-chain Hamiltonian. This is the boundary convention consumed directly by MpoEnvironmentCache(mps, mpo, 0, 0).
The run alternates complete directional traversals. The product MPS is canonical from both directions, so it satisfies the first-run precondition without a separate canonicalization pass. See Directional Two-Site DMRG Sweeps for the terminal energy convergence contract and current truncation limits. The registered model example includes four-site analytic validation and a reproducible 20-site comparison against Matrix Product Toolkit. With UNI20_ENABLE_FLOAT128=ON and UNI20_BACKEND_MPLAPACK=ON, its --precision=fp128 mode validates the same symmetry-aware DMRG path for real and complex binary128 storage. The registered checks use precision-specific reference tolerances, including real and complex fp32 coverage of the four-site analytic result. Larger development timings and the rules for interpreting cross-library measurements are recorded in DMRG Performance Baselines.
For a one-site chain only the longitudinal-field term remains. A zero-length MPS or MPO is rejected. Couplings are real even when the requested storage scalar is complex, preserving the Hermitian model contract required by the current symmetric Lanczos DMRG path.
Both builders currently return packed sparse host storage. This makes the small rank-one MPS and scalar MPO blocks immediately usable by the current host environment and sweep implementations while retaining the ordinary storage policy boundary for later builders.
Every constructed leg receives a stable string label. Shared MPS and MPO bonds use exactly equal copied space values, including that label, so finite-chain connectivity validation remains strict. Directional SVD replacement preserves the internal MPS bond label.
The next model checkpoint can rebuild the integration branch's U(1)xU(1) Fermi-Hubbard convention:
|0>, |up down>, |down>, |up>;(0,0), (2,0), (1,-1/2), (1,+1/2);That work should reuse the current FiniteMps/FiniteMpo construction surface and preserve its two symmetry factors. It must not lower the U(1)xU(1) state to a dense no-symmetry model.