Utils Submodule

This submodule contains utility functions used throughout pydmqmc. While accessible to users, these functions are generally less polished than the rest of pydmqmc.

Bitarray Manipulation

pydmqmc.utils.bitarray_to_integer(ba)

Generate the integer representation of a given bitarray.

pydmqmc.utils.integer_to_bitarray(iba, norb)

Generate a bitarray given an integer representation.

pydmqmc.utils.concate_bitarrays_to_label(...)

Concatenate two bitarrays and then convert to integer representation.

pydmqmc.utils.extract_bitarrays_from_label(...)

Extract the bitarrays used to generate a given integer state label.

pydmqmc.utils.get_nex(b1, b2)

Return the number of excitations between two states.

pydmqmc.utils.get_occ(b1)

Return the number of occupied orbitals in a given bitarray.

pydmqmc.utils.get_iocc(occ, orb)

Return the index of an orbital within the set of occupied orbitals.

pydmqmc.utils.get_single_perm(b1, a, r, nel)

Return new bitarray and the number of permutations for a single excitation.

pydmqmc.utils.get_double_perm(b1, a, b, r, ...)

Return new bitarray and the number of permutations for a double excitation.

pydmqmc.utils.get_ex_info(b1, b2, nel)

Return information on the excitations between two states.

Integrators

pydmqmc.utils.euler(func, y, dt[, ph_dummy])

Update y using Euler's method.

pydmqmc.utils.parallel_euler(func, y, dt, ...)

Update y using Euler's method.

pydmqmc.utils.rk4(func, y, dt[, ph_dummy])

Update y using the fourth-order Runge-Kutta method.

pydmqmc.utils.parallel_rk4(func, y, dt, ph, ...)

Update y using the fourth-order Runge-Kutta method.

Parallelism Support

pydmqmc.utils.ParallelHelper(shape)

Helper for coordinating parallel Methods.

Permutations

pydmqmc.utils.generate_ijab_symmetries_array(i, ...)

Generate an array of valid symmetry permutations of the orbital indicies.

Point Group Symmetry

pydmqmc.utils.pg_sym_cross_prod(sym1, sym2, mask)

Cross product of two point group symmetries.

pydmqmc.utils.pg_sym_conj(sym, mask)

Conjugate of a point group symmetry.

pydmqmc.utils.orb_sym(orb_syms, mask)

Construct the symmetry of a determinant from its orbitals.

Saving Data

pydmqmc.utils.save_array(data, basename[, ...])

Save an array as a chosen file type.

pydmqmc.utils.save_report(list_of_dicts, ...)

Save a lists of dictionaries as a chosen file type.

Slater-Condon Rules

pydmqmc.utils.sc0(ba, sys)

Hamiltonian matrix element between a state and itself.

pydmqmc.utils.sc1(ba, a, r, perms, sys)

Hamiltonian matrix element between singly excited states.

pydmqmc.utils.sc2(a, b, r, s, perms, sys)

Hamiltonian matrix element between doubly excited states.