API Reference¶
Welcome to the Alice API Reference. All public classes and functions are documented here, organized by conceptual topic. For specific 1D algorithms, see the Algorithms tab.
Network¶
Matrix product states, operators, and measurement.
| Symbol | Description |
|---|---|
| MPS | Matrix product state |
| MPO | Matrix product operator |
| Network | Base tensor network chain |
| observe | Compute expectation values |
Interaction¶
Interaction term dataclasses and the TOML-driven builder.
| Symbol | Description |
|---|---|
| Interaction | Base interaction term |
| Interaction1Site | On-site interaction |
| Interaction2Site | Two-site interaction |
| InteractionNSite | N-site interaction over a contiguous window |
| build_interaction | Build interactions from TOML config |
Geometry¶
Lattice geometry builders and traversal-order generators.
| Symbol | Description |
|---|---|
| Geometry | Resolved lattice geometry struct |
| build_geometry | Construct a Geometry from a config dict |
| build_intrcmap | Generate the interaction map from a Geometry |
| intrcmap_1dchain | Interaction map for 1D chains |
| intrcmap_square | Interaction map for 2D square lattices |
Local Space¶
Physical Hilbert space builders for bosonic and fermionic sites.
| Symbol | Description |
|---|---|
| build_bosonic | Spin-s site with MPO operator templates |
| build_fermionic | Spinless-fermion site with JW templates |
| build_conductor | Spinful-fermion (Band) site |
Hamiltonian¶
MPO Hamiltonian assembly and built-in physics models.
| Symbol | Description |
|---|---|
| build_hamiltonian | Assemble Hamiltonian MPO from interactions |
| build_heisenberg | Heisenberg spin model |
| build_free_fermion | Spinless free-fermion (tight-binding) model |
| build_hubbard | Hubbard model |
Logging¶
| Symbol | Description |
|---|---|
| configure_logging | Set up Alice's logging scheme |
Quick Links by Task¶
I want to...¶
Run DMRG on a spin chain → build_interaction, build_hamiltonian, dmrg.run
Run XTRG at finite temperature → build_interaction, build_hamiltonian, xtrg.run
Define a model from a TOML file → build_interaction — see AutoMPO from TOML
Use a 2D square lattice geometry → intrcmap_square, build_geometry
Define a custom geometry → build_geometry — see Custom geometry
Build a custom local space → build_bosonic / build_fermionic / build_conductor — see Custom local space
Compute an expectation value → observe
Save and reload a result → Network.serialize / deserialize, dmrg.Summary, xtrg.Summary
Configure logging and diagnostics → configure_logging
See complete working examples → Examples