10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-19 04:22:21 +01:00
QCaml/CI/Determinant.mli

94 lines
2.8 KiB
OCaml
Raw Normal View History

2019-02-16 10:21:54 +01:00
(** A Slater determinant is expressed as a Waller-Hartree double determinant:
{% $$
D(\mathbf{R}) = D_\alpha(\mathbf{R_\alpha}) \times D_\beta(\mathbf{R_\beta})
$$ %}
The {% $\alpha$ %} and {% $\beta$ %} determinants are of type [Spindeterminant.t].
*)
type t
2019-02-18 12:41:54 +01:00
type hole = int
type particle = int
2019-02-16 10:21:54 +01:00
(** {1 Accessors} *)
2019-02-18 12:41:54 +01:00
val alfa : t -> Spindeterminant.t
2019-02-16 10:21:54 +01:00
(** Get the {% $\alpha$ %} spin-determinant. *)
val beta : t -> Spindeterminant.t
(** Get the {% $\beta$ %} spin-determinant. *)
val phase : t -> Phase.t
(** Get the phase of the Slater determinant, the product of the phases of the
spin-determinants.
*)
2019-02-18 12:41:54 +01:00
val is_none : t -> bool
(** Tests if a Determinant is [None]. *)
(** {1 Second quantization operators} *)
2019-03-26 01:20:17 +01:00
val vac : int -> t
(** Vacuum state, [vac = Some ]{% $|\rangle$ %}. The integer parameter is the size of the
MO basis set. *)
2019-02-18 12:41:54 +01:00
val creation : Spin.t -> particle -> t -> t
(** [creation spin p] is the creation operator {% $a^\dagger_p$ %}. *)
val annihilation : Spin.t -> hole -> t -> t
(** [annihilation spin h] is the annihilation operator {% $a_h$ %}. *)
val single_excitation : Spin.t -> hole -> particle -> t -> t
(** Single excitation operator {% $T_h^p = a^\dagger_p a_h$ %}. *)
val double_excitation : Spin.t -> hole -> particle -> Spin.t -> hole -> particle -> t -> t
(** Double excitation operator {% $T_{hh'}^{pp'} = a^\dagger_p a^\dagger_{p'} a_{h'} a_h$ %}. *)
2019-02-22 19:19:11 +01:00
val degree_alfa : t -> t -> int
(** Returns degree of excitation between two determinants in the {% $\alpha$ %} spin. *)
val degree_beta : t -> t -> int
(** Returns degree of excitation between two determinants in the {% $\beta$ %} spin. *)
2019-02-22 00:18:32 +01:00
val degrees : t -> t -> int*int
(** Returns degrees of excitation between two determinants in {% $\alpha$ %} and
{% $\beta$ %} spins as a pair. *)
val degree : t -> t -> int
(** Returns degree of excitation between two determinants. *)
2019-12-03 18:52:03 +01:00
val to_lists : t -> int list * int list
(** Converts a Slater determinant to a pair of lists of orbital indices. *)
2019-02-18 12:41:54 +01:00
2019-02-16 10:21:54 +01:00
(** {1 Creators} *)
val of_spindeterminants : Spindeterminant.t -> Spindeterminant.t -> t
(** Creates a Slater determinant from an {% $\alpha$ %} and a {% $\beta$ %}
[Spindeterminant.t].
*)
2019-03-26 01:20:17 +01:00
val of_lists : int -> int list -> int list -> t
(** Creates a Slater determinant from a two lists of orbital indices.
The integer parameter is the size of the MO basis set. *)
2019-02-16 10:21:54 +01:00
2019-02-18 19:45:41 +01:00
val negate_phase : t -> t
(** Returns the same determinant with the phase negated. *)
2019-12-03 18:52:03 +01:00
val set_phase : Phase.t -> t -> t
(** Returns the same determinant with the phase set to [p]. *)
val compare : t -> t -> int
(** Comparison function for sorting *)
2019-02-18 19:45:41 +01:00
2019-02-16 10:21:54 +01:00
(** {1 Printers} *)
2019-12-03 12:25:31 +01:00
val pp : int -> Format.formatter -> t -> unit
2019-02-20 19:43:16 +01:00
(** First [int] is the number of MOs to print. *)
2019-02-16 10:21:54 +01:00
(** {1 Unit tests} *)
val test_case : unit -> (string * [> `Quick ] * (unit -> unit)) list