qrunch.quantum.operators.second_quantization.fermion.sums

A compact representation of a fermionic operator consisting only of single and double excitations.

Classes

FermionHermitianSum

Compact representation of the full second quantization fermionic hermitian sum.

FermionHermitianSumProtocol

Protocol for representation of a second quantization fermionic hermitian sum.

class FermionHermitianSum

Bases: FermionHermitianSumProtocol, HasCustomEncoding

Compact representation of the full second quantization fermionic hermitian sum.

This operator consists of single- and double-excitations of fermion second-quantization operators.

__init__(single_excitations: ndarray[Any, dtype[float64]] | ndarray[Any, dtype[complex128]] | Array, double_excitations: ndarray[Any, dtype[float64]] | ndarray[Any, dtype[complex128]] | Array) None

Initialize the full operator.

Parameters:
  • single_excitations (ndarray[Any, dtype[float64]] | ndarray[Any, dtype[complex128]] | Array) – Single excitation part of the operator.

  • double_excitations (ndarray[Any, dtype[float64]] | ndarray[Any, dtype[complex128]] | Array) – Double excitation part of the operator (physics ordering).

Return type:

None

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

Decode a dictionary to an instance of TensorHyperContractionIntegrals.

Parameters:

data (dict[str, Any]) – The dictionary representation of a TensorHyperContractionIntegrals instance.

Return type:

FermionHermitianSum

property double_excitations: Array

Return the double excitation part of the operator (physics ordering).

encode() dict[str, Any]

Encode the instance into a dictionary.

Return type:

dict[str, Any]

static is_hardcore_bosonic() Literal[False]

Return True, if it is hard core bosonic.

Return type:

Literal[False]

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

Rotate the excitations.

Parameters:

rotation_matrices (tuple[ndarray[Any, dtype[float64]], ...]) – The matrix to rotate with.

Return type:

FermionHermitianSum

rotation_matrix_structure() list[RotationBlockDefinition]

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

Return type:

list[RotationBlockDefinition]

property single_excitations: Array

Return the single excitation part of the operator.

class FermionHermitianSumProtocol

Bases: Protocol

Protocol for representation of a second quantization fermionic hermitian sum.

This operator consists of single- and double-excitations of fermion second-quantization operators.

__init__(*args, **kwargs)
property double_excitations: Array

Return the double excitations.

static is_hardcore_bosonic() Literal[False]

Return True, if it is hardcore bosonic.

Return type:

Literal[False]

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

Rotate the excitations.

Parameters:

rotation_matrices (tuple[ndarray[Any, dtype[float64]], ...]) – The matrix to rotate with.

Return type:

Self

rotation_matrix_structure() list[RotationBlockDefinition]

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

Return type:

list[RotationBlockDefinition]

property single_excitations: Array

Return the single excitations.