API Reference
On this page
The API reference is generated by rustdoc from the doc comments of the code, as for every Rust library: one page per crate, module, type, trait and function, with its signature, what it computes, what it returns, when it fails or panics, and links to the items it uses. Its search box finds any name. The examples in the doc comments are compiled and run by the test suite.
Open the API reference, starting from the facade crate, or go straight to a crate:
| Crate | What it holds | Described in |
|---|---|---|
caroli | The facade: re-exports of every crate below and caroli::prelude | Overview |
caroli_lattice | Lattices, sites, regions, slices | Lattices and regions |
caroli_model | Models, Hamiltonians (dense, sparse, Bloch), presets, Pauli and Dirac matrices, gauges, continuum models | Tight-binding models, Magnetic fields |
caroli_disorder | Random streams, Anderson disorder, magnetic impurities | Disorder |
caroli_dense | Schur decomposition and reordering, LU, QR, SVD, eigensolvers, products | Dense linear algebra |
caroli_green | Lead modes and self-energies, recursive Green's function, nested dissection, scattering matrix and states, transmissions | Steady-state transport and the pages after it |
caroli_keldysh | Lesser Green's function, bond and interface currents, occupations | Keldysh: densities and currents |
caroli_born | Self-consistent Born approximation | Self-consistent Born approximation |
caroli_torus | Operators on periodic 2D supercells through FFTs | Periodic supercells |
caroli_kpm | Chebyshev moments, kernels, densities of states, Kubo–Bastin conductivities, Spectrum | Kernel polynomial method |
caroli_dynamics | Split-operator, Chebyshev and Magnus time evolution, Torus, Driven | Time evolution |
caroli_gpu | Metal and CUDA backends of the Chebyshev kernels and of the quantum walks, checked runs | Reduced precision and the GPU |
caroli_walk | Quantum walks with spins on the edges of a graph | Quantum walks |
caroli_cli | The input format of the caroli command and its runs | The caroli command |
Each version published on crates.io also has its reference on docs.rs; these pages follow the code on main.
The pages are generated for macOS with the cuda feature, so they show every backend: the calls into Accelerate (caroli_dense) and Metal (caroli_gpu::metal), which exist only on macOS, and the CUDA backend (caroli_gpu::cuda). The crates caroli-validation (the comparisons with the thesis) and caroli-bench (the benchmarks) are not published.
Reading the reference
- Matrices are faer's:
CMatisfaer::Mat<c64>andc64isnum_complex::Complex<f64>. - A method that can fail returns a
Resultwith the crate's error type (GreenError,DenseError,GpuError,ContinuumError); a misuse (a state of the wrong length, an inconsistent model) panics with a message that says what is wrong, and the doc comment says so under Panics. - The formulas in the doc comments follow the conventions of this documentation, written in Unicode (
Γ = i(Σ − Σ†)).