# Continuous-time quantum Monte Carlo

In computational solid state physics, Continuous-time quantum Monte Carlo (CT-QMC) is a family of stochastic algorithms for solving the Anderson impurity model at finite temperature. These methods first expand the full partition function as a series of Feynman diagrams, employ Wick's theorem to group diagrams into determinants, and finally use Markov chain Monte Carlo to stochastically sum up the resulting series.
The attribute continuous-time was introduced to distinguish the method from the then-predominant Hirsch–Fye quantum Monte Carlo method, which relies on a Suzuki–Trotter discretisation of the imaginary time axis.
If the sign problem is absent, the method can also be used to solve lattice models such as the Hubbard model at half filling. To distinguish it from other Monte Carlo methods for such systems that also work in continuous time, the method is then usually referred to as Diagrammatic determinantal quantum Monte Carlo (DDQMC or DDMC).

## Partition function expansion

In second quantisation, the Hamiltonian of the Anderson impurity model reads:
    $H=\underbrace {\sum _{ij}E_{ij}c_{i}^{\dagger }c_{j}} _{H_{\mathrm {loc0} }}+\underbrace {{\frac {1}{2}}\sum _{ijkl}U_{ikjl}c_{i}^{\dagger }c_{j}^{\dagger }c_{l}c_{k}} _{H_{\mathrm {int} }}+\underbrace {\sum _{p,i}{\bigV_{pi}f_{p}^{\dagger }c_{i}+V_{pi}^{*}c_{i}^{\dagger }f_{p}{\big )}} _{H_{\mathrm {hyb} }}+\underbrace {\sum _{p}\epsilon _{p}f_{p}^{\dagger }f_{p}} _{H_{\mathrm {bath} }}$,
where $c_{i}^{\dagger }$ and $c_{i}$ are the creation and annihilation operators, respectively, of a fermion on the impurity. The index $i$ collects the spin index and possibly other quantum numbers such as orbital (in the case of a multi-orbital impurity) and cluster site (in the case of multi-site impurity). $f_{p}^{\dagger }$ and $f_{p}$ are the corresponding fermion operators on the non-interacting bath, where the bath quantum number $p$ will typically be continuous.
Step 1 of CT-QMC is to split the Hamiltonian into an exactly solvable term, $H_{0}$, and the rest, $H_{\mathrm {I} }$. Different choices correspond to different expansions and thus different algorithmic descriptions. Common choices are:
* Interaction expansion (CT-INT): $H_{\mathrm {I} }=H_{\mathrm {int} }$
* Hybridization expansion (CT-HYB): $H_{\mathrm {I} }=H_{\mathrm {hyb} }$
* Auxiliary field expansion (CT-AUX): like CT-INT, but the interaction term is first decoupled using a discrete Hubbard-Stratonovich transformation
Step 2 is to switch to the interaction picture and expand the partition function in terms of a Dyson series:
    $Z=\operatorname {tr} \left(\mathrm {e} ^{-\beta H}\right)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{n!}}\int _{0}^{\beta }\mathrm {d} ^{n}\tau \;\operatorname {tr} \left[\mathrm {e} ^{-\beta H_{0}}T_{\tau }H_{\mathrm {I} }(\tau _{1})H_{\mathrm {I} }(\tau _{2})\cdots H_{\mathrm {I} }(\tau _{n})\right]$,
where $\beta$ is the inverse temperature and $T_{\tau }$ denotes imaginary time ordering. The presence of a (zero-dimensional) lattice regularises the series and the finite size and temperature of the system makes renormalisation unnecessary.
The Dyson series generates a factorial number of identical diagrams per order, which makes sampling more difficult and possibly worsen the sign problem. Thus, as step 3, one uses Wick's theorem to group identical diagrams into determinants. This leads to the expressions:
* Interaction expansion (CT-INT):
    $Z=\sum _{n=0}^{\infty }\prod _{\alpha =1}^{n}\sum _{i_{\alpha }j_{\alpha }k_{\alpha }l_{\alpha }}\int \mathrm {d} \tau _{\alpha }\left(-{\frac {1}{2}}U_{i_{\alpha }k_{\alpha }j_{\alpha }l_{\alpha }}\right)\det \left[{\begin{array}{cc}\langle T_{\tau }c_{i_{\alpha }}^{\dagger }\!(\tau _{\alpha })\ c_{k_{\beta }}\!(\tau _{\beta })\rangle _{0}&\langle T_{\tau }c_{i_{\alpha }}^{\dagger }\!(\tau _{\alpha })\ c_{l_{\beta }}\!(\tau _{\beta })\rangle _{0}\\\langle T_{\tau }c_{j_{\alpha }}^{\dagger }\!(\tau _{\alpha })\ c_{k_{\beta }}\!(\tau _{\beta })\rangle _{0}&\langle T_{\tau }c_{j_{\alpha }}^{\dagger }\!(\tau _{\alpha })\ c_{l_{\beta }}\!(\tau _{\beta })\rangle _{0}\end{array}}\right]_{\alpha \beta }$
* Hybridisation expansion (CT-HYB):
    $Z=\sum _{n=0}^{\infty }\prod _{\alpha =1}^{n}\sum _{i_{\alpha }j_{\alpha }}\int \mathrm {d} \tau _{\alpha }\mathrm {d} \tau _{\alpha }^{\prime }\operatorname {tr} {\Big\mathrm {e} ^{-\beta (H_{\mathrm {loc0} }+H_{\mathrm {int} })}T_{\tau }\prod _{\alpha =1}^{n}c_{i_{\alpha }}^{\dagger }(\tau _{\alpha })c_{i_{\alpha }}(\tau _{\alpha }^{\prime }){\Big ]}\;\det {\big\Delta _{i_{\alpha }j_{\beta }}(\tau _{\alpha }-\tau _{\beta }^{\prime }){\big ]}_{\alpha \beta }$
In a final step, one notes that this is nothing but an integral over a large domain and performs it using a Monte Carlo method, usually the Metropolis–Hastings algorithm.