Skip to content

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.

Algebra

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\)
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

Algorithms

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_lanczos Performs an iterative eigenvalue calculation using the Lanczos algorithm
eigs_lanczos Performs an iterative eigenvalue calculation building eigenvectors using the Lanczos 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 a 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

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 a Electron 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)

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

Input / Output

TOML

Name Description Language
FileToml A file handler for TOML files
read_opsum reads an OpSum from a TOML file
read_permutation_group reads a PermutationGroup from a TOML file
read_representation reads a Representation from a TOML file

HDF5

Name Description Language
FileH5 A file handler for hdf5 files

Operators

Operator types A summary of all the operator types defined in XDiag
Name Description Language
Op A linear operator acting on the Hilbert space
OpSum Sum of couplings times operators
hc Returns the hermitian conjugate of an Op or OpSum.
symmetrize Symmetrizes an operator with a PermutationGroup or Representation

States

Name Description Language
State A generic state describing a quantum wave function
ProductState A product state of local configurations
RandomState A random state with normal distributed coefficients
fill Fill a state with a given model state
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

Symmetries

Name Description Language
Permutation Permutations of indices or lattice sites
PermutationGroup A group of permutations
Representation A (1D) irreducible representation of a finite group

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 Measurng wall time straightforwardly
XDIAG_SHOW Macro for printing debugging information