Here are extra notes/elaborations about the types in the C++ foundations binded to python high level programming interface in PyCI
reference 1: __init__.py
reference 2: binding.cpp
PyCI have bindings to the following C++ function and classes
from pyci._pyci import __version__, c_long, c_ulong, c_double
from pyci._pyci import secondquant_op, wavefunction, one_spin_wfn, two_spin_wfn
from pyci._pyci import doci_wfn, fullci_wfn, genci_wfn, sparse_op
from pyci._pyci import get_num_threads, set_num_threads, popcnt, ctz
from pyci._pyci import compute_overlap, compute_rdms, compute_transition_rdms,compute_rdms_1234
from pyci._pyci import add_hci, compute_enpt2
__version__m.attr("__version__") = PYCI_VERSION;
just the version number as a string
c_long, c_ulong, c_doublepython bindings for C++ primitive types
secondquant_op (SQuantOp)Also called a Hamiltonian.
in .h file
.cpp file with methods
in docs website
Second-quantized operator class.
For arbitrary-seniority systems:
For seniority-zero systems:
where
w_{pq} = 2 \left - \left = 2 * g_{pqpq} - g_
Class for a Second-quantized operator, comes with a read from file constructor, deep copy construtor, building from just array objects constructor, and a to_file() method.
Houses the arrays for one molecular integrals, two molecular integrals, and h, v, and w tensors.
wavefunction (Wfn)in .h file
.cpp file with methods
in docs website
Base abstract class for a wave function.
Have some long fields that defines:
AlignedVector<ulong> dets; for determinants, and a HashMap<Hash, long> dict; for mapping to the determinants. All of its subclasses in PyCI just utilizes these fields.Its subclass hierachy is as follows:
sparse_op (SparseOp)Represents a sparse matrix operator.
Usually built from a hamiltonian (a secondquant_op) and a wave function object feeding into its constructor.
Its solve() (solve_ci() in C++) method is the main featured working component of this package, where it solve the configuration interaction defined by the hamiltonian and wave function by solving for the algebraically lowest (most negative) eigenvalue, i.e. the ground state energy of the matrix using spectra.
The titular sparse matrix is stored as 3 C++ vector<T> arrays in the Compressed Sparse Row (CSR) format.