# Overview¶

## Algorithm¶

There are two key ideas that set the SHCI algorithm apart and account for its vastly higher efficiency. SHCI partitions the entire set of determinants in the Hilbert space into two sets, the first that are treated variationally are included in the set *V* and a second set *C* that are connected to the determinants in *V* by a non-zero Hamiltonian matrix element. We use indices *i, j* for determinants in the variational space *V*, and index *a* for determinants in the connected space *C*.

The SHCI algorithm takes advantage of the fact that the 2-body excitation matrix elements depend only on the indices of the 4 orbitals whose occupations are changing and not on the other occupied orbitals [JCTC, 12, 3674]. This allows Dice to use a procedure in which only the important determinants are ever looked at! In addition, the usual SCI-PT algorithm promotes a determinant a to the V space if the criterion \(\frac{\sum_i H_{ai} c_i}{E_0 - H_{aa}} > \epsilon_1\), is satisfied for a user defined parameter \(\epsilon_1\). Instead the SHCI algorithm uses a much simpler criterion in which a determinant

*a*is promoted to*V*if \(|H_{ai}c_i| > \epsilon_1\) for any*i*in*V*. Although using the SHCI criterion is much cheaper, the difference in calculated energies is negligibly small.The above ideas speed up both the variational and the perturbative steps of the algorithm by several orders of magnitude. However, the perturbative step has a large memory requirement because all determinants that are connected to those in

*V*must be stored [JCTC, 13, 1595]. We have developed a semistochastic perturbative approach that both overcomes this memory bottleneck and is faster than the deterministic approach at the cost of having a small statistical error. The resulting semistochastic algorithm has several attractive features:

There is no sign problem that plagues several quantum Monte Carlo methods. Further, instead of using Metropolis-Hastings sampling, we use the Alias method to directly sample determinants from the reference wavefunction, thus avoiding correlations between consecutive samples.

In addition to removing the memory bottleneck, semistochastic HCI (SHCI) is faster than the deterministic variant for many systems if a stochastic error of 0.1 mHa is acceptable.

The SHCI algorithm extends the range of applicability of the original algorithm, allowing us to calculate the correlation energy of large active spaces.

## Features¶

Wavefunction optimization and calculation of one and two reduced density matrices (RDMs) for multireference systems with large active spaces, between 30-100 orbitals. Dice can also calculated the one and two-body relaxed density matrices during the perturbative calculation.

Calculation of excited states.

Exploitation of Abelian, \(D_{\infty h}\), and \(C_{\infty v}\) symmetries.

Active space orbital optimization with the PySCF. When combined with PySCF

*Dice*can also calculate excited states using state averaging.Spin orbit coupling.

## License and how to cite¶

*Dice* is distributed under the GNU GPL license which is reproduced on the top of every source file. We would appreciate if you cite the following papers in publications resulting from the use of *Dice*.

If you use any part of the software package, please cite:

Sharma, A. A. Holmes, G. Jeanmairet, A. Alavi, C. J. Umrigar, “Semistochastic Heat-bath Configuration Interaction method: selected configuration interaction with semistochastic perturbation theory.”

*Journal**of**Chemical**Theory**and**Computations*,**2017**, 13, 1595.

Holmes, N. M. Tubman, C. J. Umrigar, “Heat-Bath Configuration Interaction: An Efficient Selected Configuration Interaction Algorithm Inspired by Heat-Bath Sampling.”

*Journal**of**Chemical**Theory**and**Computations*,**2016**, 12, 3674.

If you use Dice to calculate excited states, please cite:

Holmes, C. J. Umrigar, S. Sharma, “Excited states using semistochastic heat-bath configuration interaction”

*Journal**of**Chemical**Physics*,**2017**, 147, 164111.

If you use Dice to perform relativistic calculations such as S.O.C., please cite:

Mussard, S. Sharma, “One-step treatment of spin-orbit coupling and electron correlation in large active spaces”

*Journal**of**Chemical**Theory**and**Computations*,**2017**, (under review).

If you use Dice in conjunction with PySCF, please cite:

Smith, B. Mussard, A. A. Holmes, S. Sharma, “Cheap and Near Exact CASSCF with Large Active Space”

*Journal**of**Chemical**Theory*and*Computation*,**2017**.