Estimators#

The results of a SAFIRE calculation are obtained by performing stochastic measurements on the Auxiliary-Field Quantum Monte Carlo random walk. For this purpose SAFIRE implements different estimators.

Estimators are enabled, disabled, and configured in the estimators block of the job file. Their measurement results are written to the Results File. Refer to these sections for details on the input and output and the Tutorials and Examples for practical use cases. On this page, we will instead describe the behavior of each estimator and the definitions of the observables that can be measured.

Each estimator uses the trial wavefunction \(\Psi_\mathrm{T}\) and Hamiltonian \(H\) of its execute block, unless it names different ones with its own wavefunction and hamiltonian entries.

Energy Estimator#

The energy estimator is the only estimator that is enabled by default. It measures the local energy

(6)#\[E = \frac{\langle \Psi_\mathrm{T} | H | \Psi(\tau) \rangle}{\langle \Psi_\mathrm{T} | \Psi(\tau) \rangle} \approx \frac{1}{\sum_n W_n(\tau)} \sum_n W_n(\tau) \frac{\langle \Psi_\mathrm{T} | H | \Phi_n(\tau) \rangle}{\langle \Psi_\mathrm{T} | \Phi_n(\tau) \rangle},\]

of the walkers and its components for a given Hamiltonian \(H\) and trial wavefunction \(\Psi_\mathrm{T}\), where \(|\Phi_n(\tau)\rangle\) are the walkers at imaginary time \(\tau\) and \(W_n(\tau)\) their weights.

Observable

Description

Energy

The total local energy \(E\), the sum of the three components below.

OnebodyEnergy

The one-body part of the local energy. It also includes the constant energy offset of the Hamiltonian.

CoulombEnergy

The direct (Hartree) part of the two-body local energy.

ExchangeEnergy

The exchange part of the two-body local energy.

ProjectionTime

The imaginary time \(\tau\) of the measurement, counted from the start of the execution stage: \(\tau = s\Delta\tau\) after \(s\) propagation steps. Useful for plotting time series.

Note

Since the one and two-body terms of the Hamiltonian generally do not commute, the OnebodyEnergy, CoulombEnergy and ExchangeEnergy component estimators carry a mixed-estimator bias that the total energy does not. See Mixed Estimator.

Additionally, the following diagnostic observables are available.

Observable

Description

Overlap

The weighted average \(\sum_n W_n(\tau) \langle \Psi_\mathrm{T} | \Phi_n(\tau) \rangle / \sum_n W_n(\tau)\) of the walker overlaps with the trial wavefunction. Reset by reorthogonalization.

TotalWeight

The total walker weight \(\sum_n W_n(\tau)\).

Phase

The average phase \(\sum_n W_n(\tau) / \sum_n |W_n(\tau)|\) of the walker weights. A magnitude well below one signals a phase problem. As long as a constraint is active, this is one.

EffectiveNumWalkers

The effective number of walkers \(\left(\sum_n |W_n(\tau)|\right)^2 / \sum_n |W_n(\tau)|^2\), which equals the number of walkers for uniform weights and drops as the weights spread out.

Mixed Estimator#

SAFIRE implements more general mixed estimators,

\[\langle O \rangle_\mathrm{Mixed} = \frac{1}{\sum_n W_n(\tau)} \sum_n W_n(\tau) \frac{\langle \Psi_\mathrm{T} | O | \Phi_n(\tau) \rangle }{\langle \Psi_\mathrm{T} | \Phi_n(\tau) \rangle},\]

where \(O\) is one of several Observables described below.

In the output file, all mixed observables are saved under a MixedEstimator/ prefix.

Mixed Estimator Bias#

Because the mixed estimator is based on a one-sided projection, even if the walker ensemble exactly represents the ground-state wavefunction, the mixed average will generally not match the true ground-state average. This bias vanishes only when \([O,H] = 0\), such as for the total energy, \(O=H\), or when \(O\) represents a symmetry of the Hamiltonian. The latter property means that mixed averages — despite being numerically biased — can still be used to detect the symmetry sector of the ground state.

The mixed estimator bias can be mitigated by using the back-propagation estimator described in the next section.

Back-Propagation Estimator#

The Back-Propagation (BP) estimator [12, 13] replaces the one-sided projection of the mixed estimator by a two-sided projection of the form

\[\langle O \rangle_\mathrm{BP} = \frac{1}{\sum_n W_n(\tau+\tau_\mathrm{BP})} \sum_n W_n(\tau+\tau_\mathrm{BP}) \frac{\langle \tilde{\Phi}_n(\tau_\mathrm{BP}) | O | \Phi_n(\tau) \rangle }{\langle \tilde{\Phi}_n(\tau_\mathrm{BP}) |\Phi_n(\tau)\rangle}\]

where \(| \Phi_n(\tau) \rangle\) are the usual forward-projected Slater determinant random walkers, and \(| \tilde{\Phi}_n(\tau_\mathrm{BP}) \rangle\) are the back-propagated walkers given by,

\[| \tilde{\Phi}_n(\tau_\mathrm{BP}) \rangle = B^\dagger\big( x_n(\tau)\big) \cdots B^\dagger\big(x_n(\tau+\tau_\mathrm{BP}-\Delta\tau) \big) | \Psi_\mathrm{T} \rangle.\]

Here \(\tau\) is the imaginary time of the forward walkers, and \(\tau_\mathrm{BP} = m_\mathrm{BP}\Delta\tau\) is the back-propagation time over \(m_\mathrm{BP}\) steps. We note that each random walker has a corresponding back-propagated partner which shares the same path in auxiliary-field space.

Path Restoration#

In every propagation step, the phaseless approximation (see Auxiliary-Field Quantum Monte Carlo) multiplies the walker weights by the cosine projection factor \(\max\{0, \cos\Delta\theta\}\) and keeps only the magnitude of the local energy factor \(e^{-\Delta\tau (E_\mathrm{L} - E_\mathrm{shift})}\). Along the back-propagation path, both modifications bias the back-propagated observables. With path_restoration, which is enabled by default, the weights \(W_n(\tau+\tau_\mathrm{BP})\) in the back-propagated average are multiplied by

\[\prod_{\tau'} \frac{e^{-i \Delta\tau \, \mathrm{Im} E_{\mathrm{L},n}(\tau')}}{\max\{0, \cos\Delta\theta_n(\tau')\}},\]

with the product running over the \(m_\mathrm{BP}\) steps \(\tau' = \tau, \dots, \tau + \tau_\mathrm{BP} - \Delta\tau\) of the back-propagation path. This restores the phase of the local energy factor and undoes the cosine projection [13]. A walker whose weight the projection has set to zero keeps a zero weight. extra_path_restoration extends the product to the \(2 m_\mathrm{BP}\) steps \(\tau' = \tau - \tau_\mathrm{BP}, \dots, \tau + \tau_\mathrm{BP} - \Delta\tau\), so that it also covers the \(m_\mathrm{BP}\) steps before the forward walkers \(|\Phi_n(\tau)\rangle\).

Back-Propagation Lengths#

The result of the back-propagation estimator depends on the correct choice of the back-propagation length. Short back-propagation lengths will approach the mixed estimator while setting the length too long is costly. Therefore, it is advisable to calculate multiple back-propagation lengths at the same time and check their convergence. SAFIRE supports calculating multiple lengths in a single calculation (see backprop). The longest back-propagation length of a simulation simultaneously acts as the measurement interval of the estimator.

In the output file, all back-propagated observables are saved under a BackPropEstimator/Steps=<m_BP>/ prefix.

Observables#

Mixed and back-propagated estimators share a set of general observables they can measure. Here we give the definition of each of them. The most important observables are the one- and two-body reduced density matrices OneRDM, DiagonalTwoRDM, and TwoRDM from which all one-body and two-body properties can be calculated. Additional, more specialized observables are defined for subclasses of systems that can be simulated with SAFIRE.

Below, \(\langle \cdot \rangle\) is the mixed or back-propagated average of the estimator measuring the observable. The orbital indices \(i, j, k, l\) run over the \(M\) orbitals of the Hamiltonian and \(\sigma, \sigma'\) over the spins. For noncollinear walkers, spin and orbital are combined into a single spin-orbital index \(\sigma M + i\) with \(\uparrow = 0\) and \(\downarrow = 1\).

Every observable can be measured with any Hamiltonian. The wavefunctions and walker spin symmetries it supports are listed with each one.

OneRDM: One-Body Reduced Density Matrix#

Computes the spin blocks of the one-particle reduced density matrix,

\[\mathtt{OneRDM}[s, i, j] = \langle c^\dagger_{i\sigma} c_{j\sigma} \rangle,\]

where \(s = 0\) is \(\sigma = \uparrow\) and \(s = 1\) is \(\sigma = \downarrow\). Closed walkers store only the \(\uparrow\) block, which equals the \(\downarrow\) block. Noncollinear walkers store a single block over spin-orbitals that includes the spin-flip elements, \(\mathtt{OneRDM}[0, \sigma M + i, \sigma' M + j] = \langle c^\dagger_{i\sigma} c_{j\sigma'} \rangle\).

If a RotationMatrix \(R\) is given, the density matrix is measured in the rotated basis \(d_{s,a} = \sum_i R_{s,a,i} c_{i\sigma}\),

\[\mathtt{OneRDM}[s, a, b] = \langle d^\dagger_{s,a} d_{s,b} \rangle = \sum_{ij} R^*_{s,a,i} R_{s,b,j} \langle c^\dagger_{i\sigma} c_{j\sigma} \rangle.\]

For noncollinear walkers, the sums run over all \(2M\) spin-orbitals, so the rotation can mix the spins.

Compatibility#

Wavefunctions

Spin Symmetry

NOMSD

closed, collinear, noncollinear

PHMSD

collinear

TwoRDM: Two-Body Reduced Density Matrix#

Calculates the full two-particle reduced density matrix,

\[\mathtt{TwoRDM}[b, i, k, j, l] = \langle c^\dagger_{i\sigma} c^\dagger_{j\sigma'} c_{l\sigma'} c_{k\sigma} \rangle,\]

where the spin block \(b = 0, 1, 2\) is \(\sigma\sigma' = {\uparrow\uparrow}, {\uparrow\downarrow}, {\downarrow\downarrow}\). Note the index order: the pair \((i, k)\) belongs to spin \(\sigma\) and \((j, l)\) to \(\sigma'\). The \({\downarrow\uparrow}\) block follows from \(\langle c^\dagger_{i\downarrow} c^\dagger_{j\uparrow} c_{l\uparrow} c_{k\downarrow} \rangle = \mathtt{TwoRDM}[1, j, l, i, k]\). Closed walkers omit the \({\downarrow\downarrow}\) block, which equals the \({\uparrow\uparrow}\) block, so only \(b = 0, 1\) are stored.

Caution

Computing and storing the full 2-RDM can be very memory intensive and greatly increases the run time. Use only when absolutely necessary, and restrict to small systems.

Compatibility#

Wavefunctions

Spin Symmetry

NOMSD

closed, collinear

PHMSD

collinear

DiagonalTwoRDM: Diagonal Two-Body Reduced Density Matrix#

Computes the diagonal elements of the two-particle reduced density matrix (2-RDM),

\[D^{\sigma\sigma'}_{ij} = \langle c^\dagger_{i\sigma} c^\dagger_{j\sigma'} c_{j\sigma'} c_{i\sigma} \rangle = \langle n_{i\sigma} n_{j\sigma'} \rangle - \delta_{ij} \delta_{\sigma\sigma'} \langle n_{i\sigma} \rangle.\]

The same-spin blocks are symmetric, \(D^{\sigma\sigma}_{ij} = D^{\sigma\sigma}_{ji}\), and vanish for \(i = j\), so only their symmetrized upper triangle \(i < j\) is stored. The \({\uparrow\downarrow}\) block is stored whole. DiagonalTwoRDM is a flat array that holds, for collinear and closed walkers,

  1. for each \(i = 0, \dots, M-1\) in turn: \(D^{\uparrow\uparrow}_{ij}\) for \(j = i+1, \dots, M-1\), followed by \(D^{\uparrow\downarrow}_{ij}\) for \(j = 0, \dots, M-1\),

  2. then, for collinear walkers only, \(D^{\downarrow\downarrow}_{ij}\) for \(i < j\), row by row.

Closed walkers omit the \({\downarrow\downarrow}\) block, which equals the \({\uparrow\uparrow}\) block. Noncollinear walkers have a single block over spin-orbitals, \(D_{pq} = \langle c^\dagger_p c^\dagger_q c_q c_p \rangle\) with \(p, q = 0, \dots, 2M-1\), which is stored as its upper triangle \(p < q\), row by row.

Compatibility#

Wavefunctions

Spin Symmetry

NOMSD

closed, collinear, noncollinear

PHMSD

collinear

SpinCorr: Spin-Spin Correlation#

Computes the spin-spin correlation function \(\langle \vec{S}_i \cdot \vec{S}_j \rangle\), where

\[\vec{S}_i = \frac{1}{2} \sum_{\sigma,\sigma'} c_{i\sigma}^\dagger \vec{\sigma}_{\sigma\sigma'} c_{i\sigma'},\]

split into the XY and the Z channel,

\[\begin{split}\mathtt{SpinCorr}[0, n] &= \langle S^x_i S^x_j + S^y_i S^y_j \rangle = \frac{1}{2} \langle S^+_i S^-_j + S^-_i S^+_j \rangle, \\ \mathtt{SpinCorr}[1, n] &= \langle S^z_i S^z_j \rangle,\end{split}\]

so that \(\langle \vec{S}_i \cdot \vec{S}_j \rangle = \mathtt{SpinCorr}[0, n] + \mathtt{SpinCorr}[1, n]\). Since the correlation is symmetric in \(i\) and \(j\), only the upper triangle \(i \le j\) is stored, row by row, at \(n = iM - i(i-1)/2 + j - i\).

Compatibility#

Wavefunctions

Spin Symmetry

NOMSD

closed, collinear, noncollinear

PHMSD

collinear

PairCorr: Pair Correlation Functions#

Important

Pair correlation functions are an experimental feature.

Calculates singlet pair correlation functions

\[\mathtt{PairCorr/}\alpha\mathtt{\_}\beta[i, j] = \langle \Delta^\dagger_{i,\alpha} \Delta_{j,\beta} \rangle\]

between the pair creation and annihilation operators

\[\Delta^\dagger_{i,\alpha} = \frac{1}{\sqrt{2}} \left(c^{\dagger}_{i\uparrow} c^{\dagger}_{\bar{i}_\alpha \downarrow} - c^{\dagger}_{i\downarrow} c^{\dagger}_{\bar{i}_\alpha \uparrow} \right), \qquad \Delta_{j,\beta} = \frac{1}{\sqrt{2}} \left( c_{\bar{j}_\beta\downarrow} c_{j \uparrow} - c_{\bar{j}_\beta \uparrow} c_{j \downarrow} \right).\]

Here \(\alpha\) and \(\beta\) are pair maps that assign every orbital \(i\) a partner orbital \(\bar{i}_\alpha\). On a lattice, a pair map typically pairs each site with its neighbor at a fixed offset such as \(+x\), and the pair map \(\bar{i}_\alpha = i\) gives on-site (s-wave) pairs.

The pair maps are read from the HDF5 file and group given by the pairs entry of the paircorr input block.

pairs.h5

  • <group>/

    • <α> \((M, 1)\)

    • <β> \((M, 1)\)

    • …

Entry

Description

<α>

One pair map, named freely: the partner orbital \(\bar{i}_\alpha\) of each orbital \(i\), integers. A negative entry means \(i\) has no partner, which leaves the corresponding row and column of the correlation function zero.

Every ordered pair of maps \((\alpha, \beta)\) is measured and stored as its own \((M, M)\) array PairCorr/<α>_<β>.

For collinear walkers, only the elements \(i < j\) are measured, and the diagonal and lower triangle are zero. Noncollinear walkers measure all \(i, j\).

Compatibility#

Wavefunctions

Spin Symmetry

NOMSD

collinear, noncollinear

PHMSD

collinear

Pair correlation functions are most useful for lattice models, but they can be measured with any Hamiltonian for which pair maps are provided.