Documentation
XDiag uses the C++ library Armadillo as a linear algebra backend. Documentation for linear algebra operations can, therefore, be found in the Armadillo Documentation .
The documentation is organized following the source tree of XDiag: every subdirectory of xdiag/ defines a category below.
Blocks
Shared memory
Name
Description
Language
Spinhalf
Block of a spin \(S=1/2\) type Hilbert space
tJ
Block of a \(t-J\) type Hilbert space
Electron
Block of an Electron type Hilbert space
Boson
Block of a boson (or general spin-\(S\) ) type Hilbert space
Fermion
Block of a spinless fermion type Hilbert space
Distributed memory
Name
Description
Language
SpinhalfDistributed
Block of a spin \(S=1/2\) type Hilbert space (distributed computing)
tJDistributed
Block of a \(t-J\) type Hilbert space (distributed computing)
ElectronDistributed
Block of an Electron type Hilbert space (distributed computing)
Operators
Name
Description
Language
Op
A linear operator acting on the Hilbert space
OpSum
Sums and products of couplings times operators
hc
Returns the hermitian conjugate of an Op or OpSum
Operator types
A summary of all the operator types defined in XDiag
States
Name
Description
Language
State
A generic state describing a quantum wave function
product_state
Creates a filled product state
random_state
Create a filled random state with normal distributed coefficients
zero_state
Create a filled state with all zero entries
zero
Set all coefficients of a given state to zero
dot
Computes the dot product between two states
inner
Computes an expectation value \(\langle \psi \vert O \vert \psi \rangle\)
norm
Computes the 2-norm of a state
norm1
Computes the 1-norm of a state
norminf
Computes the \(\infty\) -norm of a state
expect
Expectation value of a single-site operator on every site
correlation_matrix
Two-point correlations between all pairs of sites
Algebra
Kernels
Name
Description
Language
matrix
Creates the full matrix representation of an operator on a block
apply
Applies an operator to a state \(\vert \phi \rangle = O \vert \psi\rangle\)
Sparse matrices
Name
Description
Language
Sparse matrix types
Explanation of different sparse matrix types and their use
coo_matrix
Creates the sparse matrix of an operator in the coordinate (COO) format
csr_matrix
Creates the sparse matrix of an operator in the compressed-sparse-row (CSR) format
csc_matrix
Creates the sparse matrix of an operator in the compressed-sparse-column (CSC) format
apply
Sparse matrix-vector (and sparse matrix-matrix) multiplication with CSR matrices
Linear Algebra
Diagonalization
Name
Description
Language
eigval0
Computes the lowest lying eigenvalue of an operator
eig0
Computes the lowest lying eigenvalue and eigenvector of an operator
eigvals
Computes several of the lowest eigenvalues using the LOBPCG algorithm
eigs
Computes several of the lowest eigenvalues and eigenvectors using the LOBPCG algorithm
eigvals_lanczos
Performs an iterative eigenvalue calculation using the Lanczos algorithm
eigs_lanczos
Performs an iterative eigenvalue calculation building eigenvectors using the Lanczos algorithm
eigs_lobpcg
Computes several of the lowest eigenpairs with full control using the LOBPCG algorithm
Time evolution
Name
Description
Language
time_evolve
Performs a real-time evolution \(e^{ -iHt} \vert \psi \rangle\) of a State with a given Hermitian operator \(H\)
imaginary_time_evolve
Performs an imaginary-time evolution \(e^{ -\tau H}\vert\psi\rangle\) of a State with a given Hermitian operator \(H\)
evolve_lanczos
Computes the exponential $e^{z H}\vert\psi\rangle $ of a Hermitian operator times a State for a real or complex \(z\) using the Lanczos algorithm
time_evolve_expokit
Performs a real-time evolution \(e^{ -iHt} \vert \psi \rangle\) using a highly accurate Lanczos algorithm
TOML
HDF5
Name
Description
Language
FileH5
A file handler for hdf5 files
Symmetries
Utilities
Name
Description
Language
set_verbosity
Sets how much information is printed during computations
say_hello
Prints a nice welcome message with version number
print_version
Prints the plain version number
Logging
Controling what is written to standard output
Timing
Measuring wall time straightforwardly
XDIAG_SHOW
Macro for printing debugging information
Building
Name
Description
Language
Compilation
Advanced settings for compilation of the C++ library using CMake
Documentation
How to build and work on the documentation locally
Julia Wrapper
How to build and develop the Julia wrapper locally