Determinant Quantum Monte Carlo (DQMC)

This is determinant quantum Monte Carlo (MC) also known auxiliary field quantum Monte Carlo. It can be used to simulate interacting fermion systems, here the auxiliary boson arises from a Hubbard Stratonovich transformation, or fermions which are naturally coupled to bosons. An example is the Attractive Hubbard Model.

You can initialize a determinant quantum Monte Carlo simulation of a given model simply through

dqmc = DQMC(model, beta=5.0)

Mandatory keywords are:

  • beta: inverse temperature

Allowed keywords are:

  • delta_tau::Float64 = 0.1: imaginary time step size
  • safe_mult::Int = 10: stabilize Green's function calculations every safe_mult step (How many slice matrices can be multiplied until singular value information is lost due to numerical unaccuracy?)
  • checkerboard::Float64 = false: use Checkerboard decomposition (faster)
  • sweeps: number of measurement sweeps
  • thermalization: number of thermalization (warmup) sweeps
  • seed: initialize DQMC with custom seed
  • all_checks::Bool = true: turn off to suppress some numerical checks

Afterwards, you can run the simulation by

run!(dqmc)

Technical details

Symmetric Suzuki-Trotter decomposition

We use the symmetric version of the Suzuki-Trotter decomposition, i.e.

\begin{align} e^{-\Delta\tau \suml T+V(l)} = \prodj e^{-\Delta\tau T/2} e^{-\Delta\tau V} e^{-\Delta\tau T/2} + \mathcal{O}(\Delta\tau^2) \end{align}

where $T$ is the hopping matrix and $V(l)$ is the interaction matrix with $l$ an imaginary time slice index indicating an auxiliary field dependence.

With the imaginary time slice matrices $B_l = e^{-\Delta\tau T/2} e^{-\Delta\tau V(l)} e^{-\Delta\tau T/2}$ the equal-time Green's function is $G = \left( 1 + B_M \cdots B_1 \right)^{-1}$.

Checkerboard decomposition

We provide a general algorithm to construct the "checkerboard" split up of a generic AbstractLattice. The only requirement is that the AbstractLattice has the following two fields,

  • n_bonds::Int: total number of bonds (lattice graph edges)
  • bonds::Matrix{Int}: bond matrix of shape (n_bonds, 3). Rows correspond to bonds and columns indicate source site, target site, and bond type in this order.

Of course, one can also manually construct a (more efficient) checkerboard split up by overloading the following function for the specific AbstractLattice subtype.

MonteCarlo.build_checkerboardMethod
build_checkerboard(l::Lattice)

Generates a collection of groups containing (src, trg) pairs where each group only touches each site (src or trg) once. Each group also represents only one bond direction, though multiple groups can represent the same direction. Bond reversals (i.e. trg -> src relative to src -> trg) are not considered here, as they are always present.

Returns groups in a nested structure groups[idx1][idx2][idx3], where idx1 picks the bond direction, idx2 a subset with non-overlapping sites and idx3 the individual site pairs involved in a bond.

source

Effective slice matrices and Green's function

Combining the symmetric Suzuki-Trotter and checkerboard decomposition we can write (assuming two checkerboard groups $a$ and $b$)

\begin{align} e^{-\Delta\tau \suml T+V(l)} &= e^{\Delta\tau Ta/2} e^{\Delta\tau Tb/2} \\ &\times \left( \prodj e^{-\Delta\tau Tb/2} e^{-\Delta\tau Ta} e^{-\Delta\tau Tb/2} e^{-\Delta\tau V} \right) e^{-\Delta\tau Tb/2} e^{-\Delta\tau T_a/2} + \mathcal{O}(\Delta\tau^2) \end{align}

For performance resons we internally work with effective imaginary time slice matrices

\[B_l^{\text{eff}} = e^{-\Delta\tau T_b/2} e^{-\Delta\tau T_a} e^{-\Delta\tau T_b/2} e^{-\Delta\tau V}\]

instead of the original $B_l$s above.

Warning

Note that one consequence is that the field dqmc.s.greens isn't the actual Green's function but an effective one defined by \begin{align} G &= \left( 1 + BM \cdots B1 \right)^{-1} \\ &= e^{\Delta\tau Ta/2} e^{\Delta\tau Tb/2} \left( 1 + B^{\text{eff}}M \cdots B^{\text{eff}}1 \right)^{-1} e^{-\Delta\tau Tb/2} e^{-\Delta\tau Ta/2} \\ &= e^{\Delta\tau Ta/2} e^{\Delta\tau Tb/2} G^{\text{eff}} e^{-\Delta\tau Tb/2} e^{-\Delta\tau Ta/2} \end{align}

To obtain the actual equal-times Green's function, for example for measuring, use greens(dqmc::DQMC). Note that although $G\overset{!}{=}G^\text{eff}$} one can readily show that $\det G = \det G^{\text{eff}}$ holds and the Metropolis acceptance is not affected by switching to the effective matrices.

Exports

MonteCarlo.replay!Function
replay(mc::DQMC[; configurations::Iterable = mc.recorder; kwargs...])

Replays previously generated configurations and measures observables along the way.

Keyword Arguments (both):

  • verbose = true: If true, print progress messaged to stdout.
  • safe_every::TimePeriod: Set the interval for regularly scheduled saves.
  • safe_before::Date: If this date is passed, replay! will generate a

resumable save file and exit

  • grace_period = Minute(5): Buffer between the current time and safe_before.

The time required to generate a save file should be included here.

  • filename: Name of the save file. The default is based on safe_before.
  • start=1: The first sweep in the simulation. This will be changed when using

resume!(save_file).

  • ignore: A collection of measurement keys to ignore. Defaults to the key of

the configuration measurement.

  • measure_rate = 1: Rate at which measurements are taken. Note that this is

based on the recorded configurations, not actual sweeps.

source
MonteCarlo.run!Method
run!(mc::DQMC[; kwargs...])

Runs the given Monte Carlo simulation mc. Returns SUCCESS::ExitCode = 0 if the simulation finished normally or various other codes if failed or cancelled. See ExitCode.

Keyword Arguments:

  • verbose = true: If true, print progress messaged to stdout.
  • thermalization: Number of thermalization sweeps. Uses the value passed to

DQMC by default.

  • sweeps: Number of measurement sweeps. Uses the value passed to DQMC by

default.

  • safe_every::TimePeriod: Set the interval for regularly scheduled saves.
  • safe_before::Date: If this date is passed, run! will generate a resumable

save file and exit

  • grace_period = Minute(5): Buffer between the current time and safe_before.

The time required to generate a save file should be included here.

  • resumable_filename: Name of the resumable save file. The default is based on

safe_before.

  • overwrite = false: If set to true a file with the same name as

resumable_filename will be overwritten. (This will create a temporary backup)

See also: resume!

source
MonteCarlo.DQMCMethod
DQMC(m::M, params::Dict)
DQMC(m::M, params::NamedTuple)

Create a determinant quantum Monte Carlo simulation for model m with (keyword) parameters as specified in the dictionary/named tuple params.

source
MonteCarlo.DQMCMethod
DQMC(m::M; kwargs...) where M<:Model

Create a determinant quantum Monte Carlo simulation for model m with keyword parameters kwargs.

Keyword Arguments:

  • seed: The random seed used by the simulation.
  • checkerboard=false: If true, the simulation uses a generic checkerboard

decomposition.

  • thermalization_measurements::Dict{Symbol, AbstractMeasurement}: A collection

of measurements run during the thermalization stage. By default, none are used.

  • measurements::Dict{Symbol, AbstractMeasurement}: A collection of measurements

run during the measurement stage. Calls default_measurements if not specified.

  • recorder = ConfigRecorder: Type of recorder used for saving configurations

generated during the simulation. Used (by default) when replay!ing simulations. (Discarder or ConfigRecorder)

  • recording_rate = measure_rate: Rate at which configurations are recorded.
  • thermalization = 100: Number of thermalization sweeps
  • sweeps: Number of measurement sweeps
  • all_checks = true: Check for Propagation instabilities and sign problems.
  • safe_mult = 10: Number of "safe" matrix multiplications. Every safe_mult

multiplications, a UDT decomposition is used to stabilize the product.

  • delta_tau = 0.1: Time discretization of the path integral
  • beta::Float64: Inverse temperature used in the simulation
  • slices::Int = beta / delta_tau: Number of imaginary time slice in the

simulation

  • measure_rate = 10: Number of sweeps discarded between every measurement.
  • last_sweep = 0: Sets the index of the last finished sweep. The simulation

will start with sweep last_sweep + 1.

source

Potential extensions

Pull requests are very much welcome!

  • todo