QMTensors

ElemCo.QMTensorsModule

QMTensors module

This module provides definitions for useful quantum-mechanical tensors.

source

Exported types and functions

ElemCo.QMTensors.SpinMatrixType
SpinMatrix

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.

source
ElemCo.QMTensors.SpinVectorType
SpinVector

A simple container for spin-dependent vectors (α and β). Fields α and β store the alpha and beta spin components respectively.

Constructors

  • SpinVector(v, w): Create with separate α and β vectors
  • SpinVector(v): Create restricted vector (β === α)
source
ElemCo.QMTensors.detri_doublesMethod
detri_doubles(T2)

Convert a doubles amplitude tensor T2 in the form (a,b,ij) to the full form (a,b,i,j). Here, ij is the upper triangular index for occupied orbitals i <= j.

source
ElemCo.QMTensors.detri_samespin_doublesMethod
detri_samespin_doubles(T2)

Convert a doubles amplitude tensor T2 in the form (ab,ij) to the full form (a,b,i,j) using the permutational symmetry $T^{ij}_{ab} = T^{ji}_{ba} = -T^{ij}_{ba} = -T^{ji}_{ab}$.

Here, ab and ij are the strict upper triangular indices for virtual and occupied orbitals a < b, i < j.

source
ElemCo.QMTensors.swapped_uppertriangular_cutMethod
swapped_uppertriangular_cut(norb)

Return all indices for original dimension norb×norb corresponding to the upper triangular part, but with the two indices swapped, i.e., (j,i) instead of (i,j).

source

Internal types and functions