DEM Audiocaroli Documentation
APIGitHub

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:

CrateWhat it holdsDescribed in
caroliThe facade: re-exports of every crate below and caroli::preludeOverview
caroli_latticeLattices, sites, regions, slicesLattices and regions
caroli_modelModels, Hamiltonians (dense, sparse, Bloch), presets, Pauli and Dirac matrices, gauges, continuum modelsTight-binding models, Magnetic fields
caroli_disorderRandom streams, Anderson disorder, magnetic impuritiesDisorder
caroli_denseSchur decomposition and reordering, LU, QR, SVD, eigensolvers, productsDense linear algebra
caroli_greenLead modes and self-energies, recursive Green's function, nested dissection, scattering matrix and states, transmissionsSteady-state transport and the pages after it
caroli_keldyshLesser Green's function, bond and interface currents, occupationsKeldysh: densities and currents
caroli_bornSelf-consistent Born approximationSelf-consistent Born approximation
caroli_torusOperators on periodic 2D supercells through FFTsPeriodic supercells
caroli_kpmChebyshev moments, kernels, densities of states, Kubo–Bastin conductivities, SpectrumKernel polynomial method
caroli_dynamicsSplit-operator, Chebyshev and Magnus time evolution, Torus, DrivenTime evolution
caroli_gpuMetal and CUDA backends of the Chebyshev kernels and of the quantum walks, checked runsReduced precision and the GPU
caroli_walkQuantum walks with spins on the edges of a graphQuantum walks
caroli_cliThe input format of the caroli command and its runsThe 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: CMat is faer::Mat<c64> and c64 is num_complex::Complex<f64>.
  • A method that can fail returns a Result with 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(Σ − Σ†)).