QMTensors
ElemCo.QMTensors
— ModuleQMTensors module
This module provides definitions for useful quantum-mechanical tensors.
Exported types and functions
ElemCo.QMTensors.SpinMatrix
— TypeSpinMatrix
A type to store a one-electron matrix (spin aware).
The first matrix corresponds to the alpha electron, and the second matrix is beta. If the matrix is restricted, the beta matrix refers to the alpha matrix.
ElemCo.QMTensors.is_restricted
— Methodis_restricted(mat::SpinMatrix)
Check if the spin-matrix is restricted (i.e, β === α).
ElemCo.QMTensors.lentri_from_norb
— Methodlentri_from_norb(n, N)
Return the length of the upper triangular part of a tensor of dimension n^N.
ElemCo.QMTensors.lentri_from_norb
— Methodlentri_from_norb(n)
Return the length of the upper triangular part of a tensor of dimension n×n.
ElemCo.QMTensors.norb_from_lentri
— Methodnorb_from_lentri(triN, N)
Return the number of orbitals from the triangular index of size triN
.
ElemCo.QMTensors.norb_from_lentri
— Methodnorb_from_lentri(tri2)
Return the number of orbitals from the length of triangular index tri
(for dimension n×n).
ElemCo.QMTensors.restrict!
— Methodrestrict!(mat::SpinMatrix)
Restrict the molecular orbitals (β = α).
ElemCo.QMTensors.strict_uppertriangular_range
— Methodstrict_uppertriangular_range(i2)
Return range for the uppertriangular index (i1 <= i2) without diagonal (i1 < i2) for a given i2.
ElemCo.QMTensors.strict_uppertriangular_range
— Methodstrict_uppertriangular_range(inds::Vararg{Int, N}) where N
Return range for the uppertriangular index (i1 <= i2 <= i3 <= ...
) without diagonal (i1 < i2 <= i3 <= ...) for given i2
, i3
, ...
ElemCo.QMTensors.unrestrict!
— Methodunrestrict!(mat::SpinMatrix)
Unrestrict the spin matrix.
ElemCo.QMTensors.uppertriangular_index
— Methoduppertriangular_index(i1, i2, i3)
Return uppertriangular index from three indices i1 <= i2 <= i3
.
ElemCo.QMTensors.uppertriangular_index
— Methoduppertriangular_index(i1, i2)
Return uppertriangular index from two indices i1 <= i2
.
ElemCo.QMTensors.uppertriangular_index
— Methoduppertriangular_index(inds::Vararg{Int, N})
Return uppertriangular index from a set of indices i1 <= i2 <= ... <= iN
.
ElemCo.QMTensors.uppertriangular_range
— Methoduppertriangular_range(i2)
Return range for the uppertriangular index (i1 <= i2
) for a given i2
.
ElemCo.QMTensors.uppertriangular_range
— Methoduppertriangular_range(inds::Vararg{Int, N}) where N
Return range for the uppertriangular index (i1 <= i2 <= i3 <= ...
) for given i2
, i3
, ...