qrunch.common.arrays.single_excitations_array

Implementation of a block diagonal matrix.

Classes

SingleExcitationsArray

Single Excitations Array.

class SingleExcitationsArray

Bases: Array, HasCustomEncoding

Single Excitations Array.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • alpha_alpha – The pure alpha electron repulsion integrals (chemistry ordering).

  • beta_beta – The pure beta electron repulsion integrals (chemistry ordering).

property H: SingleExcitationsArray

Return the Hermitian conjugate of the array.

property T: SingleExcitationsArray

Return the transpose of the array.

__init__(alpha_alpha: ndarray[Any, dtype[float64]], beta_beta: ndarray[Any, dtype[float64]]) None
Parameters:
  • alpha_alpha (ndarray[Any, dtype[float64]])

  • beta_beta (ndarray[Any, dtype[float64]])

Return type:

None

alpha_alpha: ndarray[Any, dtype[float64]]
beta_beta: ndarray[Any, dtype[float64]]
compare(other: Array) bool

Return True, if equal to other array.

Parameters:

other (Array)

Return type:

bool

conjugate() SingleExcitationsArray

Return the complex conjugate of the array.

Return type:

SingleExcitationsArray

classmethod decode(data: dict[str, Any]) SingleExcitationsArray

Decode a dictionary.

Parameters:

data (dict[str, Any]) – The dictionary representation.

Return type:

SingleExcitationsArray

encode() dict[str, Any]

Encode the instance into a dictionary.

Return type:

dict[str, Any]

is_hermitian() bool

Check if the array is Hermitian.

Return type:

bool

property n_nonzero: int

Return the number of non-zero elements.

property ndim: Literal[2]

Dimension of the array.

rotate(rotation_matrices: tuple[ndarray[Any, dtype[float64]], ...]) SingleExcitationsArray

Rotate the array with the given rotation matrix.

Parameters:

rotation_matrices (tuple[ndarray[Any, dtype[float64]], ...]) – Tuple of 2-dimensional real anti-symmetric matrix controlling the rotation. Should match the structure given by the output of the rotation_matrix_structure method.

Return type:

SingleExcitationsArray

rotation_matrix_structure() list[RotationBlockDefinition]

Get information on which blocks should be non-zero in the rotation matrix.

Return type:

list[RotationBlockDefinition]

property shape: tuple[int, int]

Return the shape of the array.