mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-07 22:53:41 +01:00
70 lines
1.9 KiB
OCaml
70 lines
1.9 KiB
OCaml
(** 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
|
|
type hole = int
|
|
type particle = int
|
|
|
|
(** {1 Accessors} *)
|
|
|
|
val alfa : t -> Spindeterminant.t
|
|
(** 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.
|
|
*)
|
|
|
|
val is_none : t -> bool
|
|
(** Tests if a Determinant is [None]. *)
|
|
|
|
|
|
(** {1 Second quantization operators} *)
|
|
|
|
val vac : t
|
|
(** Vacuum state, [vac = Some ]{% $|\rangle$ %} *)
|
|
|
|
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$ %}. *)
|
|
|
|
|
|
|
|
(** {1 Creators} *)
|
|
|
|
val of_spindeterminants : Spindeterminant.t -> Spindeterminant.t -> t
|
|
(** Creates a Slater determinant from an {% $\alpha$ %} and a {% $\beta$ %}
|
|
[Spindeterminant.t].
|
|
*)
|
|
|
|
val of_lists : int list -> int list -> t
|
|
(** Creates a Slater determinant from a two lists of orbital indices. *)
|
|
|
|
val negate_phase : t -> t
|
|
(** Returns the same determinant with the phase negated. *)
|
|
|
|
|
|
(** {1 Printers} *)
|
|
|
|
val pp_det : Format.formatter -> t -> unit
|
|
|
|
(** {1 Unit tests} *)
|
|
|
|
val test_case : unit -> (string * [> `Quick ] * (unit -> unit)) list
|