10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 20:33:36 +01:00
QCaml/ci/lib/ci_matrix_element.mli
2024-07-30 12:55:42 +02:00

68 lines
2.3 KiB
OCaml

open Common
module De = Determinant
type t
val make :
((int -> int -> Spin.t -> float) *
(int -> int -> int -> int -> Spin.t -> Spin.t -> float) *
(int -> int -> int -> int -> int -> int -> Spin.t -> Spin.t -> Spin.t -> float) option) list ->
De.t -> De.t -> float list
(** [make integrals ki kj] Computes matrix elements for multiple operators between two Slater
determinants, or returns zeros if the total degree of excitation exceeds 2.
@param integrals A list of tuples containing one-electron, two-electron
integrals, and optionally three-electron integrals, for each operator
@param ki The initial Slater determinant.
@param kj The final Slater determinant.
@return A list of computed matrix elements or zeroes if the total excitation
lebel (degree_a + degree_b) is greater than 2.
Example usage:
{[
let integrals = [(one_e_integral, two_e_integral, None); (one_e_integral', two_e_integral', Some three_e_integral')] in
let result = make integrals ki kj
]}
*)
val make_s2 : De.t -> De.t -> float
(** [make_s2 ki kj] computes the value of the $S^2$ operator for two determinants.
@param ki The initial spin determinant.
@param kj The final spin determinant.
@return The computed value of the $S^2$ operator.
Example usage:
{[
let s2_value = make_s2 ki kj
]}
*)
(** Computes matrix elements when the user knows they are non-zero.
@param integrals A list of tuples containing one-electron, two-electron integrals, and optionally three-electron integrals.
@param degree_a The degree of excitation in alpha spin orbitals.
@param degree_b The degree of excitation in beta spin orbitals.
@param ki The initial Slater determinant.
@param kj The final Slater determinant.
@return A list of matrix elements for multiple operators
Example usage:
{[
let integrals = [(one_e_integral, two_e_integral, None); (one_e_integral, two_e_integral, Some three_e_integral)] in
let result = non_zero integrals 1 1 ki kj
]}
*)
val non_zero :
((int -> int -> Spin.t -> float) *
(int -> int -> int -> int -> Spin.t -> Spin.t -> float) *
(int -> int -> int -> int -> int -> int -> Spin.t -> Spin.t -> Spin.t -> float) option) list ->
int -> int -> De.t -> De.t -> float list