Skip to content

User Guide

This user guide is a hands-on, step-by-step introduction to XDiag that takes you from a fresh installation all the way to running your own exact diagonalization calculations. Each section introduces one core concept and demonstrates it with parallel Julia and C++ code examples, so you can follow along in whichever language you prefer.

The guide is organized to mirror a typical workflow. We start with installation and setting up an application, then cover the fundamental building blocks of a quantum many-body problem — Hilbert spaces, Operators, and States. Building on these, we turn to the numerical linear algebra at the heart of XDiag: dense and iterative diagonalization, time evolution, and measurements. The remaining sections deal with input/output, the use of symmetries, and advanced topics such as sparse matrices and distributed-memory computing.

For a complete reference of every function and object, see the Documentation; for fully worked applications, see the Examples.

Getting started

  • Installation


    Installation and compilation of the XDiag core library

    Read more

  • Application code


    How to set up your application code using Julia or C++

    Read more

Basic quantum mechanics

  • Hilbert spaces


    How to define a Hilbert space of fermions, bosons, or spins.

    Read more

  • Operators


    How to define operators and perform algebraic operations with them.

    Read more

  • States


    How to define a quantum state and act on it with operators

    Read more

Linear Algebra

  • Dense matrices


    How to compute a dense matrix representation of an operator and perform a full diagonalization

    Read more

  • Diagonalization


    How to perform a diagonalization using iterative numerical algorithms

    Read more

  • Time evolution


    How to evolve a state in real or imaginary time

    Read more

  • Measurements


    How to compute expectation values of observables

    Read more

Input / Output

  • Input / Output


    Reading and writing to TOML and hdf5 files.

    Read more

Symmetries

  • Symmetries


    How to work with symmetries and symmetry-adapted bases

    Read more

Advanced topics

  • Sparse matrices


    How to create sparse matrices and use them in iterative algorithms

    Read more

  • Distributed computing


    How to use the distributed XDiag library for distributed memory computing

    Read more